Home » Decision Trees For Investment: Spot Key Financial Ratios

Decision Trees For Investment: Spot Key Financial Ratios

In our first article, we focused on profitability and debt, yielding fascinating results. Today, we measure the impact of financial ratios on stocks performance. We did this by embracing the whole spectrum and considering 9 financial ratios for the whole American stock market: how to use decision trees for investment? Which financial ratios are the most important to watch before a purchase ? We let our machine learning model do the talking…

1. First, we defined 9 meaningful financial ratios

We defined 9 well-balanced financial ratios of 3 categories to obtain an harmonious snapshot of a company: pricing, profitability and debt:

2. We parsed these ratios for all American companies in 2015

One example here is with Intel (NASDAQ: INTC) in 2015:

Then, we checked if this company has been “performant” (i.e: the price surged more than 20% in 5 years between 2015 and 2020):

Eventually, we attached all the 9 financial ratios and the performance label to the company:

We repeated this operation for every single company listed on the American stock market.

3. We used a “Random Forests” algorithm to judge the importance of each ratio

After labelling the whole dataset, how to determine which financial ratio has the most influence on the performance of stocks ? We generated multiple “decisions trees” using a Machine Learning algorithm called “Random Forests”: the outcome is an evaluation of the importance of each financial ratio based on a myriad of subsets taken from the original dataset. These subsets will then be used to build trees on which the successful paths to performance will be counted and an “influence on the result” will be deduced in percentage.

See also  Diversify Your Crypto Assets With 3 Correlation Clusters

The inputs of this algorithm are:

the features (financial ratios)

the number of trees (n)

the size of test subsets taken (s).

For all financial ratios, a number of trees n=100 and size of subsets s=0.01% , we obtain the following table of importances of financial ratios as output:

These calculations come with a level of precision based on the back testing of the model: in that case this is 75%. This value is quite reasonable and converged (increasing n or modifying s would not lead to significantly better accuracy) however the choice of the financial ratios is quite critical. This will be further explored in an upcoming article. Now let’s have a look at the results themselves: the pricing ratios have the strongest impact on performance.

The three pricing ratios first come all together, before the debts ratios and the profitability ratio. This is definitely a hint to their criticality. It’s also interesting to see that the “Price-To-Operating-Cash-Flow” comes first as people tend to consider the “Price-To-Earnings” ratio as a reference.

4. Conclusion

This study was short and could lead to further research (e.g; the choice of financial ratios or the choice of numerical parameters). However, it shows how to use decision trees for investment and it looks like the “value” game (buying undervalued assets and selling them when they are overvalued) is not dead. The pricing ratios are the most important things to look at when buying a stock for a 5-year investment. Buy undervalued. Sell overvalued. And start by a pricing analysis when stock-picking.

See also  Canva Reveals New AI-Powered Tools

To conclude, a little quote from the Oracle of Omaha:

“Whether We’re Talking About Socks Or Stocks, I Like Buying Quality Merchandise When It Is Marked Down” Warren Buffet

Related Posts

Leave a Comment