Solar forecasting explained · Manuscript submitted, open code
Make_Stationary: does deseasonalization improve solar and wind forecasts?
In brief
- The benchmark tests whether removing the daily and annual cycle (deseasonalization; six methods, including two ELM operators, ELM = extreme learning machine, a neural network with fixed random hidden weights) improves the final forecast of nine Corsican energy and weather series, 1 to 6 hours ahead.
- A more stationary residual (what is left once the cycles are removed, its mean and variance no longer drifting with the hour or the season) is not a more predictable one: the gain depends on the signal (about 3 points of nRMSE, root mean square error made relative so without unit, for hourly wind speed), and raw forecasting stays strongest for the other variables.
- M. Agoundedemba, C. Voyant, M. Despotović, L. A. Garcia-Gutierrez and G. Notton, manuscript submitted; MATLAB code and data, doi:10.5281/zenodo.21490743.
- New to these ideas? Read deseasonalization, difference to trend and ratio to trend in the glossary, then which forecast for which signal and how to evaluate a forecast against persistence.
Does deseasonalization help solar and wind forecasting? The Make_Stationary benchmark
What does this benchmark examine?
The benchmark separates deseasonalization quality from downstream forecasting utility. A more stationary residual does not by itself establish a better forecast. The associated paper is submitted, not presented here as accepted.
Cyril Voyant · Updated 2026-10-20
Make_Stationary (M. Agoundedemba, C. Voyant, M. Despotović, L. A. Garcia-Gutierrez, G. Notton; software doi:10.5281/zenodo.21490744; companion manuscript submitted, 2026) tests whether deseasonalization improves the final solar and wind forecast, and shows that a more stationary residual is not necessarily a more predictable one.
Questions about deseasonalization and forecasting
Does deseasonalization always improve renewable energy forecasting?
No. Removing a recurring cycle can improve residual stationarity without improving the final forecast. Evaluate the full pipeline: fit the seasonal component on training data, forecast the residual, reconstruct the signal, and compare with forecasting the raw signal on identical test samples and horizons.
How can I test whether preprocessing helps?
Use a chronological training/test split, prevent information from future observations entering the seasonal estimate, and keep scoring windows and baseline definitions fixed. Report absolute forecast errors alongside a persistence-relative metric such as NICEᵏ. Test both the raw and preprocessed pipelines, rather than selecting a transform from a stationarity diagnostic alone.
These answers summarize the public benchmark protocol. The companion manuscript remains submitted; this guide does not turn its status into a published journal article.
Key finding
A cleaner residual is not a more predictable one. On nine energy and weather series from Corsica, forecast 1 to 6 hours ahead, removing the daily and annual cycle gives the most stationary residuals with the rolling median and the two ELM operators, but this ranking does not carry over to forecast accuracy.
- Forecasting gains depend on the signal and the horizon. They appear mainly for strongly cyclic variables at longer horizons (up to 4 percentage points of nRMSE for 30-min GHI and 3 points for hourly wind speed), are neutral for already regular signals at short horizons, and are mildly detrimental for PV power, total electrical load and wind power.
- PHASE, the lighter of the two frugal ELM operators, has the best average forecasting rank (2.55, against 2.68 for RAW, the raw signal forecast directly) and is the only preprocessing whose mean gain over RAW stays non-negative at every horizon, for both solar and wind variables. For the solar variables alone, RAW keeps the best average rank (2.31).
- Deseasonalization is therefore a selective preprocessing option, not a universal step.
All the figures above come from the README of the public repository (the documentation shown on its front page), which reproduces Tables II and III of the manuscript. The manuscript is submitted to a journal. Numerical experiments were not re-run for this page.
Stationarity and forecast quality
A residual diagnostic and a forecast evaluation answer different questions. Compare reconstructed forecasts against RAW on the same samples and horizons; do not select preprocessing from stationarity diagnostics alone. The two rankings below, published with the code, show the gap.
Two rankings of the same six methods
Average rank over the nine variables, 1 = best, so a shorter bar is better. Switch from the quality of the residual to the accuracy of the rebuilt forecast and watch the order change.
| Method | Stationarity | Forecast, solar | Forecast, wind | Forecast, all |
|---|---|---|---|---|
| MEDIAN | 2.33 | 3.89 | 3.76 | 3.85 |
| LOESS | 2.81 | 5.39 | 5.94 | 5.57 |
| PHASE | 3.07 | 2.75 | 2.12 | 2.55 |
| PROJECTION | 3.89 | 3.64 | 3.82 | 3.70 |
| FOURIER | 4.33 | 3.03 | 1.88 | 2.66 |
| RAW | 4.56 | 2.31 | 3.47 | 2.68 |
The theory
Deseasonalization removes the recurring daily and annual cycle, forecasts what is left, and adds the cycle back. The question is whether the final forecast improves, not whether the residual looks more stationary.
Decomposition
$$Y_t=S_t+R_t,$$ $$\hat Y_{t+h}=\hat S_{t+h}+\hat R_{t+h}.$$Here \(Y_t\) is the series, \(S_t\) its recurring cycle, \(R_t\) the residual and \(h\) the horizon. The split is additive: a ratio to trend such as the clear-sky index would be singular at night for GHI and PV. Two normalized phases locate each sample in the day and in the year, with \(T_d\) and \(T_y\) the daily and annual periods in samples (\(T_d=24\) and \(T_y=365\times24\) for hourly data):
$$\varphi_t=\frac{t \bmod T_d}{T_d},\qquad \psi_t=\frac{t \bmod T_y}{T_y}.$$Each phase enters as a cosine–sine pair, so that 23 h and 0 h, or 31 December and 1 January, stay close:
$$\mathbf p_t=\big[\cos(2\pi\varphi_t),\ \sin(2\pi\varphi_t),\ \cos(2\pi\psi_t),\ \sin(2\pi\psi_t)\big].$$In plain text: phi_t = (t mod T_d)/T_d, psi_t = (t mod T_y)/T_y, p_t = [cos 2πphi_t, sin 2πphi_t, cos 2πpsi_t, sin 2πpsi_t] (repository README, section 2).
The two ELM operators
- PROJECTION: an ELM (fixed random tanh hidden layer, ridge output weights) reads lagged values and \(\mathbf p_t\); at inference the lags are set to their training mean, so the output depends only on the phase: \(\hat S_t=f(\bar{\mathbf y},\mathbf p_t)\).
- PHASE: the same ELM with \(\mathbf p_t\) as its only input: \(\hat S_t=f(\mathbf p_t)\).
Benchmarks of \(\hat S\): crossed diurnal × annual Fourier regression, LOESS and a ±10-day rolling-median template. Each residual, and the raw signal, is forecast by an ELM and by a linear AR model; all scores (normalized RMSE nRMSE, mean absolute error nMAE and bias nMBE, coefficient of determination R², NICE) are computed on \(\hat Y\) in physical units.
Assumptions and validity
\(S\) is fitted on training data only. One region, three years, horizons up to 6 hours. The repository documents three differences with the manuscript (fixed ridge, selection among 300 hidden layers with an affine recalibration of \(S\), mixed sigmoid and Gaussian forecasting neurons); see below.
Terms used on this page
- Stationary series
- a series whose mean, variance and memory do not drift with the hour or the season.
- Deseasonalization
- removing the recurring daily and annual cycle \(S_t\) to keep the residual \(R_t\); here additively, \(Y_t=S_t+R_t\).
- RAW
- the reference case with no deseasonalization: the raw signal is forecast directly.
- PROJECTION, PHASE
- the two ELM operators proposed by the study, which estimate the cycle from the phase of the day and of the year.
- FOURIER
- a crossed regression on daily and annual sine–cosine harmonics.
- LOESS
- locally estimated scatterplot smoothing: a smooth curve made of small weighted regressions fitted around each point.
- MEDIAN
- a rolling-median template: for each hour, the median of the same hour over a ±10-day window.
- ELM
- extreme learning machine: one hidden layer of fixed random weights; only the output weights are fitted, in closed form.
- AR
- linear autoregression: the next value as a weighted sum of past values, fitted by ordinary least squares.
- Ridge
- least squares with a penalty \(\lambda\lVert\beta\rVert^2\) that keeps weights small; \(\lambda=10^{-4}\) in the code.
- nRMSE, nMAE, nMBE
- root mean square error, mean absolute error and mean bias error, each divided by the mean observation \(\bar Y\); no unit, lower is better (0 for the bias).
- R²
- coefficient of determination; 1 is a perfect fit.
- NICE
- error relative to simple persistence: 0 is perfect, 1 equals persistence (guide).
- pp
- percentage point: 0.20 to 0.16 in nRMSE is a gain of 4 pp.
- PACF
- partial autocorrelation function; the study sums its absolute value over 48 lags: lower means less structure left in the residual.
- Spectral entropy
- how flat the spectrum of the residual is, from 0 to 1; higher means weaker periodic forcing.
- Largest Lyapunov exponent
- rate at which nearby trajectories diverge (Rosenstein method); lower after preprocessing means deterministic forcing was removed.
- GHI, PV, EDF
- global horizontal irradiance; photovoltaic; Électricité de France, which publishes the Corsican grid data.
- README
- the documentation file shown on the front page of a code repository.
Data
Nine variables over 2021–2023, all included in the repository (about 5 MB):
- Global horizontal irradiance (GHI) and 2 m temperature at Ajaccio, at 30 min and 1 h;
- 10 m wind speed at Bastia, at 30 min and 1 h (Météo-France);
- island-wide PV power, wind power and total load, hourly (EDF Corsica open data).
Reproduce
- Get the code:
git clone https://github.com/cyrilvoyant/Make_Stationary.git, or the archived release, doi:10.5281/zenodo.21490744 (10.5281/zenodo.21490743 always points to the latest version). - Data: nothing to download; the nine series are in
Data/(about 5 MB). - Run the four stages below in MATLAB, each from its own folder.
- Compare your ranks with Tables II and III of the README (shown above), after reading the documented differences between paper and code.
MATLAB with the Econometrics and Signal Processing toolboxes. The Parallel Computing Toolbox is optional and only speeds up runs.
Optimization/optimization_all_variables.m % 1. grid search of lags L and neurons m
Deseasonalization/main_deseasonalization.m % 2. 6 methods x 9 variables -> *_FULL.csv, Metrics.csv
Forecasting/main_forecast_GHI_and_GHI_30min.m % 3a. GHI, with clear-sky references
Forecasting/main_forecasting_PV_WT_PT_WS_T2M.m % 3b. other variables
Run each stage from its own folder. Two different functions share the name Make_stationary_all_variables.m, and having both folders on the MATLAB path silently shadows one of them.
Paper vs code: documented differences
The repository states these openly. Read them before comparing your numbers with the manuscript.
- The ridge parameter is fixed at λ = 10⁻⁴ in the code. Only (L, m) are grid-searched, whereas the paper describes a ridge search.
- The final pipeline keeps the best of 300 random hidden layers using lag-24 residual autocorrelation, then applies an affine recalibration of S. The recalibration is not in the paper's equations.
- The forecasting ELM uses mixed sigmoid and Gaussian neurons, a detail not written in the paper.
- The plotting utility
daviolinplot.mhas no license header, and its license is not verified.
Scope
This is a benchmark protocol, not evidence that ELM deseasonalization is better in general. Results come from one region, one three-year period and horizons of at most 6 h. The general lesson is methodological: judge a preprocessing step by the accuracy of the final forecast against the raw signal, not by how stationary the residual looks.
Cite and reuse
M. Agoundedemba, C. Voyant, M. Despotovic, L. A. Garcia-Gutierrez, G. Notton, Does Deseasonalization Improve Renewable Energy Forecasting? A Comparative Benchmark, manuscript submitted, 2026.
Software: doi:10.5281/zenodo.21490744 · GitHub repository · Citation file · GPL-3.0, archived in Software Heritage.
Related: persistence and BLEND · PV forecasting with ELM · NICE metrics · cyclostationary persistence operators.
See also: difference to trend and ratio to trend in a worked course example · which forecast for which signal, with sliders · the course, slide by slide.
Need this method on your own data? Collaborate: a joint answer to a call for projects, a research contract with Mines Paris – PSL, or academic work with a clear valorization objective.
Links
| Article | M. Agoundedemba, C. Voyant, M. Despotović, L. A. Garcia-Gutierrez, G. Notton, Does Deseasonalization Improve Renewable Energy Forecasting? A Comparative Benchmark, manuscript submitted, 2026 |
|---|---|
| Code | github.com/cyrilvoyant/Make_Stationary |
| Archive (all versions) | doi:10.5281/zenodo.21490743 (Zenodo) |
| Software Heritage | permanent archive of the repository |
| The story, for everyone | Prévision solaire : faire simple (in French) |
| The approach | Understand before you compute |
| Author | Cyril Voyant (Mines Paris – PSL, O.I.E.) · ORCID · www.cyrilvoyant.com |