Time series analysis

Time series forecasting without a script

A time series asks two questions: what is the pattern (trend, season, noise) and what comes next. Magic Stat answers both from a column of dates and a column of values — decomposition, autocorrelation, stationarity tests and a forecast with its confidence band, plus a model comparison that does not flatter itself.

The honest part

Forecasting and decomposition, and the in-sample trap

The module decomposes the series (STL: trend, seasonal, residual), describes its dependence (ACF and PACF), tests whether it is stationary (ADF and KPSS, on the level and on the first difference) and forecasts it with a model chosen among Holt-Winters, Theta, ARIMA/SARIMA, ETS, a random-forest lag model, the naive benchmarks or an ensemble.

The trap in forecasting is choosing the model by in-sample fit. Magic Stat compares models by how they do on data they did not see — a holdout split or, better, walk-forward cross-validation across several origins — and reports RMSE, MAE and MAPE from that evaluation.

It is for the classical, univariate and seasonal setting. If you need structural VARs, state-space models with custom components, or the full Box-Jenkins methodology with manual order and diagnostics, statsmodels in Python or a dedicated package is the honest recommendation; the econometrics module covers the intervention-and-breaks side of time series.

What it does

What Magic Stat gives you for time series

How it works

From two columns to a forecast

  1. Load the series. a time/date column and a value column. Numeric timestamps are read with the correct unit, and duplicates are aggregated.
  2. Set the frequency. daily, weekly or monthly — the horizon is then expressed in those units.
  3. Look before forecasting. decomposition, ACF/PACF, stationarity and seasonality tell you what the model has to cope with.
  4. Choose and compare. pick a model, or let the app choose by holdout RMSE, and check the out-of-sample error.
  5. Export. the forecast and diagnostic figures go to the gallery; the analysis and its tables go into the report.
Options

The settings, in the dialog

Models: Holt-Winters · Theta · ARIMA (auto AIC) · SARIMA (auto seasonal) · ETS · Random Forest (lags) · Ensemble (average) · Naive · Seasonal Naive. Selection: by holdout RMSE or by AIC.

Evaluation: holdout (one split) or walk-forward (rolling origin, 2–20 folds). Horizon: up to 120 steps. Seasonal period is set in the dialog.

Frequently asked

Time series questions, answered honestly

How should I compare the models?

By out-of-sample error, not in-sample fit. Use the walk-forward evaluation with several rolling origins — it is the more honest test — and look at RMSE and MAE rather than only MAPE, which is unstable when values are near zero.

Which model should I start with?

For a seasonal series, Holt-Winters or SARIMA; for a series with little structure, Theta and the naive benchmarks are hard to beat. If the comparison shows a naive benchmark winning, that is the honest answer — report it.

Does it test stationarity?

Yes — ADF and KPSS, on the level series and on the first difference. They are reported together because a unit-root test and a stationarity test can disagree, and the disagreement is informative.

Can it forecast several series at once?

No — it is a univariate (or seasonal) forecasting module. For multivariate models such as VAR or VECM, the econometrics module and its cointegration tab are the place to look, and for anything beyond that a dedicated package is the honest recommendation.

Is my data uploaded somewhere?

No. The analysis runs on your machine; the only automatic signal is an anonymous installation counter with nothing in it.

Econometrics → Linear regression →