Research

volarixs - applied AI & ML to finance

Explore our latest posts on machine learning, market dynamics, strategy architecture and design

Feature Engineering
Feb 10, 2026

Shrinking the Feature Space: PCA & Autoencoders

Many features are redundant or noisy. High dimensionality = harder to generalize.

PCA
Autoencoders
Features
9 min read
Strategy
Feb 1, 2026

How Asset Managers Can Implement AI & Machine Learning

Part 2: Infrastructure, Governance & Roadmap. What it takes to implement AI in asset management.

AI Implementation
Governance
Roadmap
18 min read
Deep Learning
Jan 28, 2026

Neural Networks for Market Data: MLPs, CNNs & LSTMs

We are selective with deep learning. Expensive to train, easy to overfit, harder to debug.

Neural Networks
MLP
LSTM
12 min read
Research
Jan 22, 2026

Signal Half-Life and Decay: How Long Do ML Edges Really Last?

If you discover a signal today, how long will it work?

Signal Decay
Half-Life
Edge Persistence
13 min read
Strategy
Jan 15, 2026

How Asset Managers Can Use AI & Machine Learning in Investment Decisions

Part 1: Use Cases & Value. Real-world use cases: idea generation, regime analysis, risk management.

Asset Management
AI & ML
Use Cases
15 min read
Volatility
Jan 5, 2026

Modeling Market Turbulence: GARCH, EGARCH & HAR

Volatility ≠ returns: heavy tails, clustering, mean reversion. Dedicated volatility models are essential.

GARCH
EGARCH
HAR
10 min read
Time Series
Dec 18, 2025

ARIMA, SARIMAX & VAR: When Classical Time-Series Still Win

Explicitly model temporal dependence with transparent structure.

ARIMA
SARIMAX
VAR
9 min read
Benchmarks
Dec 9, 2025

Volatility Forecasting Benchmarks: GARCH, HAR, and ML

Compare GARCH, HAR, and ML models for volatility forecasting.

Volatility
GARCH
HAR
11 min read
Machine Learning
Dec 2, 2025

How Market Regimes Break ML Models

Financial machine learning rarely fails because the model is 'bad'. It fails because the market regime changed.

Regimes
ML
Backtesting
8 min read
Models
Nov 25, 2025

Boosted Trees for Alpha: XGBoost & LightGBM

Gradient boosting dominates tabular ML. Learn how XGBoost and LightGBM deliver strong performance.

XGBoost
LightGBM
Boosting
11 min read
Features
Nov 18, 2025

The 19 Most Important Features for Equity Return Forecasting

Most ML performance in finance doesn't come from the model — it comes from the features.

Features
Alpha
Equities
12 min read
Methodology
Nov 7, 2025

Rolling Windows for Financial ML: A Complete Guide

If you use financial data and your model does not use a rolling window, the backtest is wrong.

Rolling Windows
Time Series
Backtesting
10 min read
Evaluation
Oct 27, 2025

Beyond Sharpe: A Research Framework for Evaluating ML Trading Strategies

Sharpe ratio is dangerously incomplete for ML strategies.

Evaluation
Metrics
Sharpe
15 min read
Models
Oct 8, 2025

Random Forests in Finance: Nonlinear Signals Without the Drama

Tree-based ensembles capture nonlinearities and interactions in market data.

Random Forest
Extra Trees
Trees
10 min read
Models
Sep 15, 2025

From Linear Regression to Lasso: Fast, Interpretable Baselines

Linear and regularized regressions still do serious work in finance.

Linear Regression
Ridge
Lasso
12 min read
Regimes
Aug 22, 2025

Market Regimes, Clusters & HMMs: Teaching Models to Respect the Environment

Episodes where statistical properties are stable enough: high vol vs low vol, risk-on vs risk-off.

K-Means
GMM
HMM
11 min read
Architecture
Aug 3, 2025

Building a Universe-Wide Prediction Grid

An alpha factory needs predictions for every asset at multiple horizons from multiple models.

Prediction Grid
Scaling
Alpha Factory
14 min read
Evaluation
Jun 18, 2025

Regime-Conditioned Performance: Measuring ML Robustness

Most backtests report a single Sharpe. But ML models fail by regime.

Regimes
Robustness
Performance
12 min read
Methodology
November 7, 2025
10 min read

Rolling Windows for Financial ML: A Complete Guide

If you use financial data and your model does not use a rolling window, the backtest is wrong.

This is the most common mistake quants make — and one of the easiest to fix.

This article explains:

  • Why rolling windows are mandatory in time series ML
  • Rolling vs expanding windows
  • Rolling forecast origin vs sliding windows
  • How to construct correct training/test splits
  • How volarixs implements rolling windows in all experiments

