Updated: Feb 17
In this article, we designed a neural network to spot well-managed and profitable companies on the stock market. A neural network is a black box that can learn anything, so we decided to teach it to recognise good and bad patterns (just like a new-born) and, eventually, tested its level of accuracy when making predictions. It was a long process, but keep scrolling to discover the potential of this supervised learning approach.
1. We defined metrics for "well-managed" and "profitable" companies
One example of a good indicator of a "well-managed" company is how it deals with its debt, so we started by considering the ratio "Net-Debt-To-EBIDTA" over a couple of years. We want to see this ratio staying under control over time: not skyrocketing and in a stable tunnel, meaning that the debt is carefully monitored.
You can see an example of this with Alphabet (NASDAQ:GOOGL) in green versus the whole internet sector in blue:
As for an example of a "profitable" company is, we can consider how the Return-On-Equity (ROE) grows over a couple of years. We want to see it over 10% and stable or following an upward trend meaning that the company is making more and more money with respect to its equities.
An example of a good ROE is Apple (NASDAQ: AAPL):
We collected all these ratios for American companies, here is an extract:
2. We trained a Neural Network to learn based on this metrics
We defined a neural network specialised in time series: a Recurrent Neural Network (RNN) with Long Short-Term Memory (LTSM). Like all neural networks, it contains a collection of "neurons" (the red and orange points) organised in layers (the yellow and purple boxes) that are plastic enough to "learn" how to carry the information:
To train our neural network, we fed it with the Return-On-Equity (ROE) and Net-Debt-To-EBIDTA charts over 5 years (2010-2015) for a given company.
Then, we trained the neural network for it to remember that these charts belong to a "performing" company.
Side note: we declare that a company is "performing" if the stock price raised more than 20% on the stock market over the following 5 years, excluding dividends:
We repeated this operation for every company on the American stock market to get a "trained" neural network:
This training step is iterative and is never definitive (or "converged"), which means we can only assume that the training is completed based on the stabilisation of the error after running the algorithm for long enough. Here's a visual of the error (called "loss") decreasing as we train the network:
We eventually converged after tuning various parameters (e.g: number of "neurons") to reach an accuracy of 65% for the overall model:
The evaluation of the model has been performed on a dedicated pool of companies that have been isolated for that purpose, amounting to 20% of the dataset.
The accuracy obtained is significantly better than flipping a coin, which is not the case of all investment funds.
3. We test our brain on famous stocks in 2020 and conclude
Out of curiosity, we asked our brain to predict the success on 5 years for 2 random international stocks based on their up-to-date Net-Debt-To-EBIDTA and ROE historical data (2015-2019).
Here, the prediction model shows that one company would be "performing" (on the left) and the other one not (on the right):
The algorithm does not come with many hints on the reasons "why" as it acts like a black box copying human intuition.
To conclude, we believe that there are endless potential applications for individual investors and investment funds, such as:
- building tailored predictive models based on personalised metrics - back-testing hypotheses and improve them with a feedback loop
- automating the work of analysts so they become supervisors
Disclaimer: This is just information and is NOT given as advice or recommendations.