HARDataCreationC: Data creation for HAR estimation and forecasting.

View source: R/RcppExports.R

HARDataCreationCR Documentation

Data creation for HAR estimation and forecasting.

Description

Constructs a matrix containing the realized measure and the lagged moving averages according to the supplied lag-vector.

Usage

HARDataCreationC(vRealizedmeasure, vLags)

Arguments

vRealizedmeasure

A vector containing a realized measure of the integrated volatility.

vLags

A vector denoting which lags should be used in the creation c(1,5,22) is in line with Corsi(2009).

Details

None for now.

Value

A matrix containing the data used for HAR estimation or forecasting.

Author(s)

Emil Sjoerup

References

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

See Also

See Also HARestimate

Examples

## Not run: 
## Construct a  vector of size 1000:
vData = rnorm(1000)^2
## Construct a lag-vector
vLags = c(1,5,22)
Example = HARDataCreationC(vData , vLags)
## The dimensions of Example is (978 , 4)

## End(Not run)

emilsjoerup/HARModel documentation built on Jan. 24, 2023, 12:17 a.m.