Power Markets Lab: from megawatts to euros
How electricity markets really work, how we model them and how energy companies turn models into decisions — and money. Every section has an interactive part (play with it), a guide (what to try) and an explanation (what it means in the real world).
How energy companies make money
🏭 Asset optimisation
Run plants, hydro and batteries in the most valuable hours and markets. Every MW sold once, at the best place.
dispatchancillarywater value📉 Hedging & risk
Lock in margins with forwards years ahead so the company survives price crashes. Less upside, much less downside.
forwardsVaRclean spreads🔮 Trading (spec)
Take positions when your fundamental view differs from the market: weather, outages, gas, policy.
fundamentalsweathernews🤝 Origination
Structured deals for clients: PPAs for wind/solar, shaped supply for industry, tolling, flexibility contracts.
PPAshape riskpricing🏗️ Investments & M&A
Value plants over 20–40 years: buy, build, retire. Long-term price scenarios decide billion-euro questions.
NPVscenarioscapture price🧠 Analytics & data
Forecasts, fundamental models, automation — the engine behind all of the above. This is where engineers start.
PythonoptimisationMLEPIC — EP Innovation Centre is the university cooperation programme of EP Commodities (EPC), the energy trading arm of the EPH group.
- Master & PhD thesis topics with real market data
- Mentoring by traders, analysts and quants
- Internships and student projects → junior roles
- Joint research: modelling, optimisation, grids, ML
How to use this lab
- Yellow boxes = your task list. Steps tick ✓ as you do them.
- Move sliders, press buttons — every chart recalculates live.
- Read the explanation below each tool: what it means in practice.
- Red dashed boxes = how this makes money.
Why did electricity cost 30 €/MWh in 2020, over 450 €/MWh in summer 2022, and sometimes below zero today?
Power plants: what they cost, how they run, where they sell
Every plant is a machine that turns fuel, water, wind or stored energy into megawatt-hours — but each MW can be sold only once. The trader's job: decide when a plant runs and in which market each MW earns the most. Nuclear, gas, hydro, batteries and renewables solve very different optimisation problems.
Your task
- Click a market on the timeline below to see who buys, what is traded and which plants can take part.
- Open at least 4 different markets — watch which slice of the 400 MW gas plant each one uses.
- Answer the three quick-check questions on the right.
← Click any market bar above to open its fact sheet.
160 MW
120 MW
60 MW
20
40 MW
The bars add up to 400 MW: once a MW is promised to one buyer it cannot be sold again. Real-time balancing energy is delivered from the reserved slices when the TSO activates them.
What is going on?
Electricity is traded many times before it is produced. Forwards fix prices months or years ahead (hedging). The day-ahead auction at 12:00 the day before sets the hourly — since 1 Oct 2025 15-minute — schedule for all of Europe in one optimisation (SDAC, algorithm Euphemia). Intraday trading fixes forecast errors until shortly before delivery. Whatever is still out of balance is solved by the TSO (ČEPS, SEPS…) in real time with balancing reserves it bought in advance.
Your task
- Move the gas price — watch the gas plants move along the cost ladder.
- Change gas or CO₂ until hard coal and the new CCGT swap places (the fuel switch).
- Click any bar in the chart to open that plant's fact card.
- Lower the power price until the clean spark spread of the new CCGT turns negative — the plant would stay off.
Click a bar to open a plant fact card.
What is going on?
The short-run marginal cost (SRMC) is what it costs to produce one more MWh: fuel + CO₂ + variable maintenance. Fixed costs (staff, capital) do not count — they are paid whether the plant runs or not. A plant runs when the power price is above its SRMC.
η = efficiency (MWhel per MWh of fuel), EF = emission factor (t CO₂ per MWh fuel: gas 0.20, hard coal 0.34, lignite 0.37). A 57 % CCGT emits ≈ 0.35 t/MWh, lignite ≈ 1 t/MWh — so CO₂ hurts lignite three times more.
Flexibility at a glance (typical values)
Your task
- Open at least three market cards below: what is sold, when, how is it priced?
- Pick tomorrow's day type and read the forecast. The real prices are still hidden.
- Split the 400 MW between aFRR reserve, day-ahead and intraday, then press Run tomorrow.
- Find a run where the second chance in intraday earns money (MW not selected day-ahead, sold later).
- Beat “all-in day-ahead” on two different day types.
Forwards & futures years → days ahead
- What: base/peak blocks for a week, month, quarter, year (e.g. “CZ Cal-27 base”).
- When: continuous trading on EEX/PXE or OTC via brokers, until shortly before delivery.
- Price: each deal at its own fixed price (pay-as-traded). Used for hedging: lock the spark spread early.
- Who: generators, suppliers, industry, traders.
Capacity mechanism 1–4 years ahead
- What: being available in scarcity (€/kW/year), not energy.
- When: state/TSO auctions years before delivery.
- Price: auction clearing price; penalties if unavailable. Stacks on top of energy sales.
- Who: prequalified, de-rated plants, storage, demand response. PL, IT, BE, GB… not CZ/SK today.
Balancing capacity FCR · aFRR · mFRR D-1 morning
- What: MW kept ready for the TSO. Paid a reserve price in €/MW/h even if never activated.
- When: TSO auctions, mostly on D-1 before day-ahead, in 4-hour blocks.
- Catch: a gas plant must be running (≥ min load) and keep headroom: for aFRR up, output ≤ 400 − reserve.
- Who: prequalified units: gas, hydro, batteries, demand response.
Day-ahead auction (SDAC) 12:00 on D-1
- What: energy for each 15-minute period of tomorrow (15-min MTU since 1 Oct 2025, hourly before).
- When: gate closure 12:00 CET, results ≈ 13:00.
- Price: one uniform clearing price per zone and period (pay-as-cleared), Euphemia couples Europe.
- Who: everyone with a balance group. Deepest liquidity, reference price for most contracts.
Intraday (IDA + continuous) D-1 15:00 → ~1 h before
- What: 15-min, hourly and block products to correct positions.
- When: three auctions (15:00, 22:00 D-1, 10:00 D) plus continuous trading (SIDC) until shortly before delivery.
- Price: auctions uniform, continuous pay-as-bid. Moves with forecast errors, thinner liquidity.
- Who: same players. Flexible plants sell more when ID spikes, buy back when it drops.
Balancing energy & imbalance real time
- What: energy from activated reserves (aFRR via PICASSO, mFRR via MARI); settlement of every deviation.
- When: real time, settled per 15-min period afterwards.
- Price: marginal activation price; imbalance price for each balance responsible party. Very volatile.
- Who: reserve providers earn on activation; everyone pays or receives imbalance.
Before the run you only see the forecast band (illustrative). After the run: real day-ahead prices, intraday prices and what your plant sold in each hour.
What is going on?
The markets close one after another: reserve auctions (morning D-1) → day-ahead (12:00) → intraday (until about an hour before delivery). You must split the plant before you know the prices of the later markets.
Your day-ahead offer is priced at SRMC, so you are only selected in hours where the clearing price covers fuel and CO₂. MW that were not selected, plus the MW you kept back, can still be sold in intraday wherever the ID price beats SRMC.
Model (illustrative): hourly instead of 15-min; reserve is held all day, so the plant runs at least 180 MW in every hour (that min-load block is sold day-ahead as a must-run). Selling intraday moves the price against you by 2 €/MWh per 100 MW (thin liquidity). Starting the plant costs €12k. Ramp and min up/down times are ignored here: they are the topic of the next tab.
Your task
- Choose a day type and read the weather indication. Exact prices stay hidden until you submit.
- Enter a price and quantity for each block (or use a helper), then press Submit to day-ahead.
- Read the feasibility check. Change your bids until the accepted schedule has 0 violations.
- Reach a score of at least 90 % of the optimal feasible schedule.
- Tick Step 2: already online and compare the cold plant with the online plant.
Submit your bids to see which hours were selected and whether the plant can actually run that schedule.
What is going on?
The day-ahead auction treats every hour (since Oct 2025 every 15 minutes) as a separate price. Each simple bid is accepted when the clearing price is at or above the bid price. A gas plant, however, has inter-temporal constraints: it needs a start (and a start cost), it must stay on at least 4 h and off at least 3 h, it cannot run below 180 MW, and it ramps only 150 MW per hour.
So a set of hourly bids can be accepted but impossible to run: “selected 07–09 only”. The plant then repairs the schedule: it buys back in intraday (at a worse price) or runs loss-making hours.
Model (illustrative): hourly, price-taker (our bids do not move prices), start-up goes 0 → 180 MW in the first hour, shut-down only from 180 MW, runs that reach midnight continue tomorrow. Intraday fixes cost the DA price ± 12 €/MWh. The optimal schedule is a dynamic program (as in the Gas plant tab) extended with ramps and min up/down times.
Your task
- Switch to the sunny spring day: the optimiser stops the plant over the midday price dip (or keeps it at minimum load).
- Reserve ≥ 50 MW for aFRR: the output is capped and the blue headroom appears.
- Press Find optimal split — how many MW should go to reserves?
- Try the dunkelflaute day: is reserve still worth it when energy margins are huge?
Reserve is offered in 4-hour blocks (00–04, 04–08, …). In a block with reserve the plant must be online and keep the reserved MW free. The optimiser (dynamic programming over 24 h × on/off × reserve block) chooses when to start, stop and offer reserve.
What is going on?
A gas plant (CCGT) is the classic flexible plant: it starts in 1–3 hours and can move between minimum load (here 180 MW) and full load (400 MW) quickly. But each start costs money (fuel to heat up, wear of the turbine), and below 180 MW it cannot run stably.
So the question is not “is the price above SRMC this hour?” but “is the whole run worth it?” — sometimes it is cheaper to stay at minimum load through a few loss-making hours than to stop and pay another start.
Your task
- Drag the outage start slider through the year and watch the lost margin change.
- Find the cheapest window (within 1 % of the best).
- Switch on the TSO winter rule and the one-crew rule — where is the best window now?
- Move the spot price scenario and the hedge ratio: why does nuclear sell its power years ahead?
- Slovakia: Mochovce 1–3 (≈ 470 MW each, unit 3 since 2023, unit 4 under construction) and Bohunice V2 (2 × ≈ 500 MW) — nuclear covers well over half of Slovak generation.
- Czechia: Dukovany (4 × ≈ 510 MW) and Temelín (2 × ≈ 1 080 MW) — about 40 % of Czech generation.
- Units refuel every 12–18 months; outages take ~3–6 weeks and are planned years ahead with the TSO.
- SRMC is tiny (fuel ≈ 5–7 €/MWh) but fixed costs are huge — the plant must run as close to 100 % as possible.
What is going on?
Nuclear is a baseload plant: it runs flat out almost all year. Its optimisation problem is not hourly dispatch but when to stop for refuelling and maintenance. Forward prices are seasonal — winter months are much more expensive (heating, low solar) than late spring/summer. Every day offline costs 24 GWh × (price − SRMC).
Constraints make it realistic: the TSO needs enough capacity in winter, and a site has one specialised outage team, so units at the same site cannot all stop at once.
Your task
- Lower the water budget (a dry week) — watch the water value go up.
- Compare the optimal plan with “uniform” dispatch: how much does smart timing add?
- Switch on pumped storage and change the round-trip efficiency.
- Try another week type (e.g. the mixed-weather week with a dunkelflaute Friday).
What is going on?
Water in a reservoir costs nothing — but it is limited. Every MWh used now cannot be used later. So the optimal plan sorts the hours by price and uses the water in the most expensive ones until it runs out.
The price of the last (cheapest) hour that still gets water is the water value: the opportunity cost of one more MWh of water. Hydro therefore bids into the market at its water value, not at zero.
Simplification: water left at the end of the week is worth zero; real models give it a value from the expected future (seasonal water values).
Your task
- Pick the sunny spring day: the battery charges in the midday dip and discharges in the evening.
- Lower the efficiency or raise the degradation cost — which cycles are no longer worth it?
- Move MW into FCR/aFRR, then press Find best split.
- Increase the number of batteries already in the reserve market — what happens to the reserve price and to your best split?
What is going on?
A battery buys energy when it is cheap and sells it when it is expensive (arbitrage). But it loses 8–20 % in each round trip, it wears out with every cycle, and its state of charge (SOC) must stay between empty and full. The optimiser here is a dynamic program over 24 hours and 81 SOC levels — it never discharges more than is stored.
Your task
- On the sunny spring day, compare the capture price of the solar park with the baseload price.
- Increase the installed solar in the market — watch midday prices and the capture rate fall.
- Turn on curtailment at negative prices: how much money does it save?
- Raise the forecast error — imbalance costs eat into revenue.
What is going on?
Wind and solar cannot choose when to produce — nature decides. Their marginal cost is ~0, so they always run… and when many of them produce at the same time, they push the price down exactly in their own hours. That is cannibalisation.
Capture rate = capture price / baseload price. Solar in CEE fell from ~100 % to well below 70 % in sunny months of 2024–25 (illustrative).
Your task
- Pick a day type — this is tomorrow's price forecast.
- Split your assets between reserves and energy (move at least two sliders) and choose the negative-price rules.
- Reach a score of at least 95 % of the optimised benchmark.
- Press Show the optimiser's answer and compare with your plan.
Nuclear 500 MWSRMC 10
CCGT 400 MWSRMC –
Hydro 150 MW900 MWh water / day
Battery 50 MW / 100 MWhη 88 %
Solar 200 MW + Wind 150 MW
What is going on?
This is a mini version of what an asset-optimisation desk does every morning: take tomorrow's price forecast, decide how much of each plant goes to reserves and how much to energy, then let each plant's optimiser produce a schedule. The benchmark uses the same models as the gas, hydro and battery tabs (DP for the gas plant and battery, water value for hydro) and tries every split.
Score = your value ÷ the optimiser's value, counted only on what you control (gas, hydro, battery and the negative-price rules) — the flat output of nuclear, wind and solar is the same for everyone.
Simplifications: perfect price forecast, price-taker (our bids do not move prices), one reserve price per day, no intraday re-optimisation, no forward hedges.
The day-ahead auction and the merit order
Every day at noon, buyers and sellers from almost all of Europe send their bids for tomorrow. One algorithm finds the prices for every quarter-hour and every country. The key idea is the merit order: plants are sorted from cheapest to most expensive, and the last plant needed to cover demand sets the price for everybody.
Your task (≈ 8 min)
- Click a supply block in the chart, or pick a plant in the list. Hover to see its numbers.
- Be greedy: bid the CCGT above its cost, e.g. 105 €/MWh. Drag its block up, or use the slider. Did its profit go up?
- Bid the CCGT above 120 €/MWh. It is no longer dispatched, and its profit drops to zero.
- Raise retail demand until supply runs out. The price jumps to the cap of 4,000 €/MWh.
- Press Reset: everybody bids their real cost (SRMC) again.
MTU = market time unit. NEMO = nominated electricity market operator. SDAC = single day-ahead coupling. Below we show one MTU (one quarter-hour or one hour). The logic is identical for each of the 96.
Industry: 400 MW, buys only below 120 €/MWh
Flexible load / export: 300 MW, below 70 €/MWh
What is going on?
Supply curve. Each seller offers volume (MW) at a price (€/MWh). Sort the offers from cheapest to most expensive and you get a staircase. This is the merit order.
Demand curve. Buyers bid how much they pay at most. Households cannot react within a day, so suppliers buy their volume at any price. Some industry and exports only buy if power is cheap.
Clearing. The price is where the two staircases cross. Every accepted seller gets this same price; every accepted buyer pays it. This is called uniform pricing or pay-as-clear.
Price limits (SDAC). The harmonised range is −500 to +4,000 €/MWh. The maximum rises automatically by +500 €/MWh if the price goes above 70 % of the maximum in two MTUs on two different days within 30 days. In August 2022 this rule triggered a rise to 5,000, but EU ministers suspended it. The day-ahead cap is still 4,000. Intraday (SIDC) has ±9,999 €/MWh.
Scarcity. If demand exceeds all offers, the price goes to the cap. This represents the value of lost load (VOLL), the value customers put on not being cut off.
Euphemia also handles block orders (all-or-nothing over several hours), linked orders and flow-based grid constraints. It maximises consumer + producer surplus + congestion rent over the whole coupled area.
Real world: roughly 1,500 TWh a year (over half of EU consumption) is traded in SDAC. CZ (OTE), SK (OKTE) and HU (HUPX) are all coupled through SDAC. The results feed straight into the next steps: merit order builder →
Your task (≈ 10 min)
- Pick a day type. Each one changes demand, wind, solar and the neighbours' prices.
- Choose an hour with the slider, or click a bar in the price chart. Which plant is marginal (thick black outline)?
- Press ▶ Play the day and watch the marginal plant change from night to the evening peak.
- Raise gas to 60 €/MWh. How much does the daily base price move? Which hours do not move at all?
- Set wind to 180 % or more (or 0 %). Which hours change most?
- Tick Island mode (no imports or exports) and compare the price profile.
What is going on?
Every hour is a new auction. Demand changes during the day, and so do wind and solar. The point where demand crosses the staircase moves left and right, so a different plant becomes marginal and the price jumps from step to step.
The order of the staircase comes from short-run marginal cost (SRMC):
η = efficiency, EF = t CO₂ per MWh of fuel (gas 0.202, hard coal 0.34, lignite ≈ 0.38), VOM = variable O&M. A 58 % CCGT at 35 €/MWh gas and 75 €/t CO₂: 60.3 + 26.1 + 2 ≈ 88 €/MWh.
Why the price stays near the neighbours' price. When the local price is above the neighbours', the cheaper import offers get used. When it is below, exports are accepted. With enough interconnection the local price sticks to the regional price. Tick Island mode to see what the local fleet alone would do.
Real world: CZ has about 4 GW of nuclear and 5–6 GW of lignite/coal, falling. SK is mostly nuclear and hydro. The fleet here is illustrative, not a unit list. Real models include ramping limits, start-up costs, CHP heat obligations and reservoir management. See Modelling.
Your task (≈ 8 min)
- Click Normal evening. A gas plant sets the price on the flat middle of the curve.
- Click Scarcity: a cold, dark, still evening with a nuclear trip. Where on the hockey stick are we now?
- Click Negative price: a sunny Sunday at noon. Who is paid to stop producing?
- Move the demand slider slowly across the steep part (above ≈ 11 GW). Feel the hockey stick.
- In the missing-money calculator, find how many scarcity hours a peaker needs to cover its fixed costs.
What is going on?
Normal hours: price = SRMC of the marginal unit. The middle of the curve is flat because many gas and coal plants have similar costs. So the price is stable but follows fuel prices.
Scarcity: at the right end there is little left: oil units, demand response, then nothing. A few hundred MW of extra demand (or a trip) moves the price from 100 to 900 €/MWh or even to the cap. This is the hockey stick.
Negative prices: at the left end, some sellers bid below zero. Nuclear and must-run CHP would rather pay than ramp down. Subsidised wind and solar keep their premium (or never see the price at all, like rooftop PV). If they exceed demand plus export, the price goes negative and flexible merchant plants are paid to switch off.
Real world: negative DA hours in DE reached about 450 in 2024 and were even more frequent in 2025, mostly on sunny weekends. On 12 Dec 2024 (a still, dark winter evening) DE/CZ hourly prices went above 900 €/MWh. Poland and Belgium have capacity markets. Germany is designing one for new gas plants.
Your task (≈ 8 min)
- Set transfer capacity to 0 MW. The zones are isolated, so prices differ a lot.
- Raise capacity slowly. When do the prices become equal (the line is no longer congested)?
- On the Summer weekday, zone A exports at noon (solar) and imports at night. Click hours in the chart and watch the arrow flip. Then try Dunkelflaute.
- Look at the congestion income vs capacity chart. Why is TSO income highest at a medium capacity?
Each zone is a closed merit order (no third countries). Coupled clearing: first one merged merit order. If the resulting flow exceeds the capacity, the flow is fixed at the limit and each zone clears on its own.
What is going on?
Unconstrained: with enough capacity, both zones act as one market. There is a single merit order, a single price, and the cheapest plants of both zones run. Power flows from the cheap zone to the expensive one until the prices are equal.
Congested: if the line is too small, the flow stops at the limit. The exporting zone stays cheaper and the importing zone more expensive. The prices split.
The exchange buys at the low price in A and sells at the high price in B. The difference goes to the TSOs, who must use it for grid investment and for firm cross-border capacity.
Welfare gain is never negative: coupling can only lower total generation cost. But it is shared unevenly. Consumers in the exporting zone pay more, and producers in the importing zone earn less.
Real world: CZ, SK and HU are often coupled at the same price. DE is often cheaper in solar hours, when it exports south and east. HU is often the most expensive zone in the evening peak (import-dependent, at the end of the flow chain). Typical spreads: DE–HU evening 20–60 €/MWh, CZ–SK often 0.
Your task (≈ 8 min)
- Move gas from 35 to 70 €/MWh. How much does the power price move? Compare with 1/η.
- Press the 2020 and Aug 2022 presets. Explain 45 → 450 €/MWh in one sentence.
- In the fuel-switch chart, find the CO₂ price where gas becomes cheaper than coal.
- If real data is shown below, check that power follows the "CCGT cost" line from 2021 onwards.
Lines are SRMCs (€/MWh of electricity) at the gas and coal prices chosen on the left. Above the switch price, gas plants move to the left of coal in the merit order.
What is going on?
Gas is the price setter. In Central Europe the evening and winter hours usually need gas plants after nuclear, renewables, lignite and coal are used up. Then the price ≈ CCGT SRMC, and every €1 on gas adds about €1/η ≈ €1.8–2.0 to power.
2022: TTF went from about 20 to over 200 €/MWh. A 50 % CCGT then needs 400 + 35 (CO₂) ≈ 435 €/MWh. That is what the market paid, even in hours when most power came from cheaper nuclear, coal or wind: pay-as-clear.
Clean spark spread = Power − Gas/η − CO₂ × 0.202/η
If the spread is positive, the CCGT earns money running. The market quotes it daily for every month, quarter and year ahead. Clean dark spread is the same for coal.
Fuel switch: coal emits about 0.85 t CO₂/MWhel, a CCGT about 0.37. Each €1/t on CO₂ makes coal about €0.5/MWh more expensive relative to gas. Above the switch price, gas runs first. EU climate policy is designed to work like this.
Real world: DE base power and TTF moved almost one-to-one (×2) during 2021–2023. Since 2024 more solar hours are set by renewables, so the base price "decouples" a bit at midday but still follows gas in the evening.
Your task (≈ 6 min)
- Open each day using the buttons.
- For every day, name the marginal technology at 03:00, 13:00 and 19:00.
- Find the hours where the countries decouple (different prices). Which border was congested?
What is going on?
The duck curve. On sunny days the midday price falls (sometimes below zero) and the evening price rises, when solar disappears and gas plants must ramp up. The daily shape matters as much as the level: a solar farm earns the midday price (its capture price), not the base price.
Power market models: from equations to decisions
How do energy companies "see" the price of 2030? We start with a 10-minute crash course in linear programming, the maths inside every market model. Then we look at a real in-house model built with the free, open-source tool PyPSA. We cover how it is built, calibrated and compared with commercial providers and the forward market. Then we use it for scenarios: weather, fuel, new Slovak nuclear and pumped storage, and price spikes. The last tab covers the physics of the grid (PTDF), which is a great PhD playground. One rule throughout: a model only matters if it changes a decision.
Your task
- Click or drag in the first plot. Find one feasible point and one infeasible point. Which one is cheaper, and why can't you have it?
- Press "Walk the vertices". The simplex method never looks inside the region. It jumps from corner to corner, and every step is cheaper.
- Make the optimum jump to another vertex: make gas cheaper than coal, change the demand, or switch the CO₂ cap off.
- Read the shadow price of the CO₂ cap (50 €/t at the start). Raise the cap by 10 t/h. Does the cost fall by about 10 × the shadow price? Compare with the re-solve column.
- In part 2, lower the line limit until the merit-order point leaves the feasible segment. Read the two nodal prices. Their difference is the shadow price of the line.
- Switch part 2 to "Market view (one zone)". There is one price now. Who pays for the redispatch?
Pure maths: a linear program you can see
Two decision variables, so we can draw it. x₁ = MW from plant A (coal), x₂ = MW from plant B (gas). The objective and every constraint are linear, so each constraint is a straight line and its allowed side is a half-plane. The feasible region (green) is where all half-planes overlap. Illustrative numbers.
The same picture is the power market: economic dispatch with a grid bottleneck
Now xA = gas CCGT in the city (node A), xB = cheap nuclear in the north (node B). The north has only 150 MW of local load, so most of its power must travel over one line with limit F. The demand constraint is an equality, xA + xB = D, so the feasible region shrinks from an area to a line segment. The line limit xB − 150 ≤ F cuts that segment. Illustrative numbers.
| Plant | €/MWh | Capacity |
|---|---|---|
| B · North nuclear | 25 | 900 MW |
| A · City gas CCGT | 90 | 1000 MW |
Three nodes, loop flows and PTDFs: Grid & PTDF tab. A 24-hour version with storage: PyPSA tab. PyPSA builds exactly this LP, with millions of variables.
The problem definition behind every market model
Scale the 2-variable picture up to every plant, every hour and every line in Europe. The structure stays the same: variables, one objective, linear constraints. The prices come out as duals.
Decision variables (what the solver chooses)
- pg,t: output of plant g in hour t (MW)
- chs,t, diss,t, es,t: storage charge, discharge, state of charge
- fℓ,t: flow on line or interconnector ℓ
- curtailment and load shedding (expensive "slack" variables)
- capacity-expansion models also choose Pgmax: what to build
Objective
- min Σt Σg cg · pg,t (total cost)
- + start-up costs (unit commitment), + annualised investment (expansion)
- Market version: max welfare = value of accepted demand bids − cost of accepted supply offers (Euphemia)
- Same optimum if demand is fixed
Constraints
- Energy balance per node and hour: generation − exports = load
- Capacity: p ≤ Pmax × availability (wind and solar profiles)
- Ramp: |pt − pt−1| ≤ R
- Storage: et = et−1 + η·cht − dist/η, 0 ≤ e ≤ E
- Lines: f = PTDF × injections (Kirchhoff), |f| ≤ F
- Reserves: spare capacity ≥ requirement; CO₂: Σ emissions ≤ cap
Outputs (what you use)
- Dispatch per plant and hour → revenues, fuel burn, capture prices
- Flows, curtailment, storage schedules
- Prices = duals of the energy balance (λn,t)
- Duals of line limits = congestion rents; dual of the CO₂ cap = carbon price
- Duals of capacity limits = value of one more MW → investment signal
| LP (linear program) | MILP (mixed-integer) | |
|---|---|---|
| Variables | all continuous | some integer, e.g. on/off ug,t ∈ {0,1} |
| Typical model | economic dispatch, capacity expansion (PyPSA default) | unit commitment: min stable load pmin·u ≤ p ≤ pmax·u, start-up cost, min up/down time |
| Solving | simplex (walk the vertices, as in part 1) or interior point. Fast even for millions of variables. | branch-and-bound: solve many LPs, fixing u = 0 or 1. NP-hard; time can explode. |
| Prices | duals are clean prices | no duals for integers → fix the binaries, re-solve the LP, read duals (or special pricing rules) |
| Who uses it | PyPSA long-term runs, our in-house model, most studies | Euphemia (block and complex orders are all-or-nothing), TSOs, plant schedulers, PyPSA with committable=True |
| Problem | Variables | Solved in |
|---|---|---|
| Part 1 of this tab | 2 | microseconds, in your browser |
| 24-hour toy in the PyPSA tab | ≈ 200 | milliseconds, in your browser |
| One zone, 30 assets, 8760 h | ≈ 0.3 million | seconds (HiGHS) |
| In-house CWE + CZ/SK model, 1 year hourly | ≈ 1–5 million | minutes (HiGHS) |
| PyPSA-Eur: ~300 nodes × 8760 h, with investment | ≈ 10–100 million | hours, 100+ GB RAM, often a commercial solver |
| Euphemia (EU day-ahead): every order of the coupled zones, 96 quarter-hours | MILP | a strict time limit, every day after 12:00 CET |
Solvers. HiGHS: free and open source (University of Edinburgh), the default in PyPSA and SciPy. Gurobi, CPLEX, Xpress: commercial, faster on huge MILPs, free licences for students. Rule of thumb: variables ≈ assets × hours, and constraints are of the same order.
What is going on? Three ideas that run the power market
1 · The optimum sits on a corner
A linear objective over a region bounded by straight lines is cheapest at a vertex, where two constraints cross. If the iso-cost line is parallel to an edge, the whole edge is optimal (a tie). This is why George Dantzig's simplex method (1947) only walks from vertex to neighbouring vertex and stops when no neighbour is cheaper. In a convex problem a local optimum is the global optimum. Large models also use interior-point methods, which cut through the inside of the region.
2 · Shadow prices (duals)
Every constraint gets a number: y = Δ(optimal cost) / Δ(right-hand side). A constraint with slack has y = 0: relaxing it changes nothing. A binding constraint has y ≠ 0. The dual of the demand constraint is the cost of one more MWh, which is the electricity price. The dual of the CO₂ cap is the carbon price that would give the same dispatch. The dual of a line is what one more MW of transmission is worth.
The solver gets duals for free from the final simplex tableau. We verify them by re-solving with RHS ± 1. The optimal cost is convex in the RHS, so z(b) − z(b−1) ≤ y ≤ z(b+1) − z(b) must hold.
3 · From merit order to nodal prices
With only demand and capacity constraints, the LP solution is the merit order: cheapest plant first. A line limit can cut off that point. The optimum then moves to the boundary: cheap B is backed down and expensive A runs. That is redispatch. The cost increase is the congestion cost. With nodal pricing each node gets the dual of its own balance (LMP). The price difference × flow is the congestion rent that the grid owner collects. A one-zone market (Germany, most of Europe) shows one price and the TSO pays for redispatch afterwards.
Your task
- Click at least three different business questions and read which model fits each one.
- Open "Battery business case 2030". Why does an optimisation (LP) model win here and ML lose?
- Open "Hedge Cal-27". Here the forward market beats every model. Why?
- In the MOM vs PyPSA chart, switch to "Uncertainty". Two models give the same mean. Do they see the same risk?
What is going on? Three families of models
1 · Fundamental models
They rebuild the market from physics and economics: plants, fuel, weather, demand, grid. Then they find the cheapest dispatch.
- Merit-order / stack model (our in-house MOM). Sort the bids by cost and intersect them with demand, hour by hour. It is fast, so you can run 500 Monte-Carlo weather/demand simulations.
- LP dispatch (PyPSA). One big linear program over 8760 hours that dispatches plants, storage and cross-border flows together. The price is the shadow price of the energy balance.
- Unit commitment (MILP). Adds on/off decisions, start-up costs and minimum load. It is closer to how real plants run and gives better spikes, but it is about 10× slower.
2 · Statistical / ML models
They learn from history: regression, gradient boosting, neural networks on weather forecasts, load, outages and recent prices.
They are excellent for hours to days ahead (day-ahead bidding, intraday). They fail when the world changes: 2022 gas crisis, 3× more solar in 2030, a new nuclear block. They cannot extrapolate to a market that has never existed.
3 · Hybrid
A fundamental model provides the structure (merit order, residual load) and ML corrects the residual errors: spikes, negative prices, bidding behaviour. Most trading desks end up here.
Time horizon decides the tool
| Horizon | Decision | Typical model |
|---|---|---|
| Minutes–hours | Intraday, balancing | ML, nowcasting |
| Day-ahead | Bids, battery schedule | ML + fundamentals |
| Weeks–months | Hydro, outages, hedges | Stack model + weather |
| 1–3 years | Hedging (Cal products) | Forward market + fundamental fair value |
| 5–30 years | Invest, value, build | LP / UC scenarios, capacity expansion |
Your task
- Click every box of the pipeline (inputs → … → decision) and read what is needed.
- In the tiny LP, raise solar to ≥ 12 GW. What happens to the midday price, and why?
- Now add a battery ≥ 2 GW. Watch the midday price rise and the evening peak fall. Who sets the price now?
- Move the shadow-price check to an evening hour (≥ 17:00). Does the dual equal the cost of one extra MWh?
- Copy the PyPSA code and run it at home (
pip install pypsa highspy).
Fleet: nuclear 2 GW (10 €/MWh), CCGT 5 GW, OCGT 3 GW, demand response / shedding at 500 €/MWh. CO₂ fixed at 75 €/t. Illustrative system.
import numpy as np
import pandas as pd
import pypsa # pip install pypsa highspy
n = pypsa.Network()
n.set_snapshots(pd.date_range("2030-06-01", periods=24, freq="h"))
h = np.arange(24)
# two zones: windy north, load centre south
n.add("Bus", ["north", "south"], carrier="AC")
n.add("Carrier", ["wind", "solar", "gas"])
# hourly availability profiles (0..1 of installed capacity)
wind_cf = 0.55 + 0.25 * np.cos(2 * np.pi * h / 24) # windier at night
solar_cf = np.clip(np.sin(np.pi * (h - 6) / 12), 0, None) # 06:00-18:00
n.add("Load", "load_north", bus="north", p_set=2_000) # MW
n.add("Load", "load_south", bus="south",
p_set=9_000 + 2_000 * np.sin(np.pi * (h - 8) / 12).clip(0))
gas_eur_mwh_th, co2_eur_t, eff = 30.0, 80.0, 0.55
n.add("Generator", "wind_north", bus="north", carrier="wind",
p_nom=8_000, p_max_pu=wind_cf, marginal_cost=0.0)
n.add("Generator", "solar_south", bus="south", carrier="solar",
p_nom=6_000, p_max_pu=solar_cf, marginal_cost=0.0)
n.add("Generator", "gas_south", bus="south", carrier="gas",
p_nom=12_000, marginal_cost=(gas_eur_mwh_th + 0.202 * co2_eur_t) / eff)
# interconnector: transport model, 3 GW in both directions
n.add("Link", "north_south", bus0="north", bus1="south",
p_nom=3_000, p_min_pu=-1, efficiency=1.0)
# optional: a 1 GW / 4 h battery behind the bottleneck
n.add("StorageUnit", "battery_north", bus="north", p_nom=1_000, max_hours=4,
efficiency_store=0.94, efficiency_dispatch=0.94,
cyclic_state_of_charge=True)
status, condition = n.optimize(solver_name="highs") # builds + solves the LP
prices = n.buses_t.marginal_price # EUR/MWh = dual of each bus balance
print(prices.round(1))
curtailed = (n.generators_t.p_max_pu["wind_north"] * 8_000
- n.generators_t.p["wind_north"]).sum()
print("curtailed wind MWh:", round(curtailed))
print("system cost EUR:", round(n.objective))What you get: at night the link is full, so the north price is 0 €/MWh (wind is curtailed) and the south price is 83.9 €/MWh (gas). Two prices appear because of one congested line. Curtailment is 8.8 GWh without the battery and 4.5 GWh with it. The battery soaks up wind that cannot be exported. Tab 8 explains this in detail.
| Item | Free option | In our model |
|---|---|---|
| Grid topology | PyPSA-Eur (OpenStreetMap / ENTSO-E grid) | 10 buses, clustered |
| Weather → RES profiles | ERA5 reanalysis (Copernicus), SARAH-3 | ERA5-2013 + 11 measured years |
| Demand | ENTSO-E Transparency, OPSD | Reference TWh, hourly shape |
| Power plants | powerplantmatching, ENTSO-E | Plant DB, 3 efficiency tranches |
| Fuel & CO₂ | Exchange forwards (TTF, EUA) | Provider A deck + stochastic paths |
| Cross-border capacity | JAO, ENTSO-E NTC | Commercial NTC caps |
| Solver | HiGHS (open source) | HiGHS; Gurobi ≈2–4× faster |
| Compute | a laptop | 8 cores, 6–8 GB RAM, 10–15 min/run |
| Skills | Python, pandas, linear programming, a lot of patience for data cleaning | |
What is going on? The price is a dual variable
PyPSA writes the market as one linear program. It minimises total cost, and in every hour t and at every bus supply has to equal demand:
s.t. Σg pg,t + storaget + importst = dt [λt]
0 ≤ pg,t ≤ availabilityg,t, line & storage limits
The multiplier λt (the shadow price or dual) of the balance constraint is the cost of serving one more MWh in hour t. In a competitive market that is exactly the clearing price. The tiny LP above checks this numerically.
Why storage changes everything. With a battery, the midday price is no longer "0 because the sun shines". It becomes the opportunity cost of the battery: evening price × efficiency. In our full model, storage and cross-border trade set the German price in about 26 % of hours. You cannot get that from a simple merit-order sort.
What PyPSA does not capture (from our model card):
Your task
- Step through all 10 calibration stages (buttons or "Next"). Watch the mean, the zero-price share and the max.
- Find the stage where a sign bug made the model pay to export. How much did the fix move the mean?
- In the chart below, open the daily profile and compare stage 8 with the final model. What changed at midday and in the evening?
- Open the duration curve and the error table. Why is the hourly correlation low even for a good model?
Lines: model mean and median (€/MWh, left axis). Bars: share of hours at ≤ 0.5 €/MWh (%, right axis). Dashed lines show the Provider A targets.
Derived. Model and reference use different weather years, so hour-by-hour timing cannot match. Monthly values, the average-day profile and the duration curve are the meaningful scores.
Exchange outturn (2026 = first 266 days). The model's first year is 2026, a forecast, so there is no backtest. History is used for plausibility only.
Why calibrate? A raw optimisation model is "too perfect"
An LP model assumes perfect competition, perfect foresight and plants that can ramp freely. Real markets have frictions, so we add them as explicit, documented mechanisms:
- Must-run and CHP: plants that also deliver heat run in winter even at low prices.
- Bid mark-ups / scarcity: in tight hours real bids go above cost (peak layer +38 €/MWh, 5 % withholding, demand response at 160/230 €/MWh).
- Negative RES bids: subsidised renewables keep producing below zero (bids at 0/−15/−45 €/MWh).
- Interconnector limits: commercial NTCs, not physical line ratings. Otherwise French nuclear "floods" Germany.
- Hydro and pumped storage: a perfect-foresight LP cycles them too well, so they are derated to 30 %.
Calibration is a trade-off, not curve fitting. At stage 8 the mean was within 1 % but the daily shape was flat (TB4 52 vs 79). The shape mechanisms fixed the spreads, and the mean moved to +3.7 %. For a battery client the shape matters more than the level, so we accepted it.
Bugs are part of modelling. An inverted sign made the model pay to export. A stale index mask put Belgian nuclear plants into Germany. Both were found by checking when flows happen, not only how much.
Do not over-fit. The model still has too few negative hours (7.7 % vs 15.5 %). Forcing it would need invented bid tranches. We document it instead, and it is a great thesis topic.
Your task
- Click the legend chips to hide and show sources. Which forecast is the outlier for 2030?
- In the dispersion view, select 2027. Why is the exchange (EEX) so far above all models? (Hint: open the "vintage" box.)
- Switch the dispersion view to TB4. Do the models agree on spreads as well as on levels?
- Look at the CEE chart. Why is Slovakia more expensive than Germany in 2030?
Note the uneven x-axis: 2032 → 2035 → 2040. Provider B is in real euros (inflation removed), so it is lower by construction. Vintages: model and Provider A from August 2026, EEX close on 16 September 2026.
- Fuel deck: the gas and CO₂ assumptions explain most of the level.
- RES build-out: GW of solar and wind, and how fast.
- Demand: heat pumps, EVs, data centres (2030: 525–553 TWh across sources).
- Flexibility: batteries, demand response, hydro (this drives spreads).
- Method: LP vs stack vs bidding behaviour (this drives spikes).
- Vintage: when the run was made.
Vintage: why is EEX far above in 2027?
Diamonds: exchange Cal-30 quotes (Sep 2026). Model values exist only for the CEE runs (2027, 2029–2031).
Why buy several vendor views and still build your own model?
Commercial providers sell long-term price forecasts (tens of thousands of euros per year each). Companies buy several because they disagree. In 2030 our sources range from about 69 to 98 €/MWh. You only learn something by understanding why.
An in-house model is not about being "more right". It lets you own the assumptions: plug in your own gas view, your own battery pipeline, your Slovak plants. You can explain every number to a trader, a risk committee or a bank.
The forward market is the benchmark. If EEX Cal-30 trades at 79.8 and your fair value is 76, the market already "knows" something or is paying a risk premium. You do not trade against a vendor PDF. You trade against the curve.
Levels converge, spreads do not. By 2030 most views sit at 70–80 €/MWh. TB4 (battery spread) ranges from 67 (PyPSA) to 93 (Provider B). For a battery investor, that disagreement is the risk.
Your task
- Click at least three weather years. How much does the 2030 mean move? How much does TB4 move?
- Switch the metric to hours ≥ 300 €. Which weather pattern is the scarcity year?
- In the fuel part, select P10 and then P90. Compare how Germany and Slovakia react.
- Move the threshold slider on the S-curve. What is the probability that a CCGT costs more than 100 €/MWh to run?
A · Weather years: same 2030 fleet, 11 historical weather patterns
* Approximate capture rates are pre-curtailment and biased low. Use them only to rank weather years.
B · Fuel scenarios: P10 / P50 / P90 commodity decks (2030)
Distributions, not point forecasts
Weather barely moves the annual mean in our model (76.5–78.0 €/MWh, about ±1 %). The annual energy is fixed and trade absorbs a lot. But weather moves spreads and spikes: TB4 ranges 73–78, and hours ≥ 300 € range from 0 to 41. Every measured year gives 10–20 % more spread than the smooth ERA5-2013 reanalysis year.
Caveat: the weather runs vary shapes only (annual volumes are normalised), so the level impact is understated. Making weather years volume-true is an open thesis.
Fuel moves the level: P10 → P90 shifts Germany from 58 to 90 €/MWh (+31). Slovakia, which is nuclear- and hydro-heavy, moves only from 82 to 91 (+9). The same shock gives a very different exposure.
P10/P50/P90: P90 means a 90 % chance of being below that value. Banks finance projects on P90-type downside cases. Risk teams set limits from the tails. The "expected" price alone is never enough.
Your task
- In the base world, add Bohunice AP1000. How much do SK, CZ and DE prices fall? What happens to Slovak exports?
- Now try Málinec pumped storage. Why does the price level hardly move while TB4 falls?
- Select "+ Both" and switch the world to fuel P10 or P90. Is the effect of the new assets robust?
- Click the open question card you would like to work on in a thesis.
Negative = pumping (midday solar), positive = generating (evening).
What is going on in Slovakia?
In 2030 Slovakia is priced above Germany (model: SK 87.9, CZ 89.5, DE 76.4 €/MWh). It has little solar, so there is no deep midday trough. The evening peak is set by imports or gas through congested borders. Nuclear (≈21 TWh of 29 TWh demand) makes it almost balanced over the year, but not hour by hour.
+1.25 GW nuclear: SK −3.4 €/MWh, CZ −1.6, DE −0.1. Slovakia goes from ≈1.2 to ≈9.8 TWh net export. The price effect leaks to neighbours through interconnectors, so most of the extra energy is exported at the border price.
+1.2 GW / 10 h pumped storage (Málinec): the price level is unchanged, but SK TB4 falls by 1 €/MWh. Storage moves energy from cheap to expensive hours. It flattens the daily shape, and it earns exactly that shape.
Robust deltas: across all fuel and weather worlds, "+ both" lowers SK by 3.3–5.6 €/MWh. The level is uncertain (fuel moves it ±5), but the effect of the decision is stable. That is what a decision-maker needs.
Caveat: Bohunice targets commissioning around 2040. Testing it in the 2030 market shows "what such a block does", not a 2030 forecast. CEE level bias vs Provider A: SK +0.1 to +3.8 %, CZ +2.4 to +6.6 %. Trust the deltas.
Your task
- Select "Negative hours" and compare the model with the observed 2024/2025 values. How big is the gap?
- Switch to "Distribution by source". Which source has the most extreme maximum, and which the flattest distribution?
- Move the battery fleet slider to ≥ 15 GW. What happens to TB4, and to the value of the last GW?
- In the Slovak stress chart, select Fuel P90. How expensive are the top 1 % residual-load hours?
TB4 = daily average of the 4 highest minus the 4 lowest hourly prices, which approximates a 4-hour battery's gross spread. The band shows the in-house MOM model across 500 simulations (P05–P95).
Why LP models underestimate extremes, and how to fix it
In an LP the price is a shadow price: it spikes only when a hard limit binds (capacity, NTC, the 400 € cap). Reality has more:
- Strategic bidding and scarcity mark-ups in tight hours (Provider B max 747 vs model 361 €/MWh).
- Forced outages: plants trip; our model only uses average derates.
- Unit commitment: start costs and minimum load create both spikes and negative prices.
- Perfect foresight: model storage always charges at the right hour. Real storage does not.
- Subsidy vintages and inflexible CHP: many plants keep producing below zero. The model has only 3 RES bid tranches, so it has 286 negative hours in 2030, while reality already had 573 in 2025.
Fixes (each a thesis): unit commitment (MILP), stochastic outages (Monte Carlo), scarcity functions fitted to history, more bid tranches calibrated to observed negative hours, or an ML layer trained on the model's residual errors (hybrid).
Batteries cannibalise themselves. Low → high battery build (7.9 → 15.1 GW) lowers TB4 from 71.9 to 63.5 €/MWh, about −1 €/MWh per GW. The mean price barely moves (< 0.5 €). Batteries redistribute value within the day. Who sets the price? Storage and cross-zone trade in 26 % of 2030 hours, which is more than CCGT.
Your task
- Switch the view to "Market (one zone)". The market ignores the grid, so which lines are overloaded (> 100 %)?
- Raise wind at A to ≥ 11 GW. Does more wind reach the load at B? Where does it go instead?
- Put a battery at node A (≥ 1.5 GW). Then move it to node B. Which node relieves congestion and earns more?
- Change the A–C line reactance (as a phase-shifter would). Watch the PTDF table and the loop flow change.
- Switch to the evening hour (H2). Is the grid still congested? What does the battery do now?
Entry = share of 1 MW injected at the node (and withdrawn at B) that flows on the line, in its arrow direction.
Each line gives two straight boundaries: |PTDFℓ,A·NPA + PTDFℓ,C·NPC| ≤ Fℓ. The white area is feasible. ● = market result, ◆ = grid-secure result. This is exactly how the European day-ahead algorithm (Euphemia) handles flow-based coupling, with zones in place of nodes.
What is going on? Electricity does not follow contracts, it follows physics
DC power flow. For planning studies we linearise the AC equations: flow on a line ∝ angle difference / reactance. Then every flow is a linear function of the nodal injections:
The PTDF (Power Transfer Distribution Factor) matrix depends only on the grid (reactances). With three equal lines, 2/3 of a transfer A→B goes directly and 1/3 loops via C. You cannot send power "only on the direct line". This is a loop flow.
Congestion → price separation. When a line is full, the next MWh at B must come from expensive local plants, while cheap wind at A is curtailed. With nodal pricing (LMP) every node gets its own price: λn = λ − Σℓ PTDFℓ,n·μℓ. In a one-zone market (Germany today) there is one price, and the TSO pays redispatch afterwards. Germany pays several € billion per year for redispatch and curtailment.
From nodes to Europe: flow-based market coupling. Since 2022 the Core region (incl. CZ, SK, DE, PL, AT, HU) clears the day-ahead market with flow-based constraints inside the Euphemia algorithm:
- CNEC: critical network element and contingency (a line, checked also with another line tripped).
- RAM: remaining available margin = Fmax − reliability margin − flows already "booked" by the base case.
- GSK (generation shift key): assumes which plants inside a zone change output when the zone's net position changes. Nodal PTDF × GSK = zonal PTDF. This is an approximation. If the real plants differ, the real flows differ.
- minRAM 70 % (EU Regulation 2019/943): TSOs must offer at least 70 % of each critical element's capacity for cross-zonal trade.
- Loop flows in CEE: north-German wind flows to the south through PL and CZ. Phase-shifting transformers on the DE–PL and DE–CZ borders now push that flow back.
Trading on fundamentals: hours, years and decades
The same megawatt-hour is traded many times: years ahead as a forward, the day before in the auction, minutes before delivery in intraday. Each time horizon has its own drivers, models and ways to make (or lose) money. Here you will trade the weather, hedge a power plant, value an investment — and finally test your instincts in the trader quiz on real market events.
Your task
- Click all three horizons and read who does what, with which data — and what can go wrong.
- Open Mid term and select delivery years 2022 and 2023: was selling next year's power forward a good idea?
- Sort the 8 real-life decisions at the bottom into the right horizon.
What is going on?
Short term is about weather and flexibility. Tomorrow's price is set by load minus wind and solar (the residual load). Small changes in the weather forecast move prices a lot. Money is made by reacting faster and more accurately than the rest of the market, and by owning assets that can react, like batteries, hydro and gas engines.
Mid term is about fuels and the balance of supply and demand: gas, CO₂, coal, hydro reservoirs and French nuclear availability. Producers sell their output forward to lock in a margin (hedging). Traders take positions when their fundamental model disagrees with the forward curve.
Long term is about structure: how many solar panels, batteries and gas plants there will be, carbon policy, and demand from heat pumps, EVs and data centres. Nobody knows the price in 2040, so companies use scenarios and ask: "Does this investment still work in the bad scenario?"
Your task
- Move the wind slider and watch tomorrow's hours slide along the merit-order curve.
- Press one of the 11:00 forecast update buttons and read what the update is worth as a trade.
- Real data: open Dunkelflaute 12 Dec 2024. Above what residual load did prices explode?
- Open Easter Sunday 2026 and compare DE with PL and FR in the country chart.
The dashed line is the 09:00 forecast, which the market has already priced in. The sliders are the 11:00 update. The DA auction closes at 12:00.
Flat in the middle (lignite, coal, gas set the price), very steep at both ends: negative when wind and solar exceed demand, explosive when only the last peakers are left.
What is going on?
Day-ahead (DA). All of Europe runs one auction at 12:00 for the next day. Every bidding zone gets one price per period (15-minute periods since 1 Oct 2025). Bids are based on the forecasts available in the morning, so the last weather update before 12:00 matters most.
Intraday (ID). After the auction, forecasts keep changing. Continuous intraday trading lets you buy or sell up to shortly before delivery, to correct your position.
Imbalance. Whatever you still produce or consume differently from your schedule is settled by the grid operator (TSO) at the imbalance price. This is usually much worse than the market, so good forecasts save real money.
Shape. Forwards are traded as flat blocks (base = all hours, peak = 08–20 on weekdays). Real production and consumption follow an hourly shape. Shape trading means buying a block forward and selling the individual hours in DA (or the reverse). Solar always sells at midday, when prices are lowest. That is why its capture price is below the base price.
Why the curve matters. In our illustrative curve, 1 GW of forecast error moves the price by only ~1.6 €/MWh at 30 GW residual load, but by ~85 €/MWh at 63 GW. The same weather error is worth 50× more on a dunkelflaute evening.
Your task
- Move the hedge ratio from 0 % to about 80 %. Compare the worst case (P5) and the probability of a loss.
- Lignite plant: also hedge the CO₂ (≥ 80 %). This is the spread hedge, the one generators really use.
- Raise volatility to 60 %. Does hedging become more or less valuable?
- Switch to the solar park and over-hedge (> 100 %). What happens in a bad-weather year?
Unhedged (red), your result rises and falls with the power price. Fully hedged (gold), the line is flat: you have locked in the margin, whatever happens.
- EUA volatility 30 %, correlation with power 0.7. Seeded random numbers (
EPIC.rng), so the results are reproducible. - Volume risk: lignite availability 80 % ± 4 % (outages); solar yield ± 7 % (weather).
- Simplification: the plant runs regardless of price. A real plant is an option and switches off when the spread is negative.
Why do companies hedge — and how is that different from speculation?
A hedge is a trade that reduces the risk you already have. A lignite plant is naturally long power: it gains when prices rise and loses when they fall. Selling its output forward makes the position flat. A spread hedge (sell power, buy CO₂) locks in the clean dark spread, which is the plant's actual margin.
Hedging does not change the expected profit (look at the mean: almost identical). It narrows the distribution, so bad years become survivable. The price of that is giving up the upside: generators that sold 2022 forward early missed most of the 2022 windfall.
Why bother? (1) Survival: fixed costs, salaries and debt have to be paid in bad years too. (2) Financing: banks lend more, and more cheaply, against hedged cash flows. (3) Planning: budgets, dividends and investments need predictable numbers. (4) Collateral: exchange hedges need margin. In August 2022 some European utilities needed emergency credit lines just to pay margin calls.
Speculation creates new risk on purpose: selling more than you produce (> 100 %), or buying gas because your model says storage is too low. It is allowed, but within strict risk limits (VaR, stop-loss), sized so that being wrong does not hurt the company.
Your task
- Solar park, Base scenario: is the NPV positive? Now try the Low and High scenarios.
- Sign a PPA for ≥ 50 % of the output. Watch the Low–High range in the scenario table shrink.
- Battery: change the cycles per day. Which input drives the value most?
- CCGT: find the capacity payment that makes the Base-case NPV positive.
What is going on?
NPV (net present value) = today's value of all future cash flows, discounted at the WACC, minus the investment. NPV > 0 means the project earns more than investors require. IRR is the discount rate at which NPV = 0. Payback is the year in which the cumulative cash flow turns positive.
Almost all of the uncertainty sits in one input: the long-term price (capture price for solar, daily spread for batteries, spark spread × running hours for gas). That number comes from a long-term fundamental model (PyPSA-type capacity expansion plus scenarios for gas, CO₂, demand and the renewables build-out). A different scenario can turn a project worth hundreds of millions into a write-off.
Cannibalisation: every new solar park lowers midday prices for all the others, so the solar capture rate falls. More batteries compress the spreads they live on. Gas plants run fewer hours but earn more per hour.
PPA as financing. A buyer (a car factory, a data centre, a utility) pays a fixed price for 10–15 years. The developer gives up some upside, but the cash flow becomes bankable: more debt, lower interest, a lower WACC. Many solar and wind parks in Europe are only built thanks to PPAs. Batteries and gas plants use tolling or floor contracts the same way.
M&A. When buying an existing plant, the maximum price is the present value of its future cash flows ("Asset value" tile). Two bidders with different price models, or different abilities to optimise and trade the asset, put different values on the same plant. The one with the better model wins the deal at the right price; the one with the optimistic model wins it at a loss.
Your task
- Read the context and the chart. Only data up to your decision is shown. Make your first call.
- After the reveal, read why it moved and what you could have noticed.
- Finish all 9 questions and check your hit rate and your P&L.
- Bonus: what would you do with the market today (October 2026)?
0 / 0
€0
How to read this quiz (and its limits)
What "correct" means. For forward questions (gas or power for future delivery), we compare your call with the price 10 trading days after the event. If the move is smaller than ±6 %, "no trade" counts as correct. For spot questions (tomorrow's day-ahead), we compare tomorrow's daily DA average with today's; a change below ±10 €/MWh counts as "no trade".
Hypothetical P&L. Forward questions: €1 m position, P&L = ±% move × €1 m. Spot questions: 50 MW for 24 h, P&L = ± price change × 1 200 MWh. No trade = €0.
Data: TTF gas (ICE Endex front-month, day-ahead assessment), EEX DE base forwards, EPEX/OTE day-ahead, ENTSO-E load and renewables, all via the EPC PAP platform. Forwards trade on weekdays only.
Master theses, PhD topics & student projects
Every topic below comes from a real question an energy trading desk has. Each card says what you would build, what data and methods you need, and — most importantly — why a company would pay for the answer.
Your task
- Filter by area or level.
- Pick one topic and read the “why a company cares” line — could you explain it to a trader in one sentence?
Your task
- Tick what you enjoy and what you already know.
- Look at your top three matches — they are highlighted in the topic explorer too.
Tick a few boxes and press the button.
From idea to defended thesis — the EPIC way
What makes a thesis “actionable”?
- A decision: which MW to sell where, hedge or not, build or not.
- A benchmark: what do we do today (naive rule, market forward, vendor forecast)?
- A metric in money: € gained in a back-test, risk reduced, hours saved.
- Honest validation: out-of-sample, no look-ahead (use only data available at decision time!).
Skills that pay off
Must have
Python (pandas, numpy)GitSQL basicsstatisticsclear writingGreat to have
optimisation (LP/MILP)PyPSA / linopyML (LightGBM, PyTorch)power systemstime seriescloud / Sparkpypsa + highspy, download one year of SK & CZ prices from ENTSO-E with entsoe-py, build the merit order of section 2 in Python and compare with reality. You are now ahead of most applicants.Contact
Interested in a topic, internship or project? Contact the lecturer or the EPIC coordinator — write which topic, your study programme and expected thesis year.
Shorter projects
- These fit a semester project, a hackathon or a summer internship (2–8 weeks).
Links, references & FAQ
Everything you need to continue on your own: open data, free modelling tools, books and papers, how this lab was built, and answers to the questions students usually ask.