How it was built#
The package was built one feature at a time. Each step came with a notebook that explains the feature and checks it on data with a known answer. The notebooks are kept in build order. Each one describes the package as it was at that step, with a note at the top where something has changed since.
Start with the user guide to use the package. Read these to see why each piece works the way it does.
Notebook |
Feature |
What it shows |
|---|---|---|
|
The three preprocessing helpers and why a VECM needs each |
|
|
Aligning the regression matrices, and where deterministic terms go |
|
|
The public API before any sampling, and the identification problem for β |
|
|
The first fit, with β pinned so the posterior is identified |
|
|
Forecasts whose bands widen with the horizon |
|
|
Higher rank and the five deterministic codes |
|
|
Generalised and Cholesky responses, and why they do not decay |
|
|
Post-fit outputs and residual checks |
|
|
Brand spend as a driver, and a counterfactual forecast |
|
|
Shrinking spare lags, and choosing the rank before fitting |
|
|
The shared brand system with known parameters |
|
|
Which series trend and which help predict which, before fitting |
|
|
Posterior evidence on each link, and the sources of forecast uncertainty |
Not covered here#
Some later features have no build notebook. The practitioner guide and the API reference cover them:
exog_lags(driver effects that arrive late) andexog_irf(the response to one more unit of a driver): practitioner guide §9b.Forecasting the levels with drivers: practitioner guide §9c.
A trending driver (
exog_unit_root): notebook 11 §4 and practitioner guide §3a.exog_coint(a driver inside the long-run relation):BayesianVECM.
Running them#
The notebooks are in notebooks/build/ with their outputs saved. Each one
runs in a few minutes with FAST_SAMPLING = True. A weekly CI job runs them
all to check that none has stopped working.