DK1 battery trading

jacobazu.github.ioBacktest
Forecast
Buy Tue 20 Oct
12-15
2.1 MWh
Sell
17-19
1.9 MWh
Expected, after costs
169 €
Fees and wear: 38 €
1 day in 20 below
36 €
Worst stress test: errors 3 times as big (worst 5%), -325 €
Ensemble forecast for Tue 20 Oct, with the hours to buy and sell
Orders
HourOrderMWh€/MWh90% range
12:00-13:00Buy1.0012972-185
13:00-14:00Buy1.0013066-186
14:00-15:00Buy0.1113574-191
17:00-18:00Sell0.90239188-296
18:00-19:00Sell1.00242202-304
Buy Tue 20 Oct
12-15
2.1 MWh
Sell
17-19
1.9 MWh
Expected, after costs
239 €
Fees and wear: 38 €
1 day in 20 below
85 €
Worst stress test: errors 3 times as big (worst 5%), -332 €
BMT-X forecast for Tue 20 Oct, with the hours to buy and sell
Orders
HourOrderMWh€/MWh90% range
12:00-13:00Buy1.0012771-180
13:00-14:00Buy1.0012564-185
14:00-15:00Buy0.1113682-189
17:00-18:00Sell0.90273224-336
18:00-19:00Sell1.00279241-341
Buy Tue 20 Oct
12-15
2.1 MWh
Sell
17-19
1.9 MWh
Expected, after costs
181 €
Fees and wear: 38 €
1 day in 20 below
27 €
Worst stress test: errors 3 times as big (worst 5%), -349 €
LEAR-X forecast for Tue 20 Oct, with the hours to buy and sell
Orders
HourOrderMWh€/MWh90% range
12:00-13:00Buy1.0011655-174
13:00-14:00Buy1.0011245-170
14:00-15:00Buy0.1112261-182
17:00-18:00Sell1.00225175-291
18:00-19:00Sell0.90225188-296
Buy Tue 20 Oct
03-05, 12-13
2.1 MWh
Sell
08-09, 18-19
1.9 MWh
Expected, after costs
109 €
Fees and wear: 38 €
1 day in 20 below
12 €
Worst stress test: errors 3 times as big (worst 5%), -210 €
XGBoost-X forecast for Tue 20 Oct, with the hours to buy and sell
Orders
HourOrderMWh€/MWh90% range
03:00-04:00Buy1.00160120-192
04:00-05:00Buy0.11160113-196
08:00-09:00Sell1.00254196-317
12:00-13:00Buy1.0014483-206
18:00-19:00Sell0.90221175-293
P&L since launch, after costs (Ensemble)
681 €
6 days since 13 Oct 2026, before costs 910 €
Last day
115 €
Mon 19 Oct
Share of perfect foresight
90%
What a plan on the real prices would make
Max drawdown
0 €
Days below the 1 in 20 floor: 0 of 6
P&L since launch, added up
P&L per day (Ensemble)
Each forecast, the same battery
ForecastDaysAfter costsShare of perfect
Ensemble6681 €90%
BMT-X6583 €77%
LEAR-X6680 €90%
XGBoost-X6654 €87%
Every day since launch (Ensemble)
DayExpected1 in 20 floorCostsEarnedPerfect
Mon 19 Oct169 €45 €38 €115 €124 €
Sun 18 Oct134 €-15 €38 €39 €75 €
Sat 17 Oct136 €-26 €38 €25 €27 €
Thu 15 Oct153 €-1 €38 €200 €200 €
Wed 14 Oct278 €118 €38 €282 €290 €
Tue 13 Oct51 €-83 €38 €20 €38 €

Planned the day before on the live forecast, paid the real price. After the Nord Pool fee (0.055 €/MWh) and wear (20 €/MWh sold). No grid tariffs or taxes.

P&L since launch, after costs (BMT-X)
583 €
6 days since 13 Oct 2026, before costs 812 €
Last day
106 €
Mon 19 Oct
Share of perfect foresight
77%
What a plan on the real prices would make
Max drawdown
0 €
Days below the 1 in 20 floor: 1 of 6
P&L since launch, added up
P&L per day (BMT-X)
Each forecast, the same battery
ForecastDaysAfter costsShare of perfect
Ensemble6681 €90%
BMT-X6583 €77%
LEAR-X6680 €90%
XGBoost-X6654 €87%
Every day since launch (BMT-X)
DayExpected1 in 20 floorCostsEarnedPerfect
Mon 19 Oct201 €113 €38 €106 €124 €below the floor
Sun 18 Oct95 €-69 €38 €38 €75 €
Sat 17 Oct131 €-33 €38 €26 €27 €
Thu 15 Oct158 €63 €38 €128 €200 €
Wed 14 Oct325 €191 €38 €264 €290 €
Tue 13 Oct38 €-122 €38 €21 €38 €

