The Technical Excellence Award

ML Models That Outperform Commercial Energy Price Forecasts

MLOPS | Time Series | Energie

Mohamed Toumi

TLDR

In-House ML for European Energy Price ForecastingBuilding a custom, transparent machine learning system that consistently outperforms expensive, "black-box" commercial market forecasts.

  • The Challenge: Energy trading relies heavily on day-ahead spot price forecasts where a few percentage points mean millions of euros, yet companies depend on costly external providers that lack transparency and customization.
  • The Solution: Designed and deployed a complete in-house ML forecasting pipeline from scratch using state-of-the-art time series algorithms (TiDE, Temporal Fusion Transformer). It runs on a highly reliable, deployment-agnostic MLOps infrastructure (Docker, Kubernetes, Airflow, MLflow, CI/CD).
  • The Result: The in-house models beat leading commercial forecasts on accuracy while drastically reducing costs and giving the trading team full transparency. This success led to scaling the approach across three more critical forecasting use cases for risk management.

Project Introduction

Beating the Market: ML Models That Outperform Commercial Energy Price Forecasts

In European energy markets, accurate price forecasting is everything. A few percentage points of improved accuracy on day-ahead spot prices can translate into millions in better trading decisions. Yet most energy companies depend on expensive commercial forecast providers with black-box solutions, limited customization and no transparency on methodology.

At Acciona Energia, one of Europe's leading renewable energy producers, I took on the challenge of building something better, from scratch.

I designed and deployed a full in-house ML forecasting system covering the entire lifecycle: automated data ingestion from multiple market and grid sources, domain-specific feature engineering, model training with state-of-the-art time series algorithms (TiDE, Temporal Fusion Transformer, etc.), daily prediction serving, and continuous performance monitoring.

But technical accuracy alone isn't enough. Production reliability is what separates a good model from a real business tool. The pipeline runs on a robust MLOps infrastructure: Docker and Kubernetes for containerization and orchestration, Airflow for scheduling, MLflow for experiment tracking and model registry, Hydra for configuration management, and GitHub Actions for CI/CD. The architecture is deployment-agnostic, running both on-premise and on cloud environments.

The result: our in-house models consistently outperformed leading commercial forecasts on day-ahead electricity spot prices, delivering superior accuracy at a fraction of the cost, while giving the trading team full control and transparency over every prediction.

Building on this success, the approach was extended to three additional forecasting use cases: grid tension days, long-term spot prices, and fast reserve pricing, each with direct business impact on trading and risk management.

What client problem does this project solve?

Acciona Energia, a major renewable energy producer, needed accurate day-ahead electricity spot price forecasts to optimize its trading decisions on European energy markets. The existing approach relied on expensive commercial forecast providers, which offered limited customization, black-box models, and insufficient accuracy, directly impacting trading margins and risk management.

AI Solution Implemented (technical details)

I designed and deployed an end-to-end ML forecasting pipeline for day-ahead spot prices, built entirely in-house. The system covers the full ML lifecycle: automated data acquisition from multiple market sources, feature engineering tailored to energy market dynamics, model training using advanced time series algorithms (Prophet, TiDE, TFT, Scikit-Learn), prediction serving, and continuous monitoring.
The solution leverages a robust MLOps stack: containerization (Docker, Kubernetes), orchestration (Airflow), experiment tracking and model registry (MLflow), configuration management (Hydra), and CI/CD automation (GitHub Actions). The architecture supports both on-premise and cloud deployment, ensuring flexibility and scalability. Everything is documented and designed for team collaboration via Confluence, Jira, and GitHub.

What are the quantifiable results (ROI, KPIs, etc.) of this project?

Forecast accuracy: outperforming commercial providers where it matters most

The in-house deep learning model was rigorously benchmarked against two leading commercial energy price forecast providers over the same evaluation period.
The in-house model achieved the best performance on the metrics most critical for energy trading:

- RMSE: 22.98 vs. 24.19 (Commercial A) and 25.77 (Commercial B) => a 5% to 11% reduction in overall prediction error. This is the key metric for trading, as it heavily penalizes large forecast misses that lead to costly decisions.
- SMAPE: 71.75 vs. 72.49 and 80.58 => best relative accuracy across all providers.
- R²: 0.623 vs. 0.582 and 0.526 => the in-house model explains 7% to 18% more price variance, giving traders a more reliable signal.

The model also outperforms Commercial B across every single metric, and matches or exceeds Commercial A on the metrics with the highest business impact (RMSE, SMAPE, R²).

Beyond accuracy: operational and strategic impact

- Cost reduction: replaced dependency on commercial forecast subscriptions costing several thousands of euros per year with a fully owned, maintainable solution.
- Transparency: traders now have full visibility into model logic, features, and confidence levels, bringing a decisive advantage over black-box commercial outputs.
- Scalability: the proven pipeline architecture was replicated across three additional forecasting use cases (grid tension days, long-term spot prices, fast reserve pricing), multiplying business value with minimal incremental effort.
- Production reliability: fully automated daily runs with monitoring, ensuring consistent delivery without manual intervention.

Proof of excellence: why should you win this award?

  • One person. One pipeline. Commercial-grade results.
    What makes this project stand out isn't just the outcome — it's the conditions under which it was achieved.
    As a solo data scientist, I owned every layer of this project: from raw data acquisition to production-grade deployment. There was no dedicated ML engineering team, no data platform team, no pre-existing infrastructure. Every component — data pipelines, feature engineering, model development, MLOps stack, monitoring — was designed, built, and maintained by one person.
    Technical depth across the full stack. This wasn't a notebook experiment. The production system runs on Docker and Kubernetes, orchestrated with Airflow, tracked with MLflow, configured with Hydra, and automated through GitHub Actions CI/CD. It operates reliably on both on-premise and cloud environments, with daily automated runs and zero manual intervention. Building this required not just data science expertise, but genuine software engineering and DevOps discipline.
    State-of-the-art modeling on a real-world problem. Energy spot price forecasting is notoriously difficult — driven by weather, geopolitics, grid dynamics, and market behavior. I implemented a TiDE deep learning architecture with RevIN normalization, specifically adapted to the non-stationary nature of energy prices. The model was benchmarked transparently against two commercial providers and outperformed both on the most business-critical metrics.
    Measurable, proven ROI. The project replaced costly commercial subscriptions, gave traders full transparency over predictions, and was successfully replicated across three additional forecasting use cases — multiplying impact without multiplying cost.
    Reproducibility as a principle. Every experiment is tracked, every configuration versioned, every pipeline reproducible. This is not a one-off success — it is a system designed to improve continuously.
    This project is proof that one skilled freelancer, with the right expertise and engineer