Case study · Energy risk modelling
Managing risk in fixed-price electricity contracts
An energy company needed to decide how much electricity to buy in advance and how much risk to include in its fixed-price offers. The difficulty was that changing electricity prices affected not only the cost of serving customers, but also how many customers chose a fixed-price contract.
The challenge
The company used forward purchases to hedge the electricity consumed by customers on fixed-price contracts. But the amount that needed to be hedged was itself uncertain.
When spot prices changed, two things happened at once. The profitability of each fixed-price contract changed, and customers became more or less likely to choose a fixed-price product. That changed the number of customers covered by the hedge and therefore the amount of electricity the company needed to buy.
A hedge based only on the current customer portfolio could consequently become too large or too small as market conditions changed.
The approach
I built a model that treated electricity prices, customer behaviour and consumption as parts of the same problem.
Rather than making one forecast and basing the hedge on that number, the model generated many plausible ways the market and customer portfolio could develop. Each possible future could then be used to test how a proposed hedge would perform.
This made it possible to compare decisions not just by what was expected to happen, but by how they behaved when the future turned out differently.
In practical terms, the model connected changes in electricity prices to customer choices and consumption, then carried those changes through to the hedge position and the resulting financial outcome.
Explore the quantitative model
The model separated the main stochastic drivers of the portfolio while preserving the dependencies that mattered for the commercial decision.
Model formulation
Portfolio P/L was modelled as a function of spot prices, fixed-price consumption and the hedge position. Fixed-price consumption was itself stochastic because both consumption per customer and the number of fixed-price customers could vary. The model therefore separated market-price, consumption and customer-number uncertainty while retaining the dependency between spot prices and switching between fixed and spot-price products.
Consumption model
Historical analysis showed that consumption per customer was strongly related to heating demand and an underlying consumption trend. A linear regression model used graddage, an extrapolated 12-month consumption trend and a seasonal indicator to generate conditional consumption scenarios. Weather uncertainty was represented through historical monthly graddage quantiles.
Spot-price model
Monthly DK2 spot prices were transformed to relative price changes. The transformed series showed negative lag-one autocorrelation and mean-reverting behaviour. An AR(2) model separated the predictable component from the residual innovation, and future price paths were generated recursively by sampling from the residual distribution.
Scenario evaluation and risk
The Scenario Toolbox combined the stochastic drivers into portfolio scenarios. For each candidate hedge, a Monte Carlo simulation propagated these scenarios through the P/L calculation to obtain a distribution of future portfolio outcomes. Alternative hedge positions could then be compared using expected P/L, Value-at-Risk and Expected Shortfall.
Pricing residual risk
Loss quantiles were also evaluated on a per-customer basis. This provided a quantitative basis for estimating the risk buffer to include in the fixed-price product after the hedge had been taken into account.
From model to working tool
The analysis was turned into a tool that the company could rerun as market conditions and the customer portfolio changed.
Users could update the latest data and commercial assumptions, generate new scenarios, and review the resulting consumption and risk estimates. Exceptional market situations could also be reflected by inspecting and adjusting scenarios rather than treating the statistical model as an unquestionable forecast.
The implementation used Python for the modelling and risk calculations, with Excel-based inputs and outputs for the operational workflow.
The result
The company gained a way to reason about fixed-price contracts as a connected business problem rather than as separate forecasts for prices, customers and consumption.
It could see how changing market conditions might alter both the size and profitability of the fixed-price customer base, and use that information when deciding how much electricity to hedge and how much risk to include in customer prices.
The result was not a prediction of one future, but a better basis for making decisions when the future was uncertain.
Hedging decisions
Compare proposed hedge positions across a range of plausible future market and customer outcomes.
Customer pricing
Estimate how much residual risk remained after hedging and reflect that risk in fixed-price offers.
Have a difficult quantitative problem to discuss?
I work with organisations on modelling, validation and implementation where uncertainty and the structure of the problem matter as much as the final model.
Discuss your project