The paper Improving Electricity Market Price Forecasting with Factor Models for the Optimal Generation Bid has been recently published in the journal International Statistical Review (preprint available at http://hdl.handle.net/2117/3047 ). In this article, we apply forecasting factor models to the market framework in Spain and Portugal and study their performance. Although their goodness of fit is similar to that of autoregressive integrated moving average models, they are easier to implement. The second part of the paper uses the spot-price forecasting model to generate inputs for a stochastic programming model, which is then used to determine the company's optimal generation bid. This work is a partial result of the tasks developped in the research project DPI2008-02153 of the MINECO.