Formula Used
Training observations = floor(available observations × training percentage ÷ 100)
Validation observations = floor(available observations × validation percentage ÷ 100)
Testing observations = available observations − training observations − validation observations
Fold test start = training origin + excluded gap + validation window
Usable training observations = training observations − maximum required warm-up
How to Use
- Enter the total ordered observations and optional dataset dates.
- Select a chronological, expanding, rolling, or walk-forward method.
- Choose percentages, exact counts, or explicit date boundaries.
- Set forecast horizon, window sizes, gap, and step size.
- Add lag, seasonality, missing-period, and leakage controls.
- Calculate, inspect every fold, then export the report.
Example Data
| Scenario | Observations | Method | Initial train | Horizon | Step | Gap |
|---|---|---|---|---|---|---|
| Daily demand | 1,095 | Expanding | 730 | 30 | 30 | 7 |
| Hourly traffic | 8,760 | Rolling | 2,160 | 168 | 168 | 24 |
| Monthly revenue | 120 | Walk-forward | 60 | 12 | 1 | 0 |
Time-Series Splitting Guidance
Time-series observations must preserve chronological order. Random shuffling can expose future information. This creates misleading validation scores.
Expanding windows retain all earlier observations. Rolling windows discard older observations. Choose based on expected concept drift.
A gap separates training from evaluation periods. It protects lagged features near boundaries. The gap should cover important dependencies.
Backtesting simulates repeated production forecasts. Each fold creates a new forecast origin. Review stability across every evaluation window.
Frequently Asked Questions
Why is random shuffling disabled?
Random shuffling mixes past and future observations. That can leak information into training. Chronological splitting better represents real forecasting.
What is an expanding window?
An expanding window keeps all earlier training data. Its training range grows every fold. This suits stable long-term patterns.
What is a rolling window?
A rolling window uses a fixed training length. Older records leave as time advances. This can handle changing relationships.
How large should the test window be?
Match the window to the real forecast horizon. A monthly decision may need thirty days. Longer windows require more data.
When should I use a gap?
Use a gap when features use recent history. It is also useful with delayed labels. The gap should exceed risky dependencies.
Does validation data always matter?
Validation data supports model and parameter selection. Testing should remain untouched until final evaluation. Small datasets may use nested backtesting.
What does partial final window mean?
The remaining observations may not fill another horizon. You can drop or shorten that fold. Keep the decision consistent across experiments.
How do seasonal cycles affect splits?
Incomplete cycles can bias model comparison. Align boundaries with full seasons when practical. Always preserve enough cycles for learning.
How are missing timestamps handled?
The calculator reports missing periods and policies. Actual imputation must occur before modelling. Fit imputation rules inside training folds.