Description Usage Arguments Value Author(s) References Examples
View source: R/jubilee-ols-method.R
Calculate the OLS regression for a given time series and fraction
1 | jubilee.ols(fraction, ts, lookback.channel, tol.frac = 1/6)
|
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. |
data.table with columns of fraction, lm.a, lm.y, lm.r
Stephen H. Lihn
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
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.