Learn R Programming

bvhar (version 2.2.2)

vhar_lm: 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 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, ...)

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

m

Dimension of the data

obs

Sample size used when training = totobs - month

y0

Multivariate response matrix

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

totobs

Total number of the observation

process

Process: VHAR

type

include constant term (const) or not (none)

HARtrans

VHAR linear transformation matrix

design

Design matrix of VAR(month)

y

Raw input

method

Solving method

call

Matched call

It is also a bvharmod class.

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

Any object

digits

digit option to print

...

not used

object

A vharlse object

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.

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

  • coef.vharlse(), residuals.vharlse(), and fitted.vharlse()

  • summary.vharlse() to summarize VHAR model

Examples

Run this code
# 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