We develop a flexible multifactor stochastic model with three diffusive and three spike regimes, for daily spot and forward electricity. The model captures various stylized features of power prices, including mean reversion and seasonal patterns and short-lived spikes. We estimate parameters using a practical two-step procedure that combines precalibration of deterministic elements and spikes and state-space estimation of diffusive factors. We use several results on affine jump diffusions to combine the spike and diffusive components, and to provide convenient closed-form solutions for important power derivatives. We also propose a simple nonparametric model for hourly spot prices, based on hourly profile sampling from historical data. This model can reproduce complicated intraday patterns. We illustrate the performance of the daily and hourly models using data from the Amsterdam Power Exchange.