July 2019
Beginner to intermediate
740 pages
16h 52m
English
As mentioned in Chapter 1, Introduction to Data Analysis, time series can be decomposed into trend, seasonal, and remainder components utilizing a specified frequency. This can be achieved with the statsmodels package, which StockModeler.decompose() is using:
>>> from stock_analysis import StockModeler>>> decomposition = StockModeler.decompose(nflx, 20)>>> fig = decomposition.plot()>>> fig.suptitle('Netflix Stock Price Time Series Decomposition', y=1)
This returns the decomposition plot for Netflix with a frequency of 20 trading days:

For more complicated models, we could decompose and then build our model around ...
Read now
Unlock full access