apaPriceSim.GARCH11(IntialPrice, nSims, nPaths, dt, mu, sigma, a, b)
=apaPriceSim.GARCH11(IntialPrice, nSims, nPaths, dt, mu, sigma, a, b)Result
Simulates prices which follow a GARCH(1,1) process. Each row contains an observation, each column a price path.
Syntax
IntialPrice: initial price, e.g. 100.
nSims: number of observations to simulate
nPaths: number of price paths to simulate
dt: time step between two observations, e.g. 1/12 for monthly, 1 for annual and 1/250 for daily prices
mu: expected mean of the noise term, e.g. zero for no drift.
sigma: annualized unconditional (long-run) volatility, e.g. 0.2 for 20%
a: GARCH parameter a (alpha, weight of the squared shocks)
b: GARCH parameter b (beta, weight of the lagged variance)
Algorithm
Each path starts at the unconditional variance and follows the recursion
The price path is
where z(t) are independent standard normal random numbers, Δt is dt and v(t) is the annualized conditional variance. Because the squared shock is annualized with 1/dt in the variance update, the long-run (unconditional) volatility of the simulated returns equals sigma for any time step dt.
Remarks
The continuous price returns are expected to follow a GARCH(1,1) process.
a + b must be smaller than one for the process to be stationary.
