Tools for estimating and forecasting using the Heterogeneous AutoRegressive (HAR) model by Corsi (2009) <doi:10.1093/jjfinec/nbp001> and the Partial-Variances Heterogeneous AutoRegressive model by Bollerslev et al. (2022) <doi:10.1016/j.jeconom.2021.04.013>.
You can install the development version of haR from GitHub with:
# install.packages("devtools")
devtools::install_github("daniGiro/haR")
library(haR)
x <- rnorm(1000)
obj <- har(x)
summary(obj)
#> Call:
#> har(y = x)
#>
#> Residuals:
#> Min 1Q Median 3Q Max
#> F.H. 1 -2.861 -0.6615 0.009671 0.6948 3.317
#>
#> Coefficients:
#> intercept L1 L5 L22
#> F.H. 1 0.03158 -0.05467 0.12196 -0.21994
#>
#> Forecast:
#> F.H. 1
#> Mean 0.09406
#coef(obj)
#print(obj)
#fitted(obj)
#residuals(obj)
#predict(obj)