Learn R Programming

quantspec (version 1.2-4)

ts-models-ARCH1: Simulation of an ARCH(1) time series.

Description

Returns a simulated time series \((Y_t)\) that fulfills the following equation: $$Y_t = Z_t \sigma_t, \quad \sigma_t^2 = a_0 + a_1 Y_{t-1}^2 + \epsilon_t$$ where \(a_0\) and \(a_1\) are parameters and \(\epsilon_t\) is independent white noise with marginal distribution specified by the parameter innov.

Usage

ARCH1(n, a0, a1, overhead = 500, innov = rnorm)

Value

Return an ARCH(1) time series with specified parameters.

Arguments

n

length of the time series to be returned

a0

parameter

a1

parameter

overhead

an integer specifying the ``warmup'' period to reach an approximate stationary start for the times series

innov

a function with one parameter n that yields n independent pseudo random numbers each time it is called.

Examples

Run this code
plot(ARCH1(100, a0=1/1.9, a1=0.9), type="l")

Run the code above in your browser using DataLab