monitor_cusum implements Homm & Breitung (2012)'s CUSUM real-time
monitoring procedure: fix a training window [1, T*] assumed free
of exuberance, then compare the standardized cumulative sum of
post-training first differences, S_t = (y_t - y_{T*}) /
sigma_hat_t, against a closed-form boundary
c_t * sqrt(t), c_t = sqrt(b_alpha + log(t / T*)), flagging
the first date it is breached.
Arguments
- data
A univariate or multivariate numeric time series object, a numeric vector or matrix, or a data.frame. A column may have leading and/or trailing
NAvalues (an uneven/unbalanced panel where series enter or exit the sample at different times) – those periods are filled withNAinbadf/bsadfand excluded from that series'adf/sadf/gsadf. InteriorNAvalues (a gap in the middle of a series) are not supported. When any series is padded this way, the panel statistic (bsadf_panel/gsadf_panel) is not available and is returned asNA, with a warning.- r_star
The end of the training window: a fraction in
(0, 1)of the sample (default0.5), or an integer observation count if>= 1.- b_alpha
The boundary constant (HB's eq. 29). Default
4.6, HB's own one-sided asymptotic calibration for a 5\ (their Section 3); this is an asymptotic upper bound on the false- alarm probability (Chu, Stinchcombe & White 1996), not an exact size, so it is typically conservative in finite samples. Ignored whenboundary = "finite".- boundary
"asymptotic"(default) usesb_alphadirectly."finite"instead looks up HB's own finite-sample boundary constant (their Table 8) fromleveland the realized training length/monitoring-horizon ratio –levelmust then be one of0.90,0.95,0.99.- level
Nominal confidence level when
boundary = "finite"(default0.95); ignored whenboundary = "asymptotic".- type
"standard"(default) for Homm & Breitung (2012)'s original CUSUM statistic, or"kernel"for Astill, Harvey, Leybourne, Taylor & Zu (2023)'s volatility-robust "CUSUMV" variant.- N
Bandwidth/window length for the one-sided kernel spot-variance estimator when
type = "kernel". Default20, the authors' own empirically-recommended value (their Section 3: "setting H = 20 delivered a procedure with the best trade-off" between false-alarm robustness and power). Ignored whentype = "standard".- kernel
Kernel for the spot-variance estimator when
type = "kernel","gaussian"(default) or"uniform". Ignored whentype = "standard".
Value
An object of class monitor_cusum_obj: a list with the
monitoring-region statistic path (S) and boundary, the
training window length T_star, and alarm/alarm_date
(the first breach, NA if none).
Note
The boundary is closed-form throughout: a fixed asymptotic
constant (boundary = "asymptotic", b_alpha = 4.6) or a
published finite-sample table lookup (boundary = "finite", Homm
& Breitung (2012)'s Table 8) – no simulation, no separate cv function.
Unlike radf_monitor (Family A, a recursive ADF-family
statistic requiring a wild bootstrap to calibrate its boundary), this
is a structurally different statistic – a standardized running sum,
not a recursive regression – with an asymptotic closed-form boundary
(Chu, Stinchcombe & White 1996's inequality, HB's eq. 28): no
bootstrap, no simulation, no dependence on the data beyond the running
variance estimate itself.
type = "kernel" instead uses Astill, Harvey, Leybourne, Taylor &
Zu (2023)'s volatility-robust modification ("CUSUMV"): each first
difference is standardized by its own one-sided kernel spot-variance
estimate (their eq. 6-7) instead of a single running variance, before
cumulating. Their Corollary 1 establishes the same boundary
function delivers a controlled asymptotic false-alarm rate even under
time-varying volatility, unlike the standard CUSUM statistic, which
requires homoskedasticity for its own size-control result to hold.
References
Homm, U., & Breitung, J. (2012). Testing for speculative bubbles in stock markets: A comparison of alternative methods. Journal of Financial Econometrics, 10(1), 198-231.
Chu, C. S. J., Stinchcombe, M., & White, H. (1996). Monitoring structural change. Econometrica, 64(5), 1045-1065.
Astill, S., Harvey, D. I., Leybourne, S. J., Taylor, A. M. R., & Zu, Y. (2023). CUSUM-based monitoring for explosive episodes in financial data in the presence of time-varying volatility. Journal of Financial Econometrics, 21(1), 187-227.
See also
radf_monitor for the recursive-ADF (Family A)
monitoring alternative.
Examples
# \donttest{
res <- monitor_cusum(sim_data$sim_psy1, r_star = 0.5)
#> Warning: Unknown or uninitialised column: `sim_psy1`.
#> Error: unsupported class
print(res)
#> Error: object 'res' not found
# }
