Learning time series prediction-based strategies
Time series prediction-based strategies depend on having a precise estimate of stock prices at some time in the future, along with their corresponding confidence intervals. A calculation of the estimates is usually very time-consuming.
The simple trading rule then incorporates the relationship between the last known price and the future price, or its lower/upper confidence interval value.
More complex trading rules incorporate decisions based on the trend component and seasonality components.
SARIMAX strategy
This strategy is based on the most elementary rule: own the stock if the current price is lower than the predicted price in 7 days:
%matplotlib inline from zipline import run_algorithm from zipline.api import order_target_percent, symbol, set_commission from zipline.finance.commission import PerTrade import pandas as pd import pyfolio as pf import pmdarima as pm import warnings warnings.filterwarnings('ignore...