- Live lab
- Internship
2021–2022 · Time series · Statistical modelling · Internship · Sri Ramachandra, Dec 2021–Feb 2022
Time-Series Forecasting of Financial Data
Stationarity testing, ACF/PACF analysis and AR, MA, ARMA, ARIMA and SARIMAX forecasting on historical datasets, including Air Passengers and Dogecoin. Play the live demo to watch the model forecast step by step.
- Python
- statsmodels
- ARIMA
- SARIMAX
- pmdarima
- Pandas
- NumPy
- Matplotlib
Headline
p = 0.142 → 3e-14
Dogecoin made stationary by log-differencing (ADF test)
On this page
At a glance
p = 0.142
Dogecoin ADF test, raw series
p ≈ 3e-14
After log-differencing
0.0475
ARIMA(2,1,2) in-sample RMSE (Dogecoin)
(5,1,4)
Order chosen by auto_arima (AIC −18,573)
0.0915
30-day hold-out RMSE vs mean 0.275
01 · Problem
Problem
The problem
Highly volatile price series break the assumptions most forecasting models are built on. The aim was not a trading model but a careful look at how far classical time-series methods can go on real, noisy data.
Research question
Does additional model complexity actually improve forecasting performance?
02 · Approach
Approach
Each series was tested for stationarity (rolling statistics and the Augmented Dickey-Fuller test), then made stationary by log transform, moving-average and exponential smoothing, and differencing. ACF and PACF plots guided the choice of AR and MA orders, and AR, MA and combined ARIMA models were compared by residual sum of squares and RMSE. auto_arima then searched orders by AIC, and a 30-day hold-out tested an ARMA model on unseen data.
Live lab
Try it
What you're looking at
The Air Passengers series forecast one step at a time: at each step the model is refitted on the history so far and its forecast is scored against a naive one, so in-sample fit cannot flatter it.
Loading demo…
03 · Results
Results
Differencing took the Dogecoin series from non-stationary (ADF p = 0.142) to strongly stationary (p ≈ 3×10⁻¹⁴). ARIMA(2,1,2) on the log series gave an in-sample RMSE of 0.0475, and auto_arima selected order (5,1,4). On Air Passengers, ARIMA(2,1,2) cut the residual sum of squares from 1.50 (AR) and 1.47 (MA) to 1.03.
04 · Limitations
Limitations
What it does not show
On the 30-day hold-out, the ARMA(1,5) forecast was nearly flat and its RMSE of 0.0915 was large against a test-period mean of 0.275. Price series like this carry hard limits on predictability, and in-sample fit says little about future accuracy.
Lessons
A better in-sample fit is not the same as a better forecast. Judge models on held-out data and against a naive baseline. The live demo does exactly that: it refits at every step and scores each forecast against a naive one.
Data & reproducibility
Data and reproducibility
Air Passengers (144 monthly observations, 1949–1960) and a Dogecoin daily series (2,760 observations, December 2013 to July 2021), plus a DOGE-INR series from Yahoo Finance (December 2017 to February 2022).
Source code is not public.