Pricing energy contracts against the risk of the whole portfolio
I built a modular pricing engine at tem. Analysts swap pricing strategies and test them against simulated markets, with Value at Risk and Expected Shortfall built into every price.
- Role
- Designed and built the pricing engine
- Stack
- Python, Monte Carlo, Streamlit
95%
Less time to price a tender
10×
More scenarios tested

How it works
- 1
Contract book
- 2
Market simulation
Monte Carlo
- 3
Risk metrics
VaR and ES
- 4
Pricing strategy
- 5
Analyst app
Streamlit
Results
What every price accounts for
An illustrative distribution of portfolio losses. VaR marks the loss exceeded only 5% of the time. Expected Shortfall is the average of those worst cases, which is where volatile energy markets hurt.
Illustrative shape.
Pricing a tender takes 95% less time, with 10 times as many scenarios tested.
Key decisions
- 01
Price each deal against the whole book
A new contract changes the risk of everything already signed. The engine simulates the full book with the new contract in it, so the price reflects the risk that contract adds.
- 02
Price in the tail, too
Value at Risk says how bad a bad month gets. Expected Shortfall says how bad the worst months get. Energy markets have fat tails, so pricing on VaR alone would hide the losses that matter most.
- 03
Two speeds of risk model
Statistical VaR and ES models give a fast baseline for standard quotes. Monte Carlo runs with thousands of market paths handle contracts that interact in non-linear ways.
- 04
Keep analysts in charge
A Streamlit app lets analysts swap strategies and compare them side by side. The engine does the maths, and the people who own the price make the call.