Build A Machine Learning Stock Trading Strategy
Stock Price Direction Using Machine Learning & Python
Disclaimer: The material in this article is purely educational and should not be taken as professional investment advice. Invest at your own discretion.
In this article, I will attempt to create a trading strategy using machine learning ( a subset of artificial intelligence) and the python programming language.
The Machine Learning Trading Strategy
The idea for this strategy is to use a machine learning model to predict if tomorrows price of an asset will be higher then todays price or not. The model will put a 1 if it thinks tomorrows price will be higher than todays price (the current price) or it will put a 0 otherwise.
Once the machine learning model is trained and ready, to make this prediction I will use the signals 1 for buying the asset and 0 for not having a position in the asset.
With this strategy, I can determine if this machine learning trading strategy is better than a buy and hold strategy by comparing both strategies cumulative returns.
If you are interested in reading more about python and machine learning, then to immediately get started with problems and examples, I recommend you read Hands-On Machine Learning with…