NOTE: This script is for learning purposes only and does not constitute a recommendation for buying or selling any stock mentioned in this script.
SUMMARY: This project aims to construct and test an algorithmic trading model and document the end-to-end steps using a template.
INTRODUCTION: This algorithmic trading model employs a simple mean-reversion strategy for stock position entries and exits using force index indicators. For the Force Index indicator, the model will use a 13-period and a 50-period indicator for the trading signal. The model will initiate a long position when the trading indicator turns from negative to positive. Conversely, the model will exit the long position when the signal indicator turns from positive to negative.
ANALYSIS: In this modeling iteration, we analyzed ten stocks between August 1, 2016, and September 17, 2021. The models’ performance appeared at the end of the script. The models with the wider signal line width generally produced a better return for the tested stocks. Moreover, the simple buy-and-hold approach came out ahead for all stocks.
CONCLUSION: For most stocks during the modeling time frame, the long-only trading strategy with the Force Index did not produce a better return than the buy-and-hold approach. We should consider modeling these stocks further by experimenting with more variations of the strategy.
Dataset ML Model: Time series analysis with numerical attributes
Dataset Used: Quandl
The HTML formatted report can be found here on GitHub.