MEM_X_loglik: MEM-X log-likelihood (with skewness parameter)

View source: R/midas_functions.R

MEM_X_loglikR Documentation

MEM-X log-likelihood (with skewness parameter)

Description

Obtains the log-likelihood of the base MEM, with an asymmetric term linked to past negative returns and an additional X part (for instance, the VIX).

Usage

MEM_X_loglik(param, x, daily_ret, z)

Arguments

param

Vector of starting values.

x

Dependent variable, usually the realized volatility. It must be positive and "xts" object.

daily_ret

Daily returns, which must be an "xts" object, and with the same length of x.

z

Additional daily variable which must be an "xts" object, and with the same length of x.

Value

The resulting vector is the log-likelihood value for each i,t.

References

\insertAllCited

Examples


start_val<-c(alpha=0.10,beta=0.8,gamma=0.05,delta=0.01)
real<-(rv5['2009/2010'])^0.5		# realized volatility
r_t<-sp500['2009/2010']
z<-vix['2009/2010']
sum(MEM_X_loglik(start_val,real,r_t,z))


rumidas documentation built on April 4, 2025, 1:01 a.m.