Files
EOS/tests
Andreas 78f6dfeb84 fix(elecprice): do not shorten the forecast by the source's own lag
The price series went flat towards the end of the horizon: a constant value
repeated for the last hours, exactly as long as the day-ahead source was behind.

The ETS extrapolation is appended after the last known price, but its length was
computed as `prediction.hours * slots_per_hour - covered_slots`, and
covered_slots is zero once the last known price lies before the run start. The
forecast therefore spanned prediction.hours measured from the last known price
rather than from now, and ended that much too early. Callers reading past that
point got the last record held constant.

With SMARD published up to 2026-09-08 23:45 and a run at 2026-09-09 13:00, the
forecast covered 09-09 00:00 to 09-12 00:00 while the horizon needed 09-12
13:00: 52 quarter-hour slots of flat price, right inside the trailing window the
terminal value curve is derived from.

The length is now measured from the last known value through to
`ems_start + prediction.hours`, which reduces to the previous formula whenever
the source is current. Both the electricity price and the feed-in tariff
provider had the same calculation.
2026-09-09 14:15:05 +02:00
..
2026-02-28 11:31:51 +01:00