Back to Blog

Building a Day-Ahead Electricity Market Simulator: Replicating EUPHEMIA

February 21, 2026

Over the past two weeks we have been developing a simulator that replicates how the Iberian day-ahead electricity market (OMIE) clears prices, achieving sub-1 EUR/MWh average error against actual market outcomes for all of 2024.

What is EUPHEMIA?

EUPHEMIA (Pan-European Hybrid Electricity Market Integration Algorithm) is the algorithm that clears day-ahead electricity markets across 25+ European countries daily. It determines which power plants get dispatched and at what marginal price.

The challenge towards solving it comes when addressing complex orders. A simple merit-order model, stacking offers from cheapest to most expensive until demand is met, gets you ~80% of the way there. But real markets have complex orders with minimum income conditions (MIC), ramp constraints, and international exchanges limited by available transfer capacity.

This creates a paradox: a unit might be "in merit" (cheap enough to clear) but still get rejected because clearing it would not generate enough revenue to cover its costs, for instance. These complex conditions make the problem much harder mathematically speaking, which forced us to develop an iterative approach to this mixed integer problem.

How it works

The algorithm typically converges in 3-5 iterations. The tricky part is that removing one unit changes prices, which can make other units viable or non-viable, hence the iteration. Through JIT-compiled clearing loops we solve the whole year in 5 minutes on a regular laptop.

Results

The results against actual OMIE prices indicate a yearly mean absolute error (MAE) of 0.88 EUR/MWh, correlation >0.99 across 8,760 hours. The remaining error comes from slightly imprecise international exchanges and the iterative solver, which may result in a local optimum.

OMIE Price Analysis - EUPHEMIA (MIC) - May 2024

What's next

Such a clearing algorithm is just one of the building blocks behind The Map. We are building the whole pipeline bridging the electricity market and the grid. Stay tuned for more news!