Back to blog

January 13, 2026

Risk-Aware Optimization Is the Production Engine for Battery and Renewable Bidding

power marketsoptimizationbatteriesriskenergy

If you strip a battery or renewable bidding system down to the part that actually makes decisions, the most defensible thing to put there is not a neural network emitting actions. It is a rolling-horizon optimization model: a linear program (LP) or mixed-integer linear program (MILP) solved over scenarios, with an explicit risk objective and every physical and market rule written in as a constraint. This is not a legacy compromise. For any participant with real physical, contractual, credit, or compliance constraints, it is the production-grade answer, and I want to explain why.

The problem the optimizer is solving

A battery converts uncertain future prices into an intertemporal operating policy. A stylized version of the objective is: maximize expected profit over price scenarios, minus a risk penalty on tail losses, minus a degradation cost. The constraints do the real work: state-of-charge dynamics, charging and discharging limits, round-trip efficiency, interconnection limits, reserve awards, bid-curve formatting rules, and market-specific obligations. For a renewable asset, uncertainty also enters through available production, curtailment, and imbalance settlement. Co-located renewable-plus-storage adds shared interconnection and charging-source rules.

Note what this objective is not: it is not "predict the price and act on the prediction." Uncertainty enters the model through discrete scenarios, robust uncertainty sets, or distributional ambiguity, and the decision is chosen to perform well across that uncertainty, not against a single guess.

Why expected value fails in fat-tailed markets

The natural first instinct is to maximize expected profit. In power markets this is a mistake, because the price distribution has heavy tails: occasional extreme spikes and negative prices dominate the shape of outcomes. An expected-value optimizer is indifferent between a strategy that earns steadily and one that earns slightly more on average while occasionally taking catastrophic losses, for example a reserve commitment the battery cannot deliver during a scarcity event, or a state of charge stranded on the wrong side of a spike.

Averages hide exactly the events that end trading programs. That is why the standard production formulation is mean-CVaR. Conditional Value-at-Risk (CVaR) at level alpha is the average loss in the worst tail beyond a chosen quantile. The objective becomes expected profit minus a weighted penalty on CVaR of losses, where the weight is a tunable risk budget. CVaR has two properties that make it practical rather than merely principled: it is convex, and under discrete scenarios it linearizes, so it drops into an LP without destroying tractability. Recent battery work goes further and shows that a mean-CVaR stepwise bid-curve formulation admits an exact LP reformulation even where a direct formulation looks mixed-integer, which keeps repeated scenario analysis fast and explainable.

Beyond CVaR, the same machinery supports chance constraints (require a terminal state-of-charge target or reserve deliverability to hold with high probability), robust optimization (protect against every value in an uncertainty set, at the cost of conservatism if the set is too broad), and distributionally robust optimization (optimize against the worst distribution in an ambiguity set around the empirical data). Wasserstein DRO is attractive here because it gives a tunable hedge against distribution shift, which is a permanent condition in these markets. A recent virtual-bidding paper combining Wasserstein ambiguity with CVaR improved robustness in its NYISO backtest, and NREL's bidding work generates a thousand ERCOT price paths, reduces them to ten scenarios, and optimizes against those.

Rolling deployment is model predictive control

None of this is solved once. The production pattern is model predictive control (MPC) applied to market participation. At each decision time: freeze the timestamp-correct information set, generate scenarios, solve the horizon model, validate the resulting market objects and risk limits, submit only the current decision, ingest awards and telemetry, then reforecast and re-optimize. The plan beyond the first interval is provisional by design. A deterministic rolling LP over a single forecast path is the transparent baseline, but a point forecast can induce brittle schedules, which is exactly the gap that scenarios and risk objectives close.

Constraints belong inside the optimizer

A tempting architecture is to let some flexible model propose actions and then repair them afterward: clip the schedule to feasibility, reformat it into a valid bid. This fails in two ways. First, an optimizer that outputs a dispatch schedule is not yet a bidder. Markets typically require monotone, segmented quantity-price curves, and the curve should encode opportunity cost and risk across possible clearing prices, not just one intended operating point. A post-hoc repair step cannot recover that structure. Second, repairs silently change the economics. Clipping a charge decision against an interconnection limit after the fact means the model valued energy it could never move.

Putting constraints inside the LP/MILP buys things a bolted-on filter cannot: constraints are explicit and auditable, risk budgets and compliance limits are enforceable rather than advisory, dual variables give an economic interpretation of what each binding constraint costs, and scenario or objective changes can be stress-tested systematically. Even where a learned policy is worth exploring, the sober position in the literature is that it belongs behind a feasibility projection with an optimizer fallback, not in front of one.

What optimization does not fix

An honest boundary: optimization is not automatically correct. A precisely solved model with leaked features, incoherent scenarios (independent prices hour by hour, when real spikes are correlated across hours), omitted settlement components, or wrong tariff constraints is still wrong, just confidently so. The recurring failure modes are familiar: perfect-foresight upper bounds reported as backtests, ignored terminal state of charge, ancillary capacity treated as free of activation energy, degradation reduced to a throughput charge where cycling behavior actually matters.

Most production advantage comes from model fidelity, data timing, and controls rather than solver novelty. The solver is mature commodity technology. The craft is in what you ask it to solve: coherent joint scenarios, a risk budget you actually mean, and every rule the market will enforce written down before the solve, not after.