We introduce a new model for electricity prices, based on the principle of supply and demand equilibrium. The model includes latent supply and demand curves, which may vary over time, and assumes that observed price/quantity pairs are obtained as the intersection of the two curves, for any particular point in time. Although the model is highly nonlinear, we explain how the particle filter can be used for model parameter estimation, and to carry out residual analysis. We apply the model in a study of Californian wholesale electricity prices over a three-year period including the crisis period during the year 2000. The residuals indicate that inflated prices do not appear to be attributable to natural random variation, temperature effects, natural gas supply effects, or plant stoppages. However, without ruling out other factors, we are unable to argue whether or not market manipulation by suppliers played a role during the crisis period.