Learn R Programming

RobGARCHBoot (version 1.2.0)

ROBUSTGARCHloss_RCPP: Loss function used in GARCH robust estimation.

Description

Loss function used in GARCH (Generalized Autoregressive Conditional Heteroskedastic) robust estimation.

Usage

ROBUSTGARCHloss_RCPP(theta, r, sigma2)

Arguments

theta

Vector of robust estimated (or initial values) parameters obtained from ROBUSTGARCH function.

r

Vector of time series returns.

sigma2

robust squared volatility estimation (or initial value of squared volatility)

Value

Returns the value of the loss function

Details

This function is used in the robust estimation. We can use it to evaluate the value of the loss function using several values of the vector parameters (theta)

References

Boudt, Kris, Jon Danielsson, and S<U+00E9>bastien Laurent. Robust forecasting of dynamic conditional correlation GARCH models. International Journal of Forecasting 29.2 (2013): 244-257.

Truc<U+00ED>os, Carlos, Luiz K. Hotta, and Esther Ruiz. Robust bootstrap forecast densities for GARCH returns and volatilities. Journal of Statistical Computation and Simulation 87.16 (2017): 3152-3174.

Examples

Run this code
# NOT RUN {
# Using the Bitcoin daily returns, we estimate the parameter of the GARCH model in a robust way
param = ROBUSTGARCH(returnsexample)
# We can evaluate the loss function using the estimated parameters
ROBUSTGARCHloss_RCPP(param[2:3], returnsexample, param[1]/(1-param[2]-param[3]))
# }

Run the code above in your browser using DataLab