Description Usage Arguments Value Author(s) References Examples

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

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)
``` |

`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. |

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. |

Emil Sjoerup

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

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))
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.