Skip to content

Bias Tracking

What Is Forecast Bias?

Forecast bias is the tendency to systematically over- or underpredict prices. Unlike random errors (which average to zero over time), bias represents a persistent directional error that can be detected and corrected.

Mean Error (ME) = average(predicted_price - actual_price)
ME > 0 → Systematic overprediction
ME < 0 → Systematic underprediction
ME ≈ 0 → No bias (errors are balanced)

Why MAE-Trained Models Have Bias

Models trained with MAE loss predict the conditional median rather than the conditional mean. For right-skewed electricity price distributions, the median is lower than the mean, creating systematic negative bias (underprediction) during high-price periods.

This is expected behavior, not a bug. The bias correction system compensates for it post-prediction.

Bias Correction Mechanism

Step 1: Compute Hourly Bias

Rolling 30-day mean error is computed per hour-of-day:

For each hour h (0–23):
recent_errors = predicted[h] - actual[h] over last 30 days
bias[h] = mean(recent_errors)

This captures hour-specific bias patterns. For example, the model might consistently underpredict at hour 14 (solar peak) but overpredict at hour 3 (night minimum).

Step 2: Apply Correction

Raw predictions are adjusted by subtracting the estimated bias:

corrected_price = raw_prediction - bias[target_hour]

If bias[14] = -2.5 (model underpredicts by 2.5 at hour 14), the correction adds 2.5 EUR/MWh to the prediction.

Step 3: Negative Price Clipping

After bias correction, prices are checked against historical negative price frequency:

For each hour h:
If fewer than 5% of historical prices at hour h were negative:
clip predictions at hour h to minimum 0 EUR/MWh

Most hours rarely see negative prices, so this prevents bias correction from pushing predictions below zero unrealistically.

Bias Monitoring Dashboard

The evaluation API provides bias tracking data:

MetricDescription
Hourly MEMean error per hour of day (last 30 days)
Daily ME trendRolling daily mean error to detect drift
Bias magnitudeMaximum
Correction appliedWhether bias correction is active

When Bias Signals Problems

Small, stable bias is normal and handled by the correction system. Large or rapidly changing bias signals deeper issues:

PatternLikely Cause
Sudden uniform shiftData source change (API schema update, new indicator version)
Growing bias over timeModel drift — market structure has changed
Hour-specific spikeFeature availability change at specific hours
Weekend-only biasHoliday calendar or weekend demand pattern change

Bias vs Accuracy

A model can have low bias but poor accuracy (errors are large but balanced in both directions). Conversely, a biased model can have reasonable accuracy if the bias is small relative to typical error magnitude.

Low bias + low MAE → Ideal
Low bias + high MAE → Random errors, model underfitting
High bias + low MAE → Systematic shift, correctable
High bias + high MAE → Fundamental model problem

The bias correction system targets the “high bias + low MAE” quadrant, converting it to “low bias + low MAE” through the hourly adjustment.