jubilee.eqty_ols {jubilee}R Documentation

Internal utility to calculate OLS regression for log total return index

Description

Calculate the OLS regression for log total return index

Usage

jubilee.eqty_ols(dtb, end.frac, lookback.channel, tol.frac = 1/6)

Arguments

dtb

data.table that contains fraction and log.tri columns.

end.frac

numeric, the ending fraction of regression.

lookback.channel

numeric, the backward-looking regression period

tol.frac

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

Value

two-element array c(a,R) if end.frac is length-one; data.table with end.frac as fraction column if end.frac is an array.

Author(s)

Stephen H. Lihn

Examples

  ## Not run: 
    dtb <- jubilee.repo(online=FALSE)@ie
    jubilee.eqty_ols(dtb, 1970, 50) # c(11.8671626, 0.1008371)
 
## End(Not run)

[Package jubilee version 0.3.3 Index]