HARsimulate: HAR simulation

Description Usage Arguments Value Author(s) References Examples

View source: R/HARSimulate.R

Description

Simulates a HAR model. From using the AR representation of the HAR model.

Usage

1
2
HARsimulate(iLength=1500, vLags = c(1, 5, 22), 
vCoef = c(0.01, 0.36 ,0.28 , 0.28), dSigma = 0.001, show = TRUE)

Arguments

iLength

Integer length of the simulated process.

vLags

Vector of lags for constructing the model, standard is c(1,5,22) which is in line with Corsi(2009)

vCoef

Coefficient vector which will be used to simulate the process.

dSigma

Standard deviation of the error term.

show

Logical to determine whether the output should be shown when done.

Value

Returns an S4 object of type HARSim which contains:

Simulation

The simulated process

Info

Information about the simulation (The input parameters) and the elapsed time.

Author(s)

Emil Sjoerup

References

Corsi, F. 2009, A Simple Approximate Long-Memory Model of Realized Volatility, Journal of Financial Econometrics, 174–196.

Examples

1
2
3
4
5
6
set.seed(123)
#Simulate the process of size 10000
HARSim = HARsimulate(iLength=10000, vLags = c(1, 5, 22),
vCoef = c(0.01, 0.36, 0.28, 0.28), dSigma = 0.001)

HARFit = HARestimate(HARSim@Simulation, vLags = c(1, 5, 22))

HARModel documentation built on Jan. 24, 2019, 5:04 p.m.