QM003 Hands-on Lab

Move the feature across the historical information boundary

Goal

Use the same synthetic series as the article to compare an admissible feature with two future-aware alternatives.

  • Clean: \(x_t\)
  • Centered: \((x_{t-1}+x_t+x_{t+1})/3\)
  • Future: \(x_{t+1}\)

At forecast origin \(t\), the last two features use information that is not yet available.

Python

python labs/python/qm003_hands_on.py

You can isolate one feature with --feature clean, --feature centered, or --feature future.

R

Rscript labs/r/qm003_hands_on.R all

Use clean, centered, or future instead of all to run one feature.

Interpretation

The exercise is intentionally synthetic. Do not treat the size of the RMSE difference as a general estimate of leakage bias. The point is that a held-out sample is not valid when the feature itself contains future information.