In this paper, we propose a tractable quadratic programming formulation for calculating the equilibrium term structure of electricity prices. We rely on a competitive game theoretic model, with players divided into producers and consumers who all seek to maximize their own mean-variance utility functions, subject to production (eg, capacity, ramp-up/down times, etc) and consumption constraints. The model incorporates information about over-the-counter and exchange-traded block electricity contracts, transaction costs and liquidity considerations. Our numerical simulations examine the properties of the term structure and its dependence on various parameters of the model. The proposed quadratic programming formulation is applied to calculate the equilibrium term structure of electricity prices in the United Kingdom by modeling the entire power grid, consisting of a few hundred power plants. The impact of ramp-up and ramp-down constraints is also studied.