jubilee.ols: Internal utility to calculate OLS regression In jubilee: Forecasting Long-Term Growth of the U.S. Stock Market and Business Cycles

Description

Calculate the OLS regression for a given time series and fraction

Usage

 `1` ```jubilee.ols(fraction, ts, lookback.channel, tol.frac = 1/6) ```

Arguments

 `fraction` numeric, the ending fraction of regression `ts` numeric, the time series data `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

data.table with columns of `fraction, lm.a, lm.y, lm.r`

Stephen H. Lihn

References

See Section 2.3 of Stephen H.T. Lihn, "Jubilee Tectonic Model: Forecasting Long-Term Growth and Mean Reversion in the U.S. Stock Market." Available at http://dx.doi.org/10.2139/ssrn.3156574

Examples

 ```1 2 3 4 5 6 7 8``` ```## Not run: dtb <- jubilee.repo(online=FALSE)@ie df <- jubilee.ols(dtb\$fraction, dtb\$log.tri, 50) subset(df, fraction > 1970 & fraction < 1970.05) # fraction lm.a lm.r lm.y # 1970.042 11.86401 0.1007617 0.02103105 ## End(Not run) ```

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