Skip to content
exuber

Simulation

Simulate innovations with a permanent volatility break

sim_vol_break
sim_vol_break(n, tau = 0.5, ratio = 3, sigma = 6.79, seed = NULL)

Generates i.i.d. Gaussian shocks whose standard deviation shifts permanently from sigma to sigma * ratio at observation tau * n, for use as sim_psy1(..., e = sim_vol_break(...)). This is the non-stationary volatility process (the single break of Cavaliere & Taylor 2007) under which the standard critical values of radf lose size control. The volatility-robust tests (radf_tt, radf_kp, radf_sbz, radf_sign and radf_wb_cv) are designed for it. Stationary conditional heteroskedasticity (sim_vol_garch) is different, because its variance profile is asymptotically flat.

Arguments

n Number of innovations to generate.
tau Break fraction in (0, 1): the shift happens after observation floor(tau * n).
ratio Positive ratio of the post-break to the pre-break standard deviation. ratio > 1 is an upward break, the case in which radf() over-rejects the most, and ratio < 1 is a downward one.
sigma A positive scalar indicating the standard deviation of the innovations.
seed An object specifying if and how the random number generator (rng) should be initialized. It is either NULL or an integer, which is passed to set.seed before the simulation. If you set it, the value is saved as the "seed" attribute of the returned value. The default, NULL, leaves the state of the rng unchanged and returns .Random.seed as the "seed" attribute. Results are reproducible across the parallel and the non-parallel option when you use the same seed.

Value

A numeric vector of length n.

Examples

These examples are copied from the package's own documentation and are run by R CMD check on every release. The printed output (after #>) and the plots were produced by running them against the current package source.

sim_vol_break(199, seed = 1) %>%
  autoplot()
Plot from the sim_vol_break example
# Volatility triples half-way through a PSY bubble series
sim_psy1(n = 200, seed = 123, e = sim_vol_break(199, seed = 123)) %>%
  autoplot()
Plot from the sim_vol_break example

See also

sim_psy1, sim_vol_garch

References

Cavaliere, G. & Taylor, A.M.R. (2007). "Testing for unit roots in time series models with non-stationary volatility." Journal of Econometrics, 140, 919-947. Harvey, D.I., Leybourne, S.J., Sollis, R. & Taylor, A.M.R. (2016). "Tests for explosive financial bubbles in the presence of non-stationary volatility." Journal of Empirical Finance, 38, 548-574.