This project presents a time series analysis and forecast of the daily electricity load in Austria. The analysis identifies historical patterns, seasonality, and trends to develop predictive models.
Electricity load forecasting is required for energy management, grid stability, and strategic planning. This project uses statistical modeling to predict electricity demand based on historical data.
The forecasting framework consists of several stages to model the electricity demand:
Raw consumption data is resampled to a daily frequency. The following features were developed to account for deterministic components:
- Trend modeling: Linear and quadratic time indices were integrated. The quadratic term captures non-linear long-term demand trends.
- Calendar effects: Binary dummy variables for months (1-12) and days of the week (1-7). The first category for each set was omitted to avoid perfect multicollinearity in the OLS normal equations.
- Holiday logic: Classification of public holidays and bridge days (e.g., December 24 and 31). These are modeled separately to account for partial industrial and commercial shutdowns in the Austrian energy market.
Ordinary Least Squares (OLS) regression extracts non-stationary components. Removing the deterministic trend and seasonal cycles results in a mean-stationary residual series
The residual series
- Selection: Model order was determined using an AICC (Corrected Akaike Information Criterion) grid search.
- Specification: An AR order of 7 captures the weekly periodicity in the residuals. An MA order of 6 accounts for short-term shocks.
- Validation: The model is stationary and invertible.
The residuals of the ARMA(7,6) process were evaluated using:
- Ljung-Box Q-test: Unadjusted p-values are reported. In models combining deterministic regression with ARMA errors, adjusting degrees of freedom is ambiguous; the unadjusted test provides a conservative estimate of autocorrelation.
- ACF and PACF analysis: Evaluation of autocorrelation in the residual series.
- Normality testing: Assessment of residuals to confirm they are Gaussian for confidence interval derivation.
Out-of-sample forecasts are generated using the Best Linear Predictor (BLP).
- Point forecasts: Derived by combining the deterministic OLS projection and the stochastic ARMA prediction.
-
Confidence intervals: Forecast variance was calculated using
$\psi$ -weights from the MA($\infty$ ) representation, providing confidence bands over the 22-day horizon.
The OLS-ARMA approach models the daily electricity load and provides predictions with defined confidence intervals. The mathematical derivations and coefficient tables support the modeling framework.
- Language: Python
- Data processing:
pandas,numpy - Visualization:
matplotlib,seaborn - Statistical modeling:
statsmodels(OLS, ARMA, hypothesis testing) - Metrics and diagnostics: Residual analysis and diagnostic tests
Austrian-Electricity-Load-Forecast.ipynb: Jupyter Notebook containing the analysis, methodology, and forecasting pipeline.
- Clone the repository.
- Install dependencies via
requirements.txt. - Execute
Austrian-Electricity-Load-Forecast.ipynbto reproduce the analysis.