Description Usage Arguments Details Value
First step of VAR model calibration. Number of state variables is equal to length(varData[1,]) - however, currently 4 is required since the pricingKernel is currently implemented to accept a 4 component VAR. Note that the MASS and vars packages are required.
1 | var_ols(varData)
|
varData |
The VAR variables to use in the model |
marketData |
The data containing the VAR variables and term structure historical yields. |
When calibrating the VAR model, the mean is subtracted and we estimate (zt-u) not zt. Also note that a VAR(1) model is estimated. For example, marketData <- readRDS("~/Dropbox/Research/StocVal/data/Canada/varinput_canada.Rda"); varData <- data.frame(onemonth=market_data$onemonth, inflation=market_data$inflation, tenyear=market_data$tenyear, stock=market_data$stock); mu <- matrix(c(mean(varData$onemonth), mean(varData$inflation), mean(varData$tenyear), mean(varData$stock)), 4, 1); varData <- data.frame(onemonth=varData$onemonth - mu[1], inflation=varData$inflation - mu[2], tenyear=varData$tenyear-mu[3], stock=varData$stock - mu[4]); var_ols.out <- var_ols(varData, p=1, type="none")
A list containing Phi (the coefficients) and Sigma (the covariance matrix)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.