Skip to content

docs(notebooks): stochastic volatility port - #49

Merged
whilo merged 1 commit into
mainfrom
docs/sv-notebook
Oct 5, 2026
Merged

whilo merged 1 commit into
mainfrom
docs/sv-notebook

Conversation

@whilo

@whilo whilo commented Oct 5, 2026

Copy link
Copy Markdown
Member

PyMC's stochastic volatility model on the last 300 days of its S&P 500 data (MIT, vendored as notebooks/data/sp500.csv). The path is written non-centred (z_t ~ N(0,1), v_t = v_(t−1) + step·z_t): the centred version funnelled NUTS (step R-hat 1.11, ESS 28); non-centred gives R-hat ≈ 1.01, ESS ≈ 440 for the step. Hand-written gradient (incl. digamma for ν), checked against finite differences. Cross-check: on the last day smoothing = filtering, and a particle filter (1000 particles, same model with sites, parameters at their posterior means) agrees with NUTS (0.00261 ± 0.00108 vs 0.00259 ± 0.00111). Adds ~3.5 min to the render.

@whilo
whilo merged commit 6fd8096 into main Oct 5, 2026
7 checks passed
@whilo
whilo deleted the docs/sv-notebook branch October 5, 2026 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant