calibrate_VAR: VAR Calibration (Step 2)

Description Usage Arguments Details Value

Description

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).

Usage

1
calibrate_VAR(varData, histYields, Phi, Sigma, N = c(2, 3, 5, 10))

Arguments

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)

Details

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);

Value

A list containing SigmaL0 and SigmaL1


nathanesau/StocVal documentation built on May 23, 2019, 12:18 p.m.