Calculator Inputs
Example Data Table
Example monthly series for a forecasting workflow. These values help explain how the split planner behaves.
| Observation | Month | Sales Index | Promo Flag |
|---|---|---|---|
| 1 | Jan 2024 | 102 | No |
| 2 | Feb 2024 | 107 | Yes |
| 3 | Mar 2024 | 111 | No |
| 4 | Apr 2024 | 115 | No |
| 5 | May 2024 | 121 | Yes |
| 6 | Jun 2024 | 125 | No |
| 7 | Jul 2024 | 129 | No |
| 8 | Aug 2024 | 136 | Yes |
Formula Used
Fold train end: Train End(k) = Initial Train + (k × Step Size)
Fold test start: Test Start(k) = Train End(k) + Gap + 1
Fold test end: Test End(k) = Test Start(k) + Test Size - 1
Expanding train size: Train Size = Train End - 1 + 1, so the training window grows as each fold advances.
Rolling train size: Train Start = max(1, Train End - Rolling Window + 1), which keeps a fixed moving history when enough data exists.
Valid fold rule: a split is valid only when Test End ≤ Total Observations.
These rules help preserve time order, avoid leakage, and show how many realistic backtests fit inside the available series.
How to Use This Calculator
- Enter the full number of ordered observations in your series.
- Set the initial training size and the future test size.
- Add a gap if your workflow needs leakage protection.
- Choose expanding or rolling windows, then set the step size.
- Generate the folds and review the table, coverage summary, and chart before model benchmarking.
Frequently Asked Questions
1. What does this tool calculate?
It creates ordered train, gap, and test folds for time series validation. The tool shows valid split ranges, fold counts, coverage, and a visual split map for faster review.
2. Why is a gap useful?
A gap separates training and testing periods. This can reduce information leakage when lagged features, reporting delays, or operational latency might otherwise leak future signals into training.
3. What is the difference between expanding and rolling windows?
Expanding windows keep all earlier history and add new observations each fold. Rolling windows keep a moving historical window, which is useful when older data becomes less relevant over time.
4. Can test windows overlap?
Yes. Overlap happens when the step size is smaller than the test size. That setting may be intentional, but it makes nearby fold scores more correlated.
5. Does the calculator support dated labels?
Yes. You can choose daily, weekly, monthly, or quarterly labels and supply a start date. The tool then converts observation numbers into readable period labels.
6. How should I choose the test size?
Match the test size to your forecasting horizon or evaluation cycle. For example, monthly forecasts might use a 3-month or 6-month test block, depending on the business question.
7. What does unique test coverage mean?
It counts distinct observations that appear in at least one test block. This shows how much of the whole series is actually used for out-of-sample evaluation.
8. Why export CSV or PDF?
CSV makes it easy to reuse split plans in notebooks or review sheets. PDF is useful for stakeholder sign-off, documentation, and method notes in model governance records.