Skip to content

Demand & Generation Mix

Overview

Electricity prices are fundamentally determined by the supply-demand balance. The EPF pipeline engineers features that capture both the overall demand level and the composition of the generation mix, which determines marginal production costs.

Demand Features

Real Demand

The current peninsular electricity demand in MW, sourced from REE indicator 1293. This is the most direct driver of price: higher demand requires dispatching more expensive generation.

Demand Lags

FeatureDescription
demand_lag_1hDemand one hour ago
demand_lag_24hDemand at the same hour yesterday
demand_rolling_24h24-hour rolling average demand

Demand follows strong daily patterns — the 24-hour lag captures “same time yesterday” as a baseline.

Demand Forecast Ratio

demand_forecast_ratio = demand_forecast / demand_lag_24h

Compares the official REE demand forecast against yesterday’s actual demand. A ratio > 1.0 signals expected demand growth; < 1.0 signals expected decline. This forward-looking feature captures anticipated demand changes.

Generation Mix Features

Renewable Share

renewable_share = (wind + solar_pv + solar_thermal) / demand

The fraction of total demand met by renewable generation. Higher renewable shares suppress prices because renewables have near-zero marginal cost.

Typical ranges:

  • Low renewable: 15–25% (calm, cloudy day) → higher prices
  • Average: 35–50% → moderate prices
  • High renewable: 60–80% (windy, sunny day) → low or negative prices

Individual Source Shares

FeatureFormulaPrice Impact
wind_sharewind / demandStrong price suppressor
solar_sharesolar_pv / demandDaytime price suppressor
nuclear_sharenuclear / demandBaseload indicator
thermal_share(combined_cycle + coal + cogen) / demandCost floor indicator

Residual Demand

residual_demand = demand - wind - solar_pv - solar_thermal - nuclear

Residual demand is the portion of total demand that must be met by dispatchable (typically fossil) generation. This is the key price-setting variable:

  • Low residual demand: Only cheap gas or hydro needed → low prices
  • High residual demand: Expensive peaker plants dispatched → high prices
  • Negative residual demand: Renewable curtailment, negative prices possible

Gas Marginal Indicator

gas_marginal = 1 if combined_cycle_generation > 0 else 0

A binary feature indicating whether gas-fired combined cycle plants are running. When gas is on the margin (setting the price), commodity features (gas price, carbon price) become highly relevant.

Interconnection Features

Net Imports

net_imports = france_flow + portugal_flow + morocco_flow

Positive values indicate net imports (foreign supply supplementing domestic generation); negative values indicate net exports. Net imports increase available supply, suppressing prices.

Net Import Share

net_import_share = net_imports / demand

Normalized to demand level. A 2,000 MW import has a larger price impact when demand is 25,000 MW (8%) than when demand is 40,000 MW (5%).

Price Dynamics Features

Price Lags

FeatureLookbackPurpose
price_lag_1h1 hourShort-term momentum
price_lag_2h2 hours
price_lag_3h3 hours
price_lag_24h24 hoursSame hour yesterday
price_lag_48h48 hoursSame hour 2 days ago
price_lag_72h72 hours
price_lag_168h7 daysSame hour last week

The 24h and 168h lags are the most important — electricity prices have strong daily and weekly autocorrelation.

Rolling Statistics

FeatureWindowCaptures
price_rolling_6h6 hoursRecent average
price_rolling_24h24 hoursDaily average
price_rolling_168h7 daysWeekly average
price_std_24h24 hoursDaily volatility
price_std_168h7 daysWeekly volatility
price_range_24h24 hoursDaily peak-to-trough

Momentum

price_change_1h = price - price_lag_1h
price_change_24h = price - price_lag_24h

Positive momentum suggests prices are trending up; negative suggests trending down.

Direct Model-Specific Features

The direct prediction framework adds features known at origin time for each target:

target_hour_price_yesterday = price at (target_hour, yesterday)
target_hour_price_last_week = price at (target_hour, 7 days ago)

These “same hour” features provide a strong baseline: the price at 14:00 tomorrow is correlated with the price at 14:00 today and last week.