In this paper, a novel hybrid approach is proposed for electricity prices forecasting in a competitive market, considering a time horizon of one week. The proposed approach is based on the combination of particle swarm optimization and adaptive-network based fuzzy inference system. Results from a case study based on the electricity market of mainland Spain are presented. A thorough comparison is carried out, taking into account the results of previous publications, to demonstrate its effectiveness regarding forecasting accuracy and computation time. Finally, conclusions are duly drawn.