Most bootstrap tutorials quietly assume your observations are independent. Time series are not, and that assumption is exactly where the confidence intervals start lying.
The ordinary bootstrap resamples observations at random. On a time series that shuffles away the very thing you care about: yesterday's value tells you something about today's, and once you break that link the resampled series looks nothing like the real one. The standard errors it hands back are too small, and nothing warns you. tsbootstrap is a time series bootstrap library for Python that resamples while keeping the dependence intact, using the methods the statistics literature actually recommends: block, residual, sieve, and wild resampling, with a conformal layer for prediction intervals on top.
This is a curriculum, not a feature tour. Each article takes one mistake people make when they bootstrap dependent data, shows it failing on real numbers, and then shows the method that fixes it. tsbootstrap is the worked example throughout, but the lessons are about the statistics and the engineering, not the package. You can read any piece on its own; read them in order and they build.
They fall into three tracks. The statistics track answers which resampler survives which broken assumption, and why no single one is best. The engineering track is about scale and trust: how to run millions of replicates without materializing them all in memory, and how to prove the code does what the math says. The adoption track is the honest comparison with what already exists, a library that can tell you when not to use it, and a server your coding agent can call directly.
The library ships today; the series is being written. Start with whichever failure you have hit yourself, or begin at the top and follow the thread.
last substantively updated: July 6, 2026
original series · AR(1), phi 0.7, n 200
one moving-block resample · L = 10
statistics
- 01
- 02
When your errors aren’t equal
The residual bootstrap assumes your model’s errors all come from the same distribution. Feed it a series whose noise grows over time and it quietly shuffles the loud errors in among the quiet ones, averaging the variance away, and hands back a standard error at three-quarters of the truth. Here is the failure on real numbers, and the wild bootstrap: a fix so simple it sounds like a joke. Keep every residual exactly where it is. Just flip its sign at random.