vhar_lm {bvhar}R Documentation

Fitting Vector Heterogeneous Autoregressive Model

Description

This function fits VHAR using OLS method.

Usage

vhar_lm(
  y,
  har = c(5, 22),
  include_mean = TRUE,
  method = c("nor", "chol", "qr")
)

## S3 method for class 'vharlse'
print(x, digits = max(3L, getOption("digits") - 3L), ...)

## S3 method for class 'vharlse'
knit_print(x, ...)

Arguments

y

Time series data of which columns indicate the variables

har

Numeric vector for weekly and monthly order. By default, c(5, 22).

include_mean

Add constant term (Default: TRUE) or not (FALSE)

method

Method to solve linear equation system. ("nor": normal equation (default), "chol": Cholesky, and "qr": HouseholderQR)

x

vharlse object

digits

digit option to print

...

not used

Details

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.

Value

vhar_lm() returns an object named vharlse class. It is a list with the following components:

coefficients

Coefficient Matrix

fitted.values

Fitted response values

residuals

Residuals

covmat

LS estimate for covariance matrix

df

Numer of Coefficients: 3m + 1 or 3m

p

3 (The number of terms. vharlse contains this element for usage in other functions.)

week

Order for weekly term

month

Order for monthly term

m

Dimension of the data

obs

Sample size used when training = totobs - 22

totobs

Total number of the observation

call

Matched call

process

Process: VHAR

type

include constant term ("const") or not ("none")

HARtrans

VHAR linear transformation matrix: C_{HAR}

y0

Y_0

design

X_0

y

Raw input

It is also a bvharmod class.

References

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.

See Also

Examples

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

[Package bvhar version 2.0.1 Index]