*! version 1.0.0 09jul2026

Title

urvol bzu -- Boswijk & Zu (2018) adaptive wild-bootstrap likelihood-ratio unit-root test

Syntax

urvol bzu varname [if] [in] , [options]

Model
trend include a constant and linear trend (default: constant only)

noconstant no deterministic term (known zero mean)

cbar(#) GLS local-to-unity constant (default -7 for a constant, -13.5 for a trend)

Lag order
lags(#) fixed AR order p

maxlags(#) maximum p for information-criterion selection

ic(string) selection rule: maic (default), aic, bic or none

Volatility estimator
window(#) exponential-kernel window N (default: leave-one-out cross-validation)

Bootstrap
reps(#) bootstrap replications (default 999)

seed(#) random-number seed

Reporting
graph plot the estimated volatility path

gname(name) name for the saved graph

Description

urvol bzu implements the adaptive unit-root test of Boswijk and Zu
(2018). Unlike wbdf and beare, which only
correct the size of classical tests, bzu exploits the volatility path
to gain power: it non-parametrically estimates the innovation volatility
sigma-hat(t), forms a variance-weighted generalized-least-squares
(GLS) detrended likelihood-ratio statistic, and thereby attains the Gaussian
asymptotic power envelope for the unit-root problem under non-stationary
volatility. Inference is by the wild bootstrap, so no critical-value tables are
needed (the limiting null distribution depends on the volatility path).

bzu is the most powerful member of the family; the power advantage over
DF-type tests grows with the sample size and is largest when the volatility
varies strongly over the sample.

Options

trend / noconstant select the deterministic component. With a
constant, GLS demeaning uses cbar = -7; with a trend, cbar = -13.5
(Elliott, Rothenberg and Stock 1996). cbar(#) overrides these.

lags(#) fixes the autoregressive order p of the short-run
dynamics (an AR(p) for the level, i.e. AR(p-1) in differences). If omitted, p
is chosen by ic() up to maxlags().

window(#) the window N of the double-sided exponential kernel
k(x) = exp(-5|x|) used to smooth the squared residuals into the volatility
path. If omitted it is selected by leave-one-out cross-validation
(Boswijk and Zu 2018, Remark 4.4).

reps(#) bootstrap replications (default 999).

Method (Boswijk & Zu 2018, Algorithm 5.1)

1. Estimate sigma-hat(t) from the OLS residuals of an AR(p-1) for
Dy(t) (a unit root imposed), smoothed by the double-sided exponential kernel
with window N.

2. GLS-demean at cbar to obtain X-hat-d(t) (weighted by
1/sigma-hat(t)^2).

3. The adaptive LR statistic is the t-ratio of delta in the
variance-weighted regression

DX-hat-d(t)/sigma-hat(t) = delta X-hat-d(t-1)/sigma-hat(t) + sum_j gamma_j DX-hat-d(t-j)/sigma-hat(t) + z(t),

which rejects for large negative values.

4. Wild bootstrap: e*(t) = e-hat(t) z*(t), regenerate Y* from the
fitted AR(p) with a unit root imposed, and recompute the statistic reusing the
same sigma-hat(t) (the wild error already carries the volatility, so the
smoother is not re-estimated - Boswijk and Zu 2018). The lower-tail
bootstrap p-value follows.

Examples

. webuse wpi1

. urvol bzu ln_wpi, trend

. urvol bzu ln_wpi, trend lags(4) graph

. urvol bzu ln_wpi, window(15) reps(1999) seed(777)

Stored results

urvol bzu stores the following in r():

Scalars

r(stat) adaptive LR statistic

r(p) one-sided wild-bootstrap p-value

r(lags) AR order p used

r(window) volatility window N

r(cbar) GLS local-to-unity constant

r(N) number of increments

r(reps) bootstrap replications

Macros

r(test) bzu

References

Boswijk, H. P., and Y. Zu. 2018. Adaptive wild bootstrap tests for a unit
root with non-stationary volatility. Econometrics Journal 21(2): 87-113.
doi:10.1111/ectj.12100.

Elliott, G., T. J. Rothenberg, and J. H. Stock. 1996. Efficient tests for
an autoregressive unit root. Econometrica 64(4): 813-836.

Cavaliere, G. 2004. Unit root tests under time-varying variances.
Econometric Reviews 23(3): 259-292.
doi:10.1081/ETC-200028215.

Author

Dr Merwan Roudane

merwanroudane920@gmail.com

https://github.com/merwanroudane