jubilee.calc_cape {jubilee}R Documentation

Internal utility to calculate n-year CAPE

Description

This CAPE calculator replicates the methodology of Shiller, so that one can calculate n-year CAPE, e.g. n=20. This utility has been calibrated by original 10-year CAPE data from Shiller.

Usage

jubilee.calc_cape(dtb, period, tol.frac = 1/6)

Arguments

dtb

data.table

period

numeric, the backward-looking regression period

tol.frac

numeric, tolerance of missing data in the beginning of the time series, expressed as fraction. Default is 1/6, that is, two months.

Value

numeric, the same length as dtb$fraction.

Author(s)

Stephen H. Lihn

Examples

  ## Not run: 
    dtb <- jubilee.repo(online=FALSE)@ie
    cape10 <- jubilee.calc_cape(dtb, 10)
    cape20 <- jubilee.calc_cape(dtb, 20)
  
## End(Not run)

[Package jubilee version 0.3.3 Index]