This function fits VHAR using OLS method.
vhar_lm(
y,
har = c(5, 22),
include_mean = TRUE,
method = c("nor", "chol", "qr")
)# S3 method for vharlse
print(x, digits = max(3L, getOption("digits") - 3L), ...)
# S3 method for vharlse
logLik(object, ...)
# S3 method for vharlse
AIC(object, ...)
# S3 method for vharlse
BIC(object, ...)
is.vharlse(x)
# S3 method for vharlse
knit_print(x, ...)
vhar_lm()
returns an object named vharlse
class. It is a list with the following components:
Coefficient Matrix
Fitted response values
Residuals
LS estimate for covariance matrix
Numer of Coefficients
Dimension of the data
Sample size used when training = totobs
- month
Multivariate response matrix
3 (The number of terms. vharlse
contains this element for usage in other functions.)
Order for weekly term
Order for monthly term
Total number of the observation
Process: VHAR
include constant term (const
) or not (none
)
VHAR linear transformation matrix
Design matrix of VAR(month
)
Raw input
Solving method
Matched call
It is also a bvharmod
class.
Time series data of which columns indicate the variables
Numeric vector for weekly and monthly order. By default, c(5, 22)
.
Add constant term (Default: TRUE
) or not (FALSE
)
Method to solve linear equation system.
(nor
: normal equation (default), chol
: Cholesky, and qr
: HouseholderQR)
Any object
digit option to print
not used
A vharlse
object
For VHAR model
$$Y_{t} = \Phi^{(d)} Y_{t - 1} + \Phi^{(w)} Y_{t - 1}^{(w)} + \Phi^{(m)} Y_{t - 1}^{(m)} + \epsilon_t$$
the function gives basic values.
Baek, C. and Park, M. (2021). Sparse vector heterogeneous autoregressive modeling for realized volatility. J. Korean Stat. Soc. 50, 495-510.
Bubák, V., Kočenda, E., & Žikeš, F. (2011). Volatility transmission in emerging European foreign exchange markets. Journal of Banking & Finance, 35(11), 2829-2841.
Corsi, F. (2008). A Simple Approximate Long-Memory Model of Realized Volatility. Journal of Financial Econometrics, 7(2), 174-196.
coef.vharlse()
, residuals.vharlse()
, and fitted.vharlse()
summary.vharlse()
to summarize VHAR model
# Perform the function using etf_vix dataset
fit <- vhar_lm(y = etf_vix)
class(fit)
str(fit)
# Extract coef, fitted values, and residuals
coef(fit)
head(residuals(fit))
head(fitted(fit))
Run the code above in your browser using DataLab