Description Usage Arguments Details Value
Finds SigmaL0 and SigmaL1 for the pricing kernel given VAR parameters Phi and Sigma (which were calculated using OLS). To make a different number of VAR components (than 4 work), modify SigmaL1 and SigmaL0 inside the function. NOTE that SigmaL0 and SigmaL1 should be used to generate a term structure where the mean is NOT SUBTRACTED from the marketData (note that mean was subtracted from marketData during step 1, i.e. in the var_ols() function).
1 | calibrate_VAR(varData, histYields, Phi, Sigma, N = c(2, 3, 5, 10))
|
varData |
VAR columns used in OLS (i.e. onemonth, inflation, tenyear, stock) |
histYields |
histYields to calibrate term structure with (i.e. twoyear, threeyear, fiveyear, tenyear) |
Phi |
Coefficients from OLS |
Sigma |
Covariance matrix from OLS |
N |
specifies the terms used in histYields (i.e. 2, 3, 5, 10) |
For example, marketData <- readRDS("~/Dropbox/Research/StocVal/data/Canada/varinput_canada.Rda"); varData <- data.frame(onemonth=marketData$onemonth, inflation=marketData$inflation, tenyear=marketData$tenyear, stock=marketData$stock); histYields <- data.frame(twoyear=marketData$twoyear, threeyear=marketData$threeyear, fiveyear=marketData$fiveyear, tenyear=marketData$tenyear); N <- c(2,3,5,10) calibrate_VAR.out <- calibrate_VAR(varData, histYields, Phi, Sigma, N);
A list containing SigmaL0 and SigmaL1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.