In this post, you will learn about some of the popular machine learning techniques in relation to making stock price movement (direction of stock price) predictions and classify whether a stock is a buy, sell, or hold. The stock price prediction problem is a fairly complex problem and different techniques can be used appropriately to achieve good prediction accuracy.
Here are the three most popular or common techniques used for building machine learning models for stock price movement (upward / downward) and classifying whether a stock is a buy, sell, or hold:
- Fundamental analysis: In fundamental analysis (FA), the machine learning models can be trained using data related to companies’ financial statements and macroeconomic and microeconomic factors. The models can be used to predict the stock price movement at any given point in time. One can use supervised learning models such as bagging, boosting ensemble classifiers, or deep learning neural networks for making predictions on whether to buy, sell or hold. Feature engineering is key to building a high-performance model and one can go about using feature selection (random forest)/feature extraction (PCA) techniques. The following are a few articles in relation to using machine learning for fundamental analysis technique:
- Technical analysis: In this technique, machine learning models can be trained to forecast the stock movement or the direction of prices through an analysis of historical market data such as prices and volumes.
- Sentiment analysis: In sentiment analysis, ML models can be trained to predict the stock price movement using market sentiments related data gathered from various sources such as financial news, companies’ reports, social media feeds, etc. Broadly, the data needed to train such models can come from news/social media sources and stock websites (such as NASDAQ). Algorithms such as random forest etc can be used to train such a model. The features can be related to the number of news related to the particular stock, company size, company”s market cap, rate of change of stock prices in the last few days, etc.
Here is a representative diagram showing which efficacy of techniques such as technical and fundamental analysis for short-term and long-term stock predictions.
Of the three general categories of stock prediction techniques, technical analysis, and sentiment analysis are primarily used for short-term prediction on the scale of days or less. One can aggregate the predictions from the models trained based on the principles of technical and sentiment analysis for greater model performance. Fundamental analysis, on the other hand, is used for mid-term and long-term predictions on the scale of quarters and years.
- Free Datasets for Machine Learning & Deep Learning - February 22, 2021
- Actionable Insights Examples – Turning Data into Action - February 7, 2021
- When to use Deep Learning vs Machine Learning Models? - January 17, 2021