This paper proposes a novel technique to forecast day-ahead electricity prices based on the wavelet transform and ARIMA models. The historical and usually ill-behaved price series is decomposed using the wavelet transform in a set of better-behaved constitutive series. Then, the future values of these constitutive series are forecast using properly fitted ARIMA models. In turn, the ARIMA forecasts allow, through the inverse wavelet transform, reconstructing the future behavior of the price series and therefore to forecast prices. Results from the electricity market of mainland Spain in year 2002 are reported.