Backtesting on the Trading Strategy with Python
Backtesting of the algorithm trading can be done through. Below are some of the backtesting results I have performed on stock price using python.
Strategy 1: Momentum Trading
Strategy description: This strategy employs the signals generated from multiple momentum indicators at different length of windows. A buy signal is generated when all momentum indicators are generating buy signals while a sell signal is generated when all momentum indicators are generating sell signals. Backtesting results from the year 2013 to 2019 are shown as below.
Strategy 2: Pair Trading
Strategy description: This strategy employs the signals generated from a cointegrated pair of stocks. Results generated from the testing dataset from the year 2018 to 2020 are shown as below.
Strategy 3: Prediction using ARIMA model
Strategy description: This strategy employs the signals generated from ARIMA model. Results generated from the testing dataset from the year 2008 to 2016 are shown as below.