volarixs - applied AI & ML to finance

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

Feature Engineering
Jun 2, 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
May 24, 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
May 20, 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
May 14, 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
May 7, 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
Apr 27, 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
Apr 9, 2026

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

Explicitly model temporal dependence with transparent structure.

ARIMA
SARIMAX
VAR
9 min read
Benchmarks
Mar 31, 2026

Volatility Forecasting Benchmarks: GARCH, HAR, and ML

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

Volatility
GARCH
HAR
11 min read
Machine Learning
Mar 24, 2026

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
Mar 17, 2026

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
Mar 10, 2026

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
Feb 27, 2026

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
Feb 16, 2026

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
Jan 28, 2026

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
Jan 5, 2026

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
Dec 12, 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
Nov 23, 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
Oct 8, 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
February 27, 2026
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
  • nearby observations are correlated
  • 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)

Because every experiment in volarixs is split on time and run walk-forward — train on the past, predict forward, then advance — the split-level leakage in points 1–3 is designed out by default. Feature-level leakage (point 4) still depends on how a feature is defined, which is why the discipline below matters.

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.

In volarixs the time window is set per experiment in the wizard, alongside the datasets, feature sets, model and target horizon.

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:

  • splits on time and runs walk-forward, with epochs over the rolling window
  • records the time window in the run configuration
  • produces multi-horizon predictions (1d / 5d / 21d / 63d and beyond) for the chosen target
  • stores results — model, datasets, targets, train/test R² and status — against the run
  • carries the regime context the run was generated under

The point of that record is to make experiments:

  • reproducible
  • comparable across runs on the same data
  • regime-aware
  • ready to graduate from a manual experiment into the 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 runs the windowing this way by default, so every experiment starts from a leak-resistant, walk-forward baseline rather than a random split.

Rolling Windows
Time Series
Backtesting
Methodology

Get new research in your inbox

Applied AI & ML for the buy-side — new research on signals, regimes, and strategy design, straight to your inbox. No noise.

Ready to build leak-free models?

Start experimenting with rolling windows in volarixs.