Skip to main content

Code

Ready-to-use implementations of the methods from my papers, so you can apply them to your own data. These are method packages, not replication files. If you use one, please cite the corresponding paper (each repository has a “How to cite” section).

bubble-test-tv-volatility (MATLAB)

MATLAB implementation of the wild-bootstrap sup-DF / sup-BZ / union test for explosive bubbles that remains valid under time-varying volatility.

bubble-test-hf-volatility (MATLAB)

MATLAB implementation of the TVPWY test for explosive bubbles that uses jump-robust high-frequency volatility to devolatize low-frequency prices, with real-time date-stamping of explosive episodes.

dm-different-frequencies (MATLAB)

MATLAB implementation of the two-sample test for comparing the accuracy of forecasts observed at different sampling frequencies (e.g. a monthly forecast against a quarterly one).

truncated-andrews-bandwidth (R)

R package implementing the truncated Andrews bandwidth for the CUSUM and QS mean-shift tests, with Algorithm 1 for size-calibrated selection of the truncation threshold. Install with remotes::install_github("yang-zu/truncated-andrews-bandwidth").

adaptive-cointegration-test (Ox)

Ox implementation of the adaptive test for cointegration with nonstationary volatility: the Johansen trace test and the spot-covariance-weighted adaptive LR test, each with wild- and volatility-bootstrap p-values (bivariate system, no-cointegration null).

adaptive-unit-root-test (Ox)

Ox implementation of the adaptive wild-bootstrap unit-root test (DF-GLS and adaptive LR, robust to nonstationary volatility).

volatility-adjusted-dm (MATLAB)

MATLAB implementation of the volatility-adjusted Diebold–Mariano tests for equal forecast accuracy that remain valid under heteroskedasticity.

gdm-unstable-accuracy (MATLAB)

MATLAB implementation of the generalized Diebold–Mariano test for equal average forecast accuracy when relative accuracy varies over time.

sv-return-distribution-test (MATLAB)

MATLAB implementation of the specification test for stochastic-volatility models based on the return distribution (L2 density and Cramér–von Mises tests).

sv-volatility-density-test (MATLAB)

MATLAB implementation of the specification test for stochastic-volatility models based on the volatility density, recovered by deconvolution of squared returns (L2 tests against the model spot-variance density and the stationary marginal), with optional GMM estimation.

spot-volatility-hf (Ox)

Ox implementation of the noise-robust local two-scale (TSRV) spot-volatility estimator for high-frequency prices, with a local realised-volatility estimator and data-driven tuning.

variance-function-breaks (MATLAB)

MATLAB implementation of the truncated local-least-squares estimator of the innovation variance function in autoregressions with structural breaks and explosive segments.