Skip to content

PT v6.0 — Hybrid15 Resolution Fix (Production)

Date: April 15-16, 2026 | Status: ✅ Production (PT)

Why this version exists

Portugal v2.0 had shipped on the country-aware refactor, but a follow-up audit during the multi-country feature sprint found that the PT pipeline was still routing through code paths that assumed Spanish-style 15-minute granularity at points where ENTSO-E hourly data was actually being fed in. The result was a working model with sub-optimal feature plumbing — the country argument was being threaded down the call stack but the resolution flag wasn’t always paired with it correctly.

PT v6.0 is the resolution-correctness fix. It plumbs country and resolution cleanly through feature_engineering.pydirect_trainer.pydirect_predictor.py so the hybrid15 feature builder consistently sees 15-min data when (and only when) that’s what’s actually on disk.

What changed

Resolution plumbing

build_direct_features_15min now accepts and respects an explicit resolution argument that’s passed through from the trainer and the predictor on a per-country basis. The same code path that v2.0 used continues to work for ES (which has genuine 15-min data since October 2025); for PT, the hybrid15 approach now correctly mixes hourly historical data with 15-min recent data without silently misaligning lag indices.

The country-aware refactor from M2 already included a country argument on the relevant builders; v6.0 finishes the job by pairing every country with a matching resolution and asserting the combination is consistent with what’s on disk.

Inference parity

direct_predictor.py got matching changes so that the inference-time feature row uses the same resolution-aware code path as training. This is the same class of issue that bit v10.x LSTM (training built features the predictor never matched) and v1.0 multi-country (cross-price features computed at training, zero-filled at inference). The drift guard committed in M0.6 Phase A.2 catches re-occurrences of this whole pattern at inference time.

Results

145-day backtest, 2025-11-01 → 2026-03-25 (same window as the rest of the Phase 5 sprint):

TagDA MAEStrategic MAE
PT v6.021.9424.67
PT v2.0 (previous production)~24.16~31.23
Delta−9.2%−21%

The strategic improvement is the larger headline — a 21% MAE drop at D+2 to D+7 horizons is a much bigger gain than typical hyperparameter or feature-engineering changes deliver. That magnitude is consistent with the diagnosis: the resolution mismatch was systematically degrading the longest-horizon predictions because that’s where the lag-index errors compounded the most.

Key files