Blog

Value Investing with Automated Machine Learning


This case study will show how value investors can easily increase their certainty by investing with machine learning. To do this, we will use Mind Foundry’s automated data science platform,  which augments analysts and transforms them into data science heroes.

The value of investing with machine learning

The Oracle of Omaha once said:

“Price is what you pay, value is what you get.” - Warren Buffet

But how can you be certain that you are paying a fair price for an investment? How can you make the most of a fair or unfair situation? Your favourite holding period doesn’t have to be forever…

In this experiment, we focused on Infosys, a global leader in technology services & consulting. With the needs of value investors in mind, we chose to forecast Infosys’ score in 30 days time. After collecting data, attributing scores and modelling with machine learning, we were able to find a model with a 92% classification accuracy.

This meant that the platform was able to learn a relationship in the data which is able to predict Infosys’ score 30 days ahead with a 92%! 

However, this accuracy could be increased further by an analysts’ awareness of context which could affect the score. For this reason, analysts should be investing with machine learning solutions to augment - not automate - their skills and expertise.

 

Collecting the Data

Value investors often use estimates of a company's performance to inform their decisions. This data often requires a subscription, but I started a free day trial with YCharts which sources its estimates from S&P Global.

We're going to focus on Infosys, a global leader in technology services & consulting.  

Value investing with automated machine learning - Taking Infosys as an example
 

For the purpose of clarity, we are only going to consider daily data from April 2017 to December 2018, from the following eight sources:

  • 12 Month Forward Price to Earnings Ratio - estimates that give an indication of how much investors are willing to pay per dollar of earnings
  • 12 Month Forward Price-Sales Ratio - estimates that give an indication of the value investors are receiving from the stock
  • 12 Month Trailing Price Earnings to Growth - the ratio which determines the relative trade-off between the price of a stock, the earnings generated per share and the company’s expected growth. A PEG higher than 1 generally suggests that a company is overvalued
  • Price to Book Ratio - this compares a stock’s market price to its book value
  • 12 Month Trailing EBIDTA Margin - this assesses the profitability of a firm’s operating profitability as a percentage of its total revenue
  • 12 Month Trailing Return on Assets - this represents the percentage of profit a company earns in relation to its overall resources
  • Close Price and Volume

We then derived the following values:

  • 7/35/100 day moving averages
  • Their rate of changes

 

Value investing with automated machine learning - The raw data

 

Scoring the Data

The next step is to attribute for each daily snapshot of value metrics, a score which will represent our view on whether the company is a good buy or not. For the purpose of clarity, we used simple rules to score each row of data:

  • If the Close Price > 100MA: we’ll add 1 to the score. If not, we’ll subtract 1
  • If the rate of change of 35 day MA>0 we’ll add 1 to the score. If not, we’ll substract 1
  • If the rate of change of the 100 day MA >0 we’ll add 1 to the score. If not, we’ll substract 1

These rules can be replaced with any investment thesis you follow.

 

Modelling the Data with Machine Learning

Now that the input data is complete and scored, we need to build a model that can provide useful insights to analysts investing with machine learning.

Considering that value investors tend to react less to daily market movements, we chose to forecast Infosy’s score in 30 days time. This seemed like a reasonable period, but can be changed to your liking.

In practice, this meant creating a 30 day lag in the excel spreadsheet between the inputs at T and the score (T+30). We then loaded the data into Mind Foundry: 

 

05
 
Value investing with automated machine learning - data preparation and visualisation in Mind Foundry
(Data Preparation and Visualisation in Mind Foundry)
 
 
Download Study: Forecasting Earnings Surprises with Machine Learning
 
Mind Foundry automatically generates some histograms of the data which can be useful for making sense of the data visually. We can also see how the various attributes distribute across the other columns which can sometimes unearth interesting relationships.

We are then going to ask Mind Foundry to build a classifier that can predict the score (T+30) column.

 Value investing with automated machine learning - building a classifier
 

Mind Foundry automatically provides a safe and reasonable framework for training a robust machine learning solution. This guarantees that the results can be generalised to new data.

You simply click Go, and the platform will start searching for an optimal data science pipeline for you. It also reveals the algorithm and parameters it has chosen.

Value investing with automated machine learning - Mind Foundry searching for the optimal model
(Mind Foundry searching for the optimal model)

 

Mind Foundry conducts the search in an efficient manner, using Mind Foundry Optimize, which is available as a separate offering and is used globally at leading Quantitative Hedge Funds .

During the optimisation, the model’s feature relevance is provided. The relative feature relevance measures which information the algorithm found most useful and will vary for each algorithm.

Value investing with automated machine learning - Finding the feature relevance
 

The main features in this example are the:

  • Rate of Change of the 35 day MA
  • 7 day MA
  • 100 day MA

The main "rule" which emerged during the training is that when the 35 day MA accelerates by more than 10% and the 7 day MA is greater than 10, the chances of the stock obtaining the top score of 3 over the next 30 days increase significantly.

Analysts should be investing with machine learning solutions

After a few more iterations, Mind Foundry was able to find a model with a 92% classification accuracy. This means that the platform was able to learn a relationship in the data that is able to predict Infosys’ score 30 days ahead with a 92%!

However, this accuracy can be increased by infusing the analysts’ awareness of context which could affect the score. Rather than replacing analysts then, investing with machine learning should empower them and support smarter, more profitable decisions.

 

Stock Market Predictions with Machine Learning Guide

Try Mind Foundry

Related articles