Skip to content
exuber

Simulation

Simulate AR(1) lognormal stochastic-volatility innovations

sim_vol_sv
sim_vol_sv(n, phi = 0.98, tau = 0.1, log_sigma0_sq = 0, seed = NULL)

Generates shocks z_t = sigma_t * eps_t with a persistent AR(1) log-variance, for use as sim_psy1(..., e = sim_vol_sv(...)).

Arguments

n Number of innovations to generate.
phi AR(1) log-variance persistence, in (0, 1).
tau Positive standard deviation of the log-variance innovations.
log_sigma0_sq Starting value of log(sigma^2). Defaults to 0.
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.

Details

log⁡σt2=ϕlog⁡σt−12+ηt,ηt∼iid N(0,τ2)\log\sigma_t^2 = \phi\log\sigma_{t-1}^2 + \eta_t,\quad \eta_t \sim iid\, N(0, \tau^2)

with phi close to, but below, 1 for the "double local-to-unity" near-integrated-variance case studied in the source.

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_sv(199, seed = 1) %>%
  autoplot()
Plot from the sim_vol_sv example

See also

sim_psy1, sim_vol_cir

References

Sarkar, A. & Wells, M.T. (2025). "Double Local-to-Unity." arXiv:2512.06823.