Planned the day before on the live forecast, paid the real price. After the Nord Pool fee (0.055 €/MWh) and wear (20 €/MWh sold). No grid tariffs or taxes.

P&L since launch, after costs (LEAR-X)
680 €
6 days since 13 Oct 2026, before costs 909 €
Last day
113 €
Mon 19 Oct
Share of perfect foresight
90%
What a plan on the real prices would make
Max drawdown
0 €
Days below the 1 in 20 floor: 0 of 6
P&L since launch, added up
P&L per day (LEAR-X)
Each forecast, the same battery
ForecastDaysAfter costsShare of perfect
Ensemble6681 €90%
BMT-X6583 €77%
LEAR-X6680 €90%
XGBoost-X6654 €87%
Every day since launch (LEAR-X)
DayExpected1 in 20 floorCostsEarnedPerfect
Mon 19 Oct215 €50 €38 €113 €124 €
Sun 18 Oct130 €-35 €38 €39 €75 €
Sat 17 Oct117 €-58 €38 €25 €27 €
Thu 15 Oct160 €-22 €38 €189 €200 €
Wed 14 Oct324 €136 €38 €279 €290 €
Tue 13 Oct56 €-123 €38 €35 €38 €

Planned the day before on the live forecast, paid the real price. After the Nord Pool fee (0.055 €/MWh) and wear (20 €/MWh sold). No grid tariffs or taxes.

P&L since launch, after costs (XGBoost-X)
654 €
6 days since 13 Oct 2026, before costs 883 €
Last day
74 €
Mon 19 Oct
Share of perfect foresight
87%
What a plan on the real prices would make
Max drawdown
0 €
Days below the 1 in 20 floor: 0 of 6
P&L since launch, added up
P&L per day (XGBoost-X)
Each forecast, the same battery
ForecastDaysAfter costsShare of perfect
Ensemble6681 €90%
BMT-X6583 €77%
LEAR-X6680 €90%
XGBoost-X6654 €87%
Every day since launch (XGBoost-X)
DayExpected1 in 20 floorCostsEarnedPerfect
Mon 19 Oct129 €6 €38 €74 €124 €
Sun 18 Oct178 €11 €38 €39 €75 €
Sat 17 Oct162 €-6 €38 €25 €27 €
Thu 15 Oct151 €-20 €38 €200 €200 €
Wed 14 Oct188 €64 €38 €281 €290 €
Tue 13 Oct84 €-79 €38 €35 €38 €

Planned the day before on the live forecast, paid the real price. After the Nord Pool fee (0.055 €/MWh) and wear (20 €/MWh sold). No grid tariffs or taxes.

What Tue 20 Oct earns on the Ensemble plan if it goes like this

Worst past day: the worst forecast error of the last 250 days. Peak doesn't come: selling hours fall to the median price. Negative prices: -50 €/MWh 11-15. Errors x3: the worst 5% with errors three times as big.

What Tue 20 Oct earns on the BMT-X plan if it goes like this

Worst past day: the worst forecast error of the last 250 days. Peak doesn't come: selling hours fall to the median price. Negative prices: -50 €/MWh 11-15. Errors x3: the worst 5% with errors three times as big.

What Tue 20 Oct earns on the LEAR-X plan if it goes like this

Worst past day: the worst forecast error of the last 250 days. Peak doesn't come: selling hours fall to the median price. Negative prices: -50 €/MWh 11-15. Errors x3: the worst 5% with errors three times as big.

What Tue 20 Oct earns on the XGBoost-X plan if it goes like this

Worst past day: the worst forecast error of the last 250 days. Peak doesn't come: selling hours fall to the median price. Negative prices: -50 €/MWh 11-15. Errors x3: the worst 5% with errors three times as big.

How it works

Pick the forecast at the top: the ensemble (the default, the average of BMT-X, LEAR-X and XGBoost-X) or one model alone, all from my DK1 price forecasts (R), made before the noon auction the day before. The plan, P&L, risk and stress tests then use that forecast. The cost and loss limit backtests are for the ensemble.

The plan is a mixed-integer program (scipy): 2 MWh / 1 MW, 90% round trip, one cycle a day. It includes the Nord Pool fee and 20 €/MWh wear, so it only trades when the spread pays for them. Without costs it gives the same plan as the R version on 363 of 375 days.

Risk: past days' 24-hour forecast errors, scaled by an EWMA of their volatility, run through the plan.

The P&L counts from 13 Oct 2026.