1. Why Time Series Require Rolling Windows

In traditional ML:

train on random samples → test on random samples

But in financial time series:

  • data is ordered
  • distributions shift
  • autocorrelation is weak
  • regimes change
  • leakage is easy

Random splits cause your model to "see the future". This inflates Sharpe, R², and accuracy — sometimes by 3–10×.

2. What Is a Rolling Window?

Given data: X₁, X₂, ..., Xₜ

For each training step, you select:

[Xt−L, ..., Xt] → train
Xt+h → predict

Where:

  • L = lookback length
  • h = forecast horizon (1d, 5d, 1m)

You slide the window forward: [Xt−L+1, ..., Xt+1]

Rolling Window Visualization

0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
Training Window
Forecast Horizon
Past Data

Rolling Window Structure:

Time ────────────────────────────────────────────►
      │
      ├─ Past Data (not used)
      │
      ├─ Training Window [63 days]
      │  ┌────────────────────────────┐
      │  │ X₁  X₂  ...  Xₜ            │  ← Fit model
      │  └────────────────────────────┘
      │
      ├─ Forecast Horizon [5 days]
      │  ┌────────────┐
      │  │ Xₜ₊₁ ...  │  ← Predict
      │  └────────────┘
      │
      └─ Future (unknown)

Key: Each step slides the window forward by 1 day
     Model is refit on new window before predicting
          

Rolling windows prevent data leakage by ensuring models only use past data to predict future values. This replicates real trading conditions.

Rolling Window Split Visualizer

0
20
40
60
80
100
120
140
160
180
200
220
240
Training Window (63 days)
Test Window (5 days)
Step: 0 / 184
Time ────────────────────────────────────────────►
      │
      ├─ Past Data (not used)
      │
      ├─ Training Window [63 days]
      │  ┌───────────────────────────────┐
      │  │ X₁  X₂  ...  Xₜ            │  ← Fit model
      │  └───────────────────────────────┘
      │
      ├─ Forecast Horizon [5 days]
      │  ┌──────────┐
      │  │ Xₜ₊₁ ...                    │  ← Predict
      │  └──────────┘
      │
      └─ Future (unknown)

Mode: Rolling (slides forward)

Rolling windows prevent data leakage by ensuring models only use past data. Each step slides the window forward.

3. Rolling vs Expanding Windows

Expanding Window

Starts with initial data, keeps growing:

[X₁ ... Xₜ]

Risk: old data dominates, bad for regime-shifted data.

Rolling Window

Keeps fixed size:

[Xt−L+1 ... Xt]

Better for:

  • non-stationary data
  • regime adaptation
  • ML models with temporal fragility

4. Rolling Forecast Origins (The Gold Standard)

The most correct method:

  1. For each step: Fit model on past L observations
  2. Predict the next h observations
  3. Record prediction
  4. Slide window
  5. Refit model (if required)

This replicates real trading.

5. Avoiding Leakage

The 4 ways ML practitioners leak future data:

  1. Using future volatility to normalise past returns
  2. Using overlapping windows without care
  3. Using full-sample scaling (e.g. MinMax fit on whole dataset)
  4. Using future returns to define features (e.g. realised volatility includes future data if computed incorrectly)

volarixs automatically protects against all of these.

6. Lookback Length: How Much History?

Rules of thumb:

  • 63–126 days for equities
  • 30–90 days for FX
  • 90–180 days for commodities
  • 21–42 days for crypto (faster regimes)
  • 252 days for volatility forecasting

Short windows adapt fast. Long windows stabilise slow cyclical behaviour.

volarixs allows full GUI control per experiment.

7. Cost Considerations

Rolling windows require:

  • repeated model fitting
  • repeated feature transformation
  • repeated scaling

Compute cost grows ~linearly with number of windows. This is why the Prediction Factory uses Prefect + distributed workers.

8. How volarixs Implements Rolling Windows

Every experiment in volarixs:

  • uses time-based splits
  • supports expanding, rolling, and hybrid windows
  • validates window size choices
  • stores window metadata in the run configuration
  • exports each prediction with lookback and horizon fields

This ensures all experiments are:

  • reproducible
  • leak-free
  • comparable
  • regime-labelled
  • ready for the alpha factory

Conclusion

Rolling windows are the foundation of correct financial ML.

Without them, results are misleading.

With them — and proper diagnostics — you can build robust, regime-aware forecasts. volarixs handles the full windowing process automatically, making every experiment production-grade from the start.

Rolling Windows
Time Series
Backtesting
Methodology

Ready to build leak-free models?

Start experimenting with rolling windows in volarixs.