HEAVYmodel: HEAVY model estimation

View source: R/HEAVYmodel.R

HEAVYmodelR Documentation

HEAVY model estimation

Description

This function calculates the High frEquency bAsed VolatilitY (HEAVY) model proposed in Shephard and Sheppard (2010).

Usage

HEAVYmodel(data, startingValues = NULL)

Arguments

data

an xts object where the first column is a vector of returns and the second column is a vector of realized stock market variation

startingValues

a vector of alternative starting values: first three arguments for variance equation and last three arguments for measurement equation.

Details

Let r_{t} and RM_{t} be series of demeaned returns and realized measures of daily stock price variation. The HEAVY model is a two-component model. We assume r_{t} = h_{t}^{1/2} Z_{t} where Z_t is an i.i.d. zero-mean and unit-variance innovation term. The dynamics of the HEAVY model are given by

h_{t} = ω + α RM_{t-1} + β h_{t-1}

and

μ_{t} = ω_{R} + α_{R} RM_{t-1} + β_{R} μ_{t-1}.

The two equations are estimated separately as mentioned in Shephard and Sheppard (2010). We report robust standard errors based on the matrix-product of inverted Hessians and the outer product of gradients.

Note that we always demean the returns in the data input as we don't include a constant in the mean equation.

Value

The function outputs an object of class HEAVYmodel, a list containing

  • coefficients = estimated coefficients.

  • se = robust standard errors based on inverted Hessian matrix.

  • residuals = the residuals in the return equation.

  • llh = the two-component log-likelihood values.

  • varCondVariances = conditional variances in the variance equation.

  • RMCondVariances = conditional variances in the RM equation.

  • data = the input data.

The class HEAVYmodel has the following methods: plot.HEAVYmodel, predict.HEAVYmodel, print.HEAVYmodel, and summary.HEAVYmodel.

Author(s)

Onno Kleen and Emil Sjorup.

References

Shephard, N. and Sheppard, K. (2010). Realising the future: Forecasting with high frequency based volatility (HEAVY) models. Journal of Applied Econometrics 25, 197–231.

See Also

predict.HEAVYmodel

Examples


# Calculate returns in percentages
logReturns <- 100 * makeReturns(SPYRM$CLOSE)[-1]

# Combine both returns and realized measures into one xts
# Due to return calculation, the first observation is missing
dataSPY <- xts::xts(cbind(logReturns, SPYRM$BPV5[-1] * 10000), order.by = SPYRM$DT[-1])

# Fit the HEAVY model
fittedHEAVY <- HEAVYmodel(dataSPY)

# Examine the estimated coefficients and robust standard errors
fittedHEAVY

# Calculate iterative multi-step-ahead forecasts
predict(fittedHEAVY, stepsAhead = 12)

jonathancornelissen/highfrequency documentation built on Jan. 10, 2023, 7:29 p.m.