Vector Autoregressive (VAR) with Constant and Optional Exogenous Regressors (X) Fit, Filter, Forecast and Simulation functions for use with multivariate GARCH models.
varxfit(X, p, constant = TRUE, exogen = NULL, robust = FALSE, gamma = 0.25,
delta = 0.01, nc = 10, ns = 500, postpad = c("none", "constant", "zero", "NA"),
cluster = NULL)
varxfilter(X, p, Bcoef, exogen = NULL, postpad = c("none", "constant", "zero", "NA"))
varxforecast(X, Bcoef, p, out.sample, n.ahead, n.roll, mregfor)
varxsim (X, Bcoef, p, n.sim, n.start, prereturns, resids, mexsimdata)
A multivariate data matrix.
The number of autoregressive lags.
Whether to include a constant.
An optional matrix of exogenous regressors with as many rows as X, and appropriately lagged.
A matrix of coefficients for the varxfilter function.
Whether to use the robust version of VAR based on the multivariate Least Trimmed Squares Estimator described in Croux and Joossens (2008).
Proportion to trim in the robust method.
The critical value for Reweighted estimator for the robust method.
The number of subsets to use for the robust method.
The number of C-steps to use for the robust method.
(defaults to ‘none’) Whether to postpad the fitted/filtered values (and hence calculation of residuals) with the estimated constant, zeros or NA's, thus returning matrices of the same size as the input data (rather than input data size less the number of lags).
A cluster object created by calling makeCluster
from
the parallel package. If it is not NULL, then this will be used for parallel
estimation in the case of the robust VAR version (remember to stop the cluster
on completion).
The number of points kept for out of sample rolling forecast.
The forecast horizon.
In combination with out.sample
, determines the number of times to roll
forward the n.ahead forecast using data left out of sample.
Matrix of external regressor forecasts (with appropriate lag structure).
Simulation horizon.
Simulation burn-in sample.
Optionally supplied pre-return matrix with “p” lags to initialize simulation.
Matrix of randomly generated residuals of size n.sim+n.start.
Matrix of external regressor pre-generated random values to use in the simulation (if NULL then assumed zero).
A list with the following items:
[varxfit, varxfilter] The coefficient matrix with rows equal to number of assets, and columns equal to number of assets x number of lags plus 1 (constant) plus number of exogenous regressors.
[varxfit, varxfilter] The fitted/filtered series (conditional mean series).
[varxfit, varxfilter] The residuals.
[varxfit] The covariance matrix of the coefficients.
[varxfit] The standard error of the coefficients.
[varxfit] The t-stat of the s.e.
[varxfit] The p-values of the s.e.
[varxfit, varxfilter] The number of autoregressive lags.
[varxfit] The number of exogenous regressors .
[varxsim] The simulated conditional mean.
This are convenience functions to be optionally used when using the multivariate GARCH methods.
Lutkepohl, H. 2005, New introduction to multiple time series analysis, Springer. Croux, C. and Joossens, K. 2008, Robust estimation of the vector autoregressive model by a least trimmed squares procedure, COMPSTAT, 489--501.