Sankalp Gilda - IID Got You Down? Resample Time Series Like A Pro | PyData Global 2023

Learn to properly resample time series data using advanced bootstrapping techniques in Python. Overcome autocorrelation challenges with the TS Bootstrap library's multiple methods.

Key takeaways
  • Traditional bootstrapping methods fail with time series data due to autocorrelation and temporal dependencies between data points

  • TS Bootstrap library provides multiple bootstrapping techniques specifically designed for time series:

    • Block bootstrapping
    • Moving block bootstrapping
    • Circular block bootstrapping
    • Residual bootstrapping
    • Markov bootstrapping
    • Sieve bootstrapping
  • Block bootstrapping maintains chronological integrity by resampling blocks of consecutive observations rather than individual points

  • Residual bootstrapping fits a model to obtain residuals, resamples them, and adds them back to fitted values - better for handling changing distributions over time

  • Block length selection is crucial:

    • Can be fixed or drawn from distributions
    • Affects bias-variance tradeoff
    • Different weighting schemes possible within blocks
  • The library offers:

    • Easy pip installation
    • Config-based usage pattern
    • Integration with common statistical models (ARIMA, SARIMA)
    • Enterprise-grade code with testing
    • Modular architecture
    • Extensive documentation
  • Library implementation focuses on preserving:

    • Time dependencies
    • Marginal distributions
    • Short-run dynamics
    • Autocorrelation structure
  • Not recommended for data with:

    • Strong seasonality
    • Significant trends
    • No cyclical components
    • No significant dependencies
  • Planned integration with SKTime for improved uncertainty quantification capabilities

  • Supports both univariate and multivariate time series analysis