jubilee.calc_cape: Internal utility to calculate n-year CAPE

Description Usage Arguments Value Author(s) Examples

View source: R/jubilee-calc-cape-method.R

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

1
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

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

jubilee documentation built on Jan. 24, 2020, 5:10 p.m.