July 2019
Beginner to intermediate
740 pages
16h 52m
English
Rather than ARIMA, we could build a linear regression of the prior day's closing price to model closing price using statsmodels. This is taken care of by the StockModeler.regression() method:
>>> X, Y, lm = StockModeler.regression(nflx)
Once again, the summary() method can be called to look at statistics on the model's fit:
>>> lm.summary()
This results in the following summary:

The adjusted R2 makes this model look very good since it is near one; however, we know that this is simply because stock data is highly autocorrelated, so let's look at the residuals again:
>>> StockModeler.plot_residuals(lm)
This ...
Read now
Unlock full access