Skip to content

Weather Interactions

Overview

Weather drives both electricity demand (heating/cooling) and renewable supply (wind, solar). The EPF pipeline creates interaction features that capture these relationships more directly than raw weather variables alone.

Raw Weather Inputs

Five population-weighted stations across Spain provide hourly observations via Open-Meteo:

VariableUnitPrice Mechanism
Temperature°CDrives heating/cooling demand
Wind speedkm/hDetermines wind generation
Solar radiation (direct + diffuse)W/m²Determines solar generation
Cloud cover%Reduces solar output
PrecipitationmmAffects hydro availability

Degree Day Features

Degree days quantify the gap between actual temperature and comfortable baselines:

Heating Degree Days (HDD)

HDD = max(0, 18°C - temperature)

When temperature drops below 18°C, each degree below adds one HDD. Higher HDD means more heating demand, pushing prices up. The 18°C threshold represents the point where buildings typically need active heating.

Cooling Degree Days (CDD)

CDD = max(0, temperature - 24°C)

When temperature exceeds 24°C, each degree above adds one CDD. Higher CDD means more air conditioning demand, also pushing prices up. The 24°C threshold reflects typical Spanish cooling activation.

Demand-Weather Interactions

Cold × Demand

cold_x_demand = max(0, 15°C - temperature) × demand

This feature captures the intensity of winter heating load. It’s nonzero only when temperature drops below 15°C, and scales with demand level. A cold snap during high-demand hours produces a much larger signal than cold temperatures during low-demand nights.

Temperature Deviation

temp_deviation = temperature - 15°C

A signed feature that’s negative during cold periods and positive during warm periods. Unlike HDD/CDD, it provides a continuous signal without thresholds.

Renewable Generation Interactions

Wind × Wind Share

wind_x_wind_share = wind_speed × wind_share

Combines wind speed (supply potential) with wind generation share (system dependence on wind). When wind is both strong and making up a large share of generation, prices drop significantly. This interaction captures the price suppression effect of abundant wind.

Cloud × Solar Share

cloud_x_solar = cloud_cover × solar_share

When cloud cover is high and the system depends on solar generation (high solar share), prices are pushed up because solar output is curtailed. During nighttime hours (solar share = 0), cloud cover has no price effect.

GHI × Solar Share

ghi_x_solar_share = ghi_wm2 × solar_share

Global Horizontal Irradiance (GHI = direct + diffuse radiation) multiplied by solar generation share. High irradiance combined with high solar share produces cheap electricity. This is the positive counterpart to the cloud-solar interaction.

Precipitation × Hydro

precip_x_hydro = precipitation × (hydro_generation / demand)

Rainfall combined with hydro’s share of generation. Sustained precipitation fills reservoirs, enabling more hydro dispatch and lower prices.

Solar-Specific Features

Global Horizontal Irradiance

ghi_wm2 = direct_radiation + diffuse_radiation

GHI represents the total solar energy available at ground level. It’s a better predictor of solar generation than either direct or diffuse radiation alone.

Clear Sky Index

clear_sky_index = GHI / theoretical_maximum_GHI

Ranges from 0 (completely overcast) to ~1.5 (reflection enhancement). The theoretical maximum is computed from solar geometry (elevation angle, day of year). A clear sky index near 1.0 means solar output matches potential; values below 0.5 indicate significant cloud attenuation.

Why Interactions Matter

Raw weather variables alone miss the economic context. Temperature of 5°C means different things at different times:

  • 5°C at 3:00 AM: Low demand, minimal heating load → small price impact
  • 5°C at 8:00 AM: High demand, morning heating peak → large price increase
  • 5°C in August: Unusual, but AC off → moderate price impact
  • 5°C in January: Normal, overlaps with peak heating demand → strong price signal

Interaction features encode this context directly, allowing gradient boosting models to capture these relationships with fewer splits.