Energy Portfolio (Robust)
Stochastic / Robust QP
Contract Mix · Spot Exposure · Price-Risk Hedging
An electricity retailer, large industrial consumer, or vertically integrated utility faces a continuous choice: lock in price through long-term contracts, or ride the spot market? Contracts are cheaper per MWh on average but lock in price; spot purchases exploit low-price periods but leave the buyer fully exposed to volatility. The robust energy portfolio problem builds a mix of Power Purchase Agreements (PPAs), futures contracts, storage, and spot exposure that minimizes expected cost while bounding the worst-case outcome at an acceptable level. Two-stage stochastic and budget-robust formulations are the standard OR tools.
The problem
Contract mix, spot exposure, and storage under price uncertainty
Electricity prices are the most volatile of any major commodity: day-to-day spot prices can swing by a factor of 5–10, and during scarcity events (Texas freeze, European 2022 energy crisis) by a factor of 50+. A retailer serving a fixed 100-MW load who fails to hedge properly can see a single week's spot prices wipe out an entire year's retail margin. Conversely, over-hedging (buying more forward than needed) locks in price above expected spot and sacrifices the upside of low-price hours.
The core OR problem: given an expected load profile, a menu of contract products (block forwards at different strike prices, peak/off-peak PPAs, baseload PPAs), storage capacity, and a spot market, decide how much of each to procure. Constraints: coverage of expected demand, bounds on maximum spot exposure, optional renewable-portfolio standard. Objective: minimize expected cost with a risk penalty (standard deviation, CVaR, or budget-robust worst case).
Modern variants integrate storage as a flexibility asset: a battery hedges price volatility by charging during low-spot hours and substituting for high-spot hours. Storage-integrated portfolios solve jointly for contract mix and storage schedule, adding complexity but typically 20–40% additional value over contract-only hedging. Distributionally robust variants relax Gaussian assumptions on price distributions, replacing them with Wasserstein or moment ambiguity sets.
Mathematical formulation
Two-stage stochastic + budget-robust variant
Notation
| Symbol | Meaning | Units |
|---|---|---|
| $\mathcal{K}$ | Contract products (forwards, PPAs) | — |
| $\mathcal{T}$ | Delivery periods | — |
| $\mathcal{S}$ | Spot-price scenarios | — |
| $\pi_s$ | Probability of scenario $s$ | pu |
| $P_k$ | Strike price of contract $k$ | $/MWh |
| $V_k^{\max}$ | Max volume of contract $k$ | MW |
| $D_t$ | Expected demand in period $t$ | MW |
| $\tilde{\pi}_{t,s}$ | Spot price in period $t$, scenario $s$ | $/MWh |
| $x_k$ | Contract volume (1st stage) | MW |
| $y_{t,s}$ | Spot purchase (2nd stage) | MW |
| $\beta, \lambda$ | Risk-aversion parameters | — |
Two-stage stochastic portfolioConejo-Carrion-Morales (2010)
First-stage: choose contract volumes $x_k$ before price uncertainty resolves. Second-stage: buy any residual on the spot market in each scenario.
where $\mathrm{Risk}$ is typically Variance, CVaR, or a robust worst-case term.
Constraints
Coverage of demand in every scenario:
Contract volume limits:
Maximum spot exposure (risk limit):
where $\alpha$ is the max allowed fraction from spot. Renewable portfolio standard:
CVaR as risk measureRockafellar & Uryasev (2002)
Conditional Value-at-Risk at level $\beta$ is the expected cost conditional on exceeding the $\beta$-quantile. For portfolio problems:
Rockafellar-Uryasev's linearization makes this a linear objective: introduce $\eta$ and $z_s = \max(0, \mathrm{cost}_s - \eta)$, minimize $\eta + \frac{1}{(1-\beta)|S|} \sum_s z_s$. CVaR has become the industry-standard risk measure for electricity portfolios.
Budget-robust variantBertsimas & Sim (2004)
Instead of scenarios, constrain prices to a polyhedral uncertainty set:
Budget-robust optimization minimizes the worst-case cost inside this set. LP duality makes the problem tractable; the robustness parameter $\Gamma$ controls conservatism. Less sensitive to scenario-probability assumptions.
Complexity
Pure stochastic portfolio (no binaries) is a quadratic program with CVaR, or a large LP with linear CVaR. Scenario-based: size scales with $|\mathcal{S}|$; 1000 scenarios = 10s to minutes in Gurobi. Budget-robust is a compact LP once dualized. Storage-integrated adds SOC variables but stays convex.
Real-world data
EPEX Spot & Nord Pool historical prices
EPEX Spot (Continental Europe) and Nord Pool (Scandinavia, Baltics, UK) publish historical hourly day-ahead prices. Standard input for European portfolio optimization research.
CME Electricity Futures
CME Electricity Futures lists PJM, NYISO, and ERCOT electricity futures and options. Real contract strike prices for US-hub portfolio optimization.
Illustrative portfolio (this page)
The interactive solver handles 4 contract products (baseload PPA, peak PPA, wind PPA, solar PPA) plus spot exposure and optional battery over 24 hours with 30 price scenarios. Visualizes the efficient frontier (expected cost vs CVaR) and optimal portfolio composition.
Interactive solver
CVaR-constrained energy portfolio with scenario prices
Portfolio parameters
Efficient frontier & composition
Solution interpretation
The efficient frontier is the core object. X-axis: expected cost; y-axis: CVaR (worst-case cost in the top-5% scenarios). Each point is the optimal portfolio for a different risk-aversion $\lambda$. The leftmost point (lowest expected cost) is the risk-neutral solution — all spot exposure, minimal contracting. The rightmost (lowest CVaR) is maximally hedged — all contracts, no spot. Real portfolios sit somewhere in between; the trader's job is to pick the point matching shareholder risk tolerance.
Portfolio composition shifts predictably with risk aversion. Risk-neutral ($\lambda = 0$): minimal contracts, maximum spot exposure, lowest expected cost but fattest right tail. Risk-averse ($\lambda$ high): large baseload PPA lock-in, minimal spot, moderate cost and tight distribution. RE contracts (wind/solar PPAs) play a special role: they're cheaper per MWh than thermal baseload PPAs but have quantity uncertainty (wind doesn't blow, sun doesn't shine). The solver balances this.
Battery co-optimization — if enabled — adds a third lever: the battery charges during low-spot hours and substitutes for high-spot purchases, effectively flattening the net spot exposure. This typically reduces CVaR by 20–40% at similar expected cost, making storage a first-class hedging instrument alongside contracts.
The RE portfolio standard constraint shifts the entire frontier upward when the binding: even the risk-neutral point is forced to carry expensive renewable contracts. The cost of the constraint is the vertical distance between the unconstrained and constrained frontiers. Policymakers care about this number.
Extensions & variants
Storage-coupled portfolio
Co-optimize contract mix with battery storage schedule. Storage absorbs residual spot exposure, flattening the net-position distribution. 20–40% CVaR reduction at similar expected cost.
Distributionally robust portfolio
Worst-case over an ambiguity set (Wasserstein distance or moment conditions) rather than a fixed scenario distribution. Robust to misspecification of the price distribution. Active research frontier.
Real-options in contract choice
Contracts with optionality (cap/floor strike, swing contracts) priced as real options. Lattice methods or LSM regression for dynamic exercise; portfolio optimization over option mix.
Multi-period stochastic SP
Three-stage or N-stage formulations where contract purchases can be revised as prices evolve. Nested Benders / SDDP methods. Used by large European utilities for quarterly re-hedging.
Producer-side portfolio
Mirror problem: generator decides how much of output to sell forward vs spot. Bi-level formulations include anticipated price impact of the producer's own offers. Strategic bidding extension.
Retail pricing under DR
Retailer chooses portfolio and retail tariff (ToU, CPP, RTP) to maximize margin net of demand response. Bi-level: portfolio at upper level, customer response at lower level. Fuses with DR optimization.