Equity investments have been the bread & butter investment strategy for the majority of investors around the globe. While in the short-term the equity market shows extreme volatility and fluctuations making it suitable for trading, in the long-term the stock prices often follow predictable
patterns. Investors have been analysing these patterns for decades using two distinct methodologies: – fundamental analysis and technical analysis.
With the emergence of high-quality data on company fundamentals as well as big databases of historical stock prices, both types of analysis can become much more robust and achieve high levels of accuracy in forecasting the equity associated gains. Furthermore, the recent advancements in the fields of computer science and machine learning are allowing investors to analyse the huge volume of data available to them with unprecedented ease.
Machine Learning and Equity/Stock Market Investment
Machine learning allows rapid and automated analysis of huge volumes of data in order to assist the decision-making process. Both types of stock analysis require the processing of large volumes of information rather quickly which makes equity analysis perfect for the use of machine learning. Computers can be taught certain aspects of the overall analysis thereby automating many of the tasks that equity research analysts have to do. Similarly, simpler trading protocols can be completely automated to result in a trading algorithm that doesn’t require human intervention.
Below we present how machine learning and data science can be applied in the context of the two major categories of stock analysis.
Machine Learning Fundamental Analysis
Fundamental analysis is used by investors to assess the fundamentals of a company and predict the intrinsic value of a stock regardless of what the market value of a stock is. In doing so, a variety of different metrics are used to assess whether the company is doing well or not and whether it is
expected to grow or not. Investment decisions are taken based on the information gathered from economic and financial reports, news events and industry statistics. The profitability and performance of company in the past as well as present is analysed. This analysis is more suited to long term investors as it doesn’t address the short term volatility of the stock prices.
Extracting information from Financial and Economic reports:
Different companies report the metrics used to assess their financial and economic health differently. An equity research analyst has to comb through all the reports and extract the relevant information to use for the analysis. While often a simple rule-based system can teach the computer, recent advances in Natural Language processing allow us to use techniques such as Named Entity Recognition to extract key performance and profitability related information.
Predicting long term stock price movement using Supervised Learning:
Historical data of key performance indicators for stocks can be used to predict the long term stock price movement by implementing regression or classification models using a variety of supervised learning algorithms such as Linear Regression, XGBoost, and Recurrent Neural networks. A variety of performance indicators have been used in the past for this purpose such as:
◦ Book Value, Market Capitalization, Earnings per share, Dividend Yield
◦ Net revenue, Asset turnover, profit margin, Sales growth
◦ Financial ratios such as Current ratio, debt to equity ratio, Cash ratio
Machine Learning Technical Analysis
Technical analysis is used by traders to assess the market trends and stock prices in order to predict the right time to enter or exit the market and identify short term patterns and trends. Technical analysis of a stock on takes into account the historical stock price movements and uses charts.
Investment decisions are taken based on predicted stock movement. The data used is quite simply the historical stock prices data. The analysis is more suited to swing and short-term traders as it doesn’t predict the long-term movement of stock prices.
Algorithm-Based Trading using rule based decision-making:
The right time to enter and exit the market is decided on the basis certain heuristics based on indicators such as moving averages, MACD and OBV. A variety of different rules can be incorporated and automated such that the machine automatically enters and exits the market on behalf of the investor.
Predict short-term stock price movement using Time-Series modelling:
Historical data of stock prices is used for modelling the stock prices as a function of time and discover short-term trends and patterns that can be exploited. Time series modelling can be performed using a variety of algorithms and models such as ARIMA, Bayesian methods, Recurrent Neural Networks/LSTMs. These techniques allow for incorporation of holidays, seasonality and heuristics in the prediction process.
Predict short-term stock price movement using Image Processing on stock chart images:
Deep learning methods specialised in dealing with visual imagery data such as Convolutional neural networks can be applied directly on standard stock price charts such as the candle-stick chart to predict stock price movements.
In summary, machine learning has a prominent role to play in equity research and investment in the coming years as the technology is finally starting to mature to a level suitable for use in the stock market. This is
definitely not an exhaustive list of use cases and we’d be happy to hear from you if you have more.
- Milosevic, N. Equity forecast: Predicting long term stock price movement using machine learning.
- Rasekhschaffe, K. C. & Jones, R. C. Machine Learning for Stock Selection. Financ. Anal. J. 75, 70–88 (2019).
- Part 1: Deep Learning and Long-Term Investing, the Setup — Euclidean Technologies ®.
- Kim, T. & Kim, H. Y. Forecasting stock prices with a feature fusion LSTM-CNN model using different representations of the same data. PLoS One 14, e0212320 (2019).