Europe’s energy system is changing fast. As wind and solar power grows, the energy system is facing unique hurdles. One of the biggest is energy flexibility. It’s the ability to adjust electricity generation or consumption when actual conditions differ from forecasts.
Aggregators, energy communities, and technology providers face a clear challenge. They must design, test, and validate market strategies before entering real markets. For which they need a safe and reliable way. Market emulators fill that gap.
In the STUNNED project, R&D NESTER developed a Market Emulator. It provides a modular, reproducible simulation environment. Additionally, it replicates the clearing behaviour of key European markets. Project partners can test ideas, train bidding strategies, and validate system integration before real-world deployment.
But how does it work in detail?
The STUNNED Market Emulator
At a high level, R&D NESTER’s Market Emulator receives bids, applies the clearing rules of each market layer and then return market outputs. These include the accepted quantities and clearing prices, matched trades or balancing activations/rejections.
This is especially valuable in countries where flexibility markets are still evolving. Stakeholders can safely explore “what would happen if…?” scenarios without taking on financial or operational risk.
Why simulate electricity markets?
Electricity trading does not happen in a single market. It runs across several market layers with different timescales. Participants buy or sell energy in the day-ahead market. They adjust positions in the intraday market. And they try to provide balancing services when last-minute deviations occur.
For flexibility providers and aggregators, value often comes from revenue stacking. This means using the same physical flexibility, such as batteries, heating, ventilation or air-conditioning (HVAC) systems or industrial loads. The goal; generate revenue in several markets while remaining compliant with market rules.
A well-designed emulator helps teams answer practical questions:
- What happens if an aggregator moves capacity from the intraday market into the balancing market?
- How do execution rules such as “Fill‑or‑Kill” affect the outcome of a trade?
- Can our software submit bids and interpret results in the formats used by real market systems?
Because R&D NESTER’s Market Emulator is deterministic and reproducible, the same scenario can be replayed many times under the same conditions. This makes it ideal for development, strategy testing, training and interoperability validation.
Within STUNNED, the Market Emulator reproduces the clearing behaviour of three main market components relevant to the pilots: SDAC (day‑ahead energy market), XBID (continuous intraday market) and balancing markets, including Manual Frequency Restauration Reserve (mFRR) and Replacement Reserves (RR) ancillary services.
Each of these components has its own rules, timing and outputs. However, they all serve the same core purpose: turning bids into accepted volumes, prices, trades or activations that can ultimately generate revenues.
1) SDAC (Day‑Ahead): planning tomorrow through an auction
The day‑ahead market works as a coordinated auction. For each 15-minute Market Time Unit, or MTU, supply and demand bids are submitted and collected before gate closure, usually at midday on the day before delivery.
After gate closure, the market is cleared. Supply bids are ordered from the lowest to the highest price, while demand bids are ordered from the highest to the lowest price. The point where the two curves meet determines the Market Clearing Price, or MCP, and the traded quantity for each MTU.
At that clearing price, bids that are “in the money” are accepted, bids that are “out of the money” are rejected, and bids exactly at the clearing price may be partially accepted on a pro rata basis when required.
Figure 1: Simulated Supply and Demand aggregated curves for 12h15, October 1st, 2025, in Spain.
2) XBID (Intraday Continuous): trading as a live market
Intraday continuous trading works differently from the day ahead market. Instead of a single auction, it followers a peer-to-peer trading model based on a shared order book. Market participants submit buy and sell orders, which can be matched continuously, often using a price time priority logic similar to financial markets.
R&D NESTER’s Market Emulator supports several common intraday order types, including:
- NON, where an order can either be matched immediately or remain in the order book
- IOC, where an order must be matched immediately, otherwise it is cancelled
- FOK, where an order must be matched in full immediately, otherwise it is cancelled
- ICE, or iceberg orders, where only part of the total volume is visible and the remaining volume is gradually released as trading takes place
Depending on market conditions, the result may be an immediate trade, a rejection, or insertion into the order book. In the latter case, the order remains active until it is matched later or expires at gate closure.
Figure 2: High-level XBID clearing process of the STUNNED Market Emulator showing bid submission, clearing engine and result publication.
3) Balancing (mFRR / RR) for system stability
Balancing markets help keep the electricity system stable when actual production or consumption differs from scheduled plans. Within STUNNED, R&D NESTER’s Market Emulator covers mFRR and RR balancing services and clears bids against the needs of the transmission system operator, or TSO.
Bids are aggregated by Market Time Unit (MTU) and by direction, meaning upward or downward balancing. The Market Emulator then determines the marginal activation price and accepts the lowest cost bids first. When several bids are placed at the same marginal price, activation can be shared on a pro rata basis.
The resulting outputs are generated using message structures aligned with ENTSO E CIM style reserve bid and activation or rejection documents. This supports downstream system integration and automation.

Figure 3: Example of mFRR Availability and Activation in Portugal (Source: REN 18/02/2026).
From sandbox to pilots: what comes next
The Market Emulator also includes a practical interface that allows bids to be submitted for SDAC, XBID, mFRR and RR. This enables other STUNNED components to interact with it in a way that closely resembles real market systems.

Figure 4 Market Emulator Bid Submission Endpoint Details for mFRR bid
In this way, R&D NESTER’s Market Emulator makes it possible to test participation in energy and flexibility markets safely, repeatedly and under realistic conditions. It helps build confidence in both market strategies and software solutions before they are used in real grid environments.
As Europe moves towards a more flexible, decentralised and renewable based energy system, tools such as the STUNNED Market Emulator become increasingly important. They allow stakeholders to test, refine and validate their approaches in advance, supporting a more confident and effective transition from innovation to real world application.