You can clone the repo using github for mac, for windows, or linux, and then run the following script to check it out:
This script downloads monthly data for S&P 500 (adjusted for splits and dividends), and, for each month form 1995 to the present, fits a naive model, an auto.arima() model, and an ets() model to the past 5 year's worth of data and uses those models to predict S&P 500 prices for the next 12 months (note that the progress bar doesn't update if you register a parallel backend. I can't figure out how to fix this bug):
This script downloads monthly data for S&P 500 (adjusted for splits and dividends), and, for each month form 1995 to the present, fits a naive model, an auto.arima() model, and an ets() model to the past 5 year's worth of data and uses those models to predict S&P 500 prices for the next 12 months (note that the progress bar doesn't update if you register a parallel backend. I can't figure out how to fix this bug):
The naive model outperforms the arima and exponential smoothing models, both of which take into account seasonal patterns, trends, and mean-reversion! Furthermore, we're not just using any arima/exponential smoothing model: at each step we're selecting the best model, based on the last 5 years worth of data. (The ets model slightly outperforms the naive model at the 3 month horizon, but not the 2 month or 4 month horizons).
Forecasting equities prices is hard!

Nice ...but wondering how I "clone the repo" in linux. I see where I can download the zip or read as https. But not sure where to go from there
ReplyDeleteEric: This is a really good place to start:
ReplyDeletehttps://help.github.com/articles/set-up-git#platform-linux