Value Investing with Machine Learning
Your favourite holding period doesn’t have to be forever…
The Oracle of Omaha once said:
“Price is what you pay, value is what you get.”
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?
This article will show you how you can easily increase your certainty with transparent and interpretable Machine Learning. To do this, we will use Mind Foundry’s Automated Data Science platform, AuDaS, that augments Analysts and transforms them into Data Science Heroes.
Collecting the Data
Value investors often use estimates of the performance of a company to make 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.
For the case study we are going to focus on Infosys, a global leader in technology services & consulting.
For the purpose of clarity, we are only going to consider daily data from April 2017 to December 2018 from 8 sources which are:
- 12 Month Forward Price to Earnings Ratio estimates which 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 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 a company is overvalued.
- Price to Book Ratio which compares the stocks’s market price to its book value.
- 12 Month Trailing EBIDTA Margin which assesses the profitability of a firm’s operating profitability as a percentage of its total revenue.
- 12 Month Trailing Return on Assets which 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
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 and if not we’ll substract 1
- If the rate of change of 35 day MA>0 we’ll add 1 to the score and if not we’ll substract 1
- If the rate of change of the 100 day MA >0 we’ll add 1 to the score and 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 investment analysts. Considering 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 AuDaS:
AuDaS 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 AuDaS to build a classifier that can predict the score (T+30) column.
AuDaS 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 then need to click Go and AuDaS will start searching for an optimal Data Science pipeline for you. It also reveals the algorithm and parameters it has chosen.
AuDaS conducts the search in an efficient manner, using Mind Foundry’s Bayesian Optimiser, OPTaaS, which is available as a separate offering and is used at leading Quantitative Hedge Funds globally.
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.
The main features in this example are the:
- Rate of Change of the 35 day MA
- 7 day MA
- PEG ratio
After a few more iterations, AuDaS was able to find a model with a 92% classification accuracy. This means that AuDaS was able to learn a relationship in the data that is able to predict Infosys’ score 30 days ahead with a 92%! This accuracy can be increased by infusing the Analysts’ awareness of context which could affect the score. That is why Machine Learning should augment Analysts, not automate them!
A full walkthrough video with commentary can be viewed bellow:
Please don’t hesitate to reach out with your feedback if you are an Analyst or wish to see a live demo of AuDaS!
If you are still curious, you can also read another Investment article below:
Disclaimer: This communication is for informational purposes only. It does not and is not intended to constitute investment advice or an offer or solicitation for the purchase or sale of any financial instrument or as an official confirmation of any transaction. All market prices, data and other information are not warranted as to completeness or accuracy and are subject to change without notice.
Team and Resources
Mind Foundry is an Oxford University spin-out founded by Professors Stephen Roberts and Michael Osborne who have 35 person years in data analytics. The Mind Foundry team is composed of over 30 world class Machine Learning researchers and elite software engineers, many former post-docs from the University of Oxford. Moreover, Mind Foundry has a privileged access to over 30 Oxford University Machine Learning PhDs through its spin-out status. Mind Foundry is a portfolio company of the University of Oxford and its investors include Oxford Sciences Innovation, the Oxford Technology and Innovations Fund, the University of Oxford Innovation Fund and Parkwalk Advisors.