Title: | Model Confidence Set Procedure |
---|---|
Description: | Perform the model confidence set procedure of Hansen et al (2011) <doi:10.3982/ECTA5771>. |
Authors: | Leopoldo Catania & Mauro Bernardi |
Maintainer: | Leopoldo Catania <[email protected]> |
License: | GPL-2 |
Version: | 0.1.3 |
Built: | 2024-10-31 22:17:24 UTC |
Source: | CRAN |
Perform the Model Confidence Set procedure of Hansen et.al (2011) for a given set of loss series belonging to several different models that should be compared
Package: | MCS |
Type: | Package |
Version: | 0.1.3 |
Date: | 2014-07-27 |
License: | GPL-2 |
The R package MCS aims to implement the Model Confidence Set (MCS) procedure recently developed by Hansen et al. (2011). The Hansen's procedure consists on a sequence of tests which permits to construct a set of 'superior' models, where the null hypothesis of Equal Predictive Ability (EPA) is not rejected at a certain confidence level. The EPA statistic tests is calculated for an arbitrary loss function, meaning that we could test models on various aspects, for example punctual forecasts.
Leopoldo Catania & Mauro Bernardi
Maintainer: Leopoldo Catania <[email protected]>
Hansen PR, Lunde A, Nason JM (2011). The model confidence set. Econometrica, 79(2), 453-497. Bernardi M. and Catania L. (2014) The Model Confidence Set package for R. URL http://arxiv.org/abs/1410.8504
## Not run: library(MCS) data(Loss) MCS <- MCSprocedure(Loss=Loss[,1:5],alpha=0.2,B=5000,statistic='Tmax',cl=NULL) ## End(Not run)
## Not run: library(MCS) data(Loss) MCS <- MCSprocedure(Loss=Loss[,1:5],alpha=0.2,B=5000,statistic='Tmax',cl=NULL) ## End(Not run)
Matrix of Losses associated to a forecast series of 2000 observation of the VaR calculated at the 1 confidence level. This is a 2000*10 matrix, the losses are calculated using the Asymmetric Loss function of Gonzales et.al. (2004).
Loss
Loss
a matrix object.
Leopoldo Catania, 2014-07-27
Gonzalez-Rivera G, Lee TH, Mishra S (2004). Forecasting volatility: A reality check based on option pricing, utility function, value-at-risk, and predictive likelihood." International Journal of Forecasting, 20(4), 629-645. ISSN 0169-2070. doi:http://dx.doi.org/10.1016/j.ijforecast.2003.10.003. URL http://www.sciencedirect.com/science/article/pii/S0169207003001420
Calculate the losses associated with level forecasts
LossLevel(realized, evaluated, which = "SE")
LossLevel(realized, evaluated, which = "SE")
realized |
a vector with the realizations of the interest object. |
evaluated |
a vector or a matrix of forecasts |
which |
The loss function to use. possible choices are: |
A matrix with the forecast losses
Leopoldo Catania & Mauro Bernardi
Calculate the losses associated with VaR forecasts.
LossVaR(realized, evaluated, which = 'asymmetricLoss', type = 'normal', delta = 25, tau)
LossVaR(realized, evaluated, which = 'asymmetricLoss', type = 'normal', delta = 25, tau)
realized |
a vector of returns realization |
evaluated |
a vector or a matrix of VaR forecasts |
which |
The chosen VaR loss function. Only |
type |
if |
delta |
if |
tau |
the VaR confidence level |
A matrix with the VaR losses
Leopoldo Catania & Mauro Bernardi
Koenker, R., Bassett, G. (1978). Regression quantiles. Econometrica, 46(1), 33-50.
Gonzalez-Rivera G, Lee TH, Mishra S (2004). Forecasting volatility: A reality check based on option pricing, utility function, value-at-risk, and predictive likelihood.' International Journal of Forecasting, 20(4), 629-645. ISSN 0169-2070. URL http://www.sciencedirect.com/science/article/pii/S0169207003001420.
Calculate the losses associated with volatility (standard deviation) forecasts
LossVol(realized, evaluated, which = "SE1")
LossVol(realized, evaluated, which = "SE1")
realized |
a vector with some realized volatility measure |
evaluated |
a vector or a matrix of volatility forecasts |
which |
The loss function to use. possible choices are: |
A matrix with the forecast losses
Leopoldo Catania & Mauro Bernardi
Koenker, R., & Bassett, G. (1978). Regression quantiles. Econometrica, 46(1), 33-50.
Gonzalez-Rivera G, Lee TH, Mishra S (2004). Forecasting volatility: A reality check based on option pricing, utility function, value-at-risk, and predictive likelihood." International Journal of Forecasting, 20(4), 629-645. ISSN 0169-2070. URL http://www.sciencedirect.com/science/article/pii/S0169207003001420.
Hansen PR, Lunde A (2005). A forecast comparison of volatility models: does anything beat a GARCH(1,1)?" Journal of Applied Econometrics, 20(7), 873-889. ISSN 1099-1255. URL http://dx.doi.org/10.1002/jae.800.
Bernardi M. and Catania L. (2014) The Model Confidence Set package for R. URL http://arxiv.org/abs/1410.8504
Perform the Model Confidence Set procedure of Hansen et.al. (2011)
MCSprocedure(Loss, alpha = 0.15, B = 5000, cl = NULL, ram.allocation = TRUE, statistic = "Tmax", k = NULL, min.k = 3, verbose = TRUE)
MCSprocedure(Loss, alpha = 0.15, B = 5000, cl = NULL, ram.allocation = TRUE, statistic = "Tmax", k = NULL, min.k = 3, verbose = TRUE)
Loss |
A matrix or something coercible to that (as.matrix) which contains the loss series per each competing model |
alpha |
a scalar in (0,1) indicating the confidence level of the tests |
B |
an integer indicating the number of bootstrapped samples used to construct the statistic test |
cl |
A cl object created by calling makecl from the parallel package. If it is not NULL, then this will be used for parallel processing (remember to stop the cl on completion) |
ram.allocation |
Default TRUE, only considered if cl in not NULL. Let the function decide how to allocate memory when cl are supplied ? Usefull when many models are available. |
statistic |
Possible choice are : Tmax and TR. See Hansen et.al. (2011) [pag. 465] and Bernardi M. and Catania L. (2014) for more information. |
k |
The number of block bootstrap length. If NULL (default) the block length is determined by the max number of significants parameters resulted after fitting an AR(p) process on all the Loss differences as suggested by Hansen et.al. (2011) |
min.k |
If k=NULL the minimum length of the the blocks, by default equal to 3 |
verbose |
Information abount the MCS procedure should be printed ? |
A SSM object
Leopoldo Catania & Mauro Bernardi
Hansen PR, Lunde A, Nason JM (2011). The model confidence set. Econometrica, 79(2), 453-497.
Bernardi M. and Catania L. (2014) The Model Confidence Set package for R. URL http://arxiv.org/abs/1410.8504
## Not run: library(MCS) data(Loss) MCS <- MCSprocedure(Loss=Loss[,1:5],alpha=0.2,B=5000,statistic='Tmax',cl=NULL) ## End(Not run)
## Not run: library(MCS) data(Loss) MCS <- MCSprocedure(Loss=Loss[,1:5],alpha=0.2,B=5000,statistic='Tmax',cl=NULL) ## End(Not run)
SSM-methods
## S4 method for signature 'SSM' show(object)
## S4 method for signature 'SSM' show(object)
object |
a SSM object |
Daily logarithmic returns of the STOXX North America 600 (SXA1E) the STOXX Asia/Pacific 600 (SXP1E) the STOXX Europe 600 (SXXP) and the STOXX Global 1800 (SXW1E) from 1992-01-02 to 2014-07-24.
STOXXIndexesRet
STOXXIndexesRet
a xts
object.
Leopoldo Catania, 2014-07-27
www.stoxx.com