What is backtesting in forecasting, and how do expanding and sliding windows differ in time series cross-validation?

Quick Overview

Asks what backtesting means for forecasting models and how expanding and sliding training windows differ in time series cross-validation. Tests understanding of rolling-origin evaluation, the trade-off between data volume and adaptivity, and how to keep a backtest free of leakage.

What is backtesting in forecasting, and how do expanding and sliding windows differ in time series cross-validation?

Role: Data Scientist

Category: Statistics & Math

Difficulty: medium

Interview Round: Other

What is backtesting in a forecasting context, and how does an expanding window differ from a sliding window in time series cross-validation? ```hint Copy production Think about how the model will be trained and used once it is deployed, and what the evaluation has to imitate so its accuracy estimate is honest. ``` ```hint What old data costs Ask under what conditions observations from years ago help the next forecast and when they hurt it. ``` ### What a Strong Answer Covers - A definition of backtesting and why ordinary shuffled cross-validation does not fit time series. - How the expanding and sliding windows build the training set at each step. - When each window is the better choice, and the trade-off between data volume and adaptivity. - Practical details that keep a backtest honest, such as matching the forecast horizon and avoiding leakage. ### Follow-up Questions - How would you choose the length of a sliding window? - Your features are only available with a two-day delay. How does that change the backtest setup? - How do you tune hyperparameters inside a backtest without leaking information from the test periods? - Expanding-window errors fall steadily from the first fold to the last. What could explain that, and does it mean the model will keep improving?

Overview: Asks what backtesting means for forecasting models and how expanding and sliding training windows differ in time series cross-validation. Tests understanding of rolling-origin evaluation, the trade-off between data volume and adaptivity, and how to keep a backtest free of leakage.

PracHub logo
General
Nov 25, 2026
mediumData ScientistOtherStatistics & Math
0
0

What is backtesting in a forecasting context, and how does an expanding window differ from a sliding window in time series cross-validation?

What a Strong Answer Covers Guidance

  • A definition of backtesting and why ordinary shuffled cross-validation does not fit time series.
  • How the expanding and sliding windows build the training set at each step.
  • When each window is the better choice, and the trade-off between data volume and adaptivity.
  • Practical details that keep a backtest honest, such as matching the forecast horizon and avoiding leakage.

Follow-up Questions Guidance

  • How would you choose the length of a sliding window?
  • Your features are only available with a two-day delay. How does that change the backtest setup?
  • How do you tune hyperparameters inside a backtest without leaking information from the test periods?
  • Expanding-window errors fall steadily from the first fold to the last. What could explain that, and does it mean the model will keep improving?