bekk_fit {dccmidas} | R Documentation |
BEKK fit
Description
Obtains the estimation the scalar and diagonal BEKK model
Usage
bekk_fit(r_t, model = "sBEKK", R = 100, out_of_sample = NULL)
Arguments
r_t |
List of daily returns. At the moment, at most 5 assets can be considered |
model |
Valid choices are: 'sBEKK'(scalar BEKK) and 'dBEKK' (diagonal BEKK) |
R |
optional Number of random samples drawn from a Uniform distribution used to inizialize the log-likelihood. Equal to 100 by default |
out_of_sample |
optional A positive integer indicating the number of periods before the last to keep for out of sample forecasting |
Details
Function bekk_fit
implements the estimation of scalar and diagonal BEKK models. For details on BEKK models, see Engle and Kroner (1995)
Value
bekk_fit
returns a list containing the following components:
assets: Names of the assets considered.
mat_coef: Matrix of estimated coefficients of the model, with the QML standard errors.
obs: The number of daily observations used for the estimation.
period: The period of the estimation.
H_t: Conditional covariance matrix, reported as an array. It refers to the in-sample period.
est_time: Time of estimation.
llk: The value of the log-likelihood at the maximum.
H_t_oos: Conditional covariance matrix, reported as an array, for the out-of-sample period, if the param 'out_of_sample' is used.
Days: Days of the (in-)sample period.
References
Engle RF, Kroner KF (1995). “Multivariate simultaneous generalized ARCH.” Econometric theory, 11(1), 122–150. doi:10.1017/S0266466600009063.
Examples
require(xts)
# close to close daily log-returns
r_t_s<-diff(log(sp500['2010/2019'][,3]))
r_t_s[1]<-0
r_t_n<-diff(log(nasdaq['2010/2019'][,3]))
r_t_n[1]<-0
r_t_f<-diff(log(ftse100['2010/2019'][,3]))
r_t_f[1]<-0
db_m<-merge.xts(r_t_s,r_t_n,r_t_f)
db_m<-db_m[complete.cases(db_m),]
colnames(db_m)<-c("S&P500","NASDAQ","FTSE100")
# list of returns
r_t<-list(db_m[,1],db_m[,2],db_m[,3])
bekk_est<-bekk_fit(r_t,model="sBEKK")
bekk_est$mat_coef