Challenges and Opportunities: Navigating artificial intelligence and equity investing
Artificial intelligence (AI) has the potential to significantly disrupt the investment industry. The latest AI innovations have been instrumental in improving potential investor outcomes – and we believe will continue to do so.
AI and large language models (LLMs) such as ChatGPT are revolutionising financial services. The explosion in AI and machine learning (ML) over the last few years feels like we’re entering a new age.
However, we believe the ML techniques currently in use are built on well-established techniques for extracting information from data.
Optimisation
In finance, optimisation refers to the process of finding the best solution for a particular problem subject to a set of constraints. In quantitative equity investing this technique is used in portfolio construction, to find the optimal portfolio that aims to maximise the expected return while minimising risk.
An example of a simple optimisation problem is for instance: if someone was organising a party, what is the optimal number of pizzas, cakes and drinks they should order? We can solve this with our brains, relying on experience and the back of an envelope to do some simple calculations.
But in finance, if we wanted to build a portfolio of 100 stocks from the S&P 500, there is an almost infinite number of combinations.
The optimiser can find the optimal portfolio in the risk-return space, searching through the endless number of possible portfolios until it finds the best possible combination of stocks that should deliver the best outcome.
But this is not new technology. To find the optimal portfolio the optimiser uses the Lagrange multiplier method. This method was first published in 1806 by an Italian mathematician, Joseph-Louis Lagrange. The technique involves introducing a new variable (the Lagrange multiplier) for each constraint in the optimisation problem and forming a new function called the Lagrangian.
Then by taking the partial derivatives of the Lagrangian the optimiser has directions on which way to look for the solution, without having to check each of the almost infinite possible combinations. These techniques play a crucial role in improving model performance in ML, from feature selection and tuning to minimising the loss function.
Neural networks
Neural networks were first proposed in the 1940s, inspired by the neural networks in the human brain. But it was the invention in 1986 of backpropagation, the technique by which a neural network ‘learns’, that laid the foundation for their wide adoption.
Backpropagation as a concept is straightforward – it involves adjusting the network’s weight based on the ‘error’, the difference between the output of the network and its desired outcome. Effectively it tells the network how much it was wrong by and feeds that back so it can learn.
By employing the backpropagation technique, with a sufficiently large training dataset, we can use neural networks in a wide arena of use cases, from identifying pictures of cats to autonomous driving vehicles.
Understanding the AI explosion
Over the past few years, there has been a remarkable surge in the power and use of AI tools across a wide variety of industries.
The significant increase in computing power has enabled the processing of vast amounts of training data, using increasingly complex AI models. Chip-making giant Nvidia has been the standout winner, its share price having risen by more than 2,000% over the past five years1 . The company's graphics processing units (GPUs), originally developed for video games, were found to be very well suited to training AI models. Although there are other players in the market, Nvidia is the largest.
Today almost all major technology companies offer cloud computing services for machine learning, allowing users to rent powerful computers to train their models, which has lowered upfront costs and significantly improved accessibility.
- R29vZ2xlIEZpbmFuY2Ug4oCTIGFzIGF0IDEzIEphbnVhcnkgMjAyNSA=
More and better data
Advancements in data collection, storage, and processing technologies have allowed organisations to harness and analyse large-scale datasets, uncovering valuable insights and patterns that can be leveraged to train AI models. The availability of high-quality, labelled datasets has been particularly instrumental in the development of AI applications.
Large language models like generative pre-trained transformers (GPTs) typically include a diverse range of publicly available text sources - books, articles and websites. These sources are used to expose the model to a wide variety of language patterns, topics and writing styles, helping it to develop a broad understanding of language and context.
AI for everyone
The proliferation of AI tools over the past few years has been marked by a significant increase in the accessibility and diversity of software and platforms designed to facilitate the testing and development of AI models.
The open sourcing of AI platforms, such as TensorFlow and PyTorch, provides developers with powerful and very accessible tools for building and training machine learning models. These frameworks abstract away much of the complexity of implementing AI algorithms, making it easier for developers to experiment with and apply machine learning techniques.
The invention of transformer architecture
Transformer architecture was a major game-changer and driving force in the development of AI. It is the innovation that bridged the gap between neural networks and LLMs, and was fundamental to the success of ChatGTP.
Essentially a transformer is a type of neural network architecture, first described by Google in 2017 in a paper titled ‘Attention is All You Need’. The key concept of the transformer is its self-attention mechanism, which allows the model to weigh the importance of different elements in the input sentence when making predictions. This attention mechanism enables the model to capture long-range dependencies and understand the context of each word in relation to the entire sentence.
Transformers have revolutionised LLMs. By using self-attention transformers have been able to capture complex patterns and deep relationships in language, reshaping the landscape of natural language processing (NLP).
The future of AI and equity portfolios
But what are the implications of all this for equity portfolio managers? Do we see a future where AI models take over from humans? The short answer is no.
ChatGPT and other mainstream AI models have been developed using very clean data, by leveraging high-quality online sources where the data has little to no ‘noise’ i.e. spelling and grammar are very good; the sentence structure and vocabulary is of a high quality. The models can leverage this foundation to generate high quality output.
Unfortunately, the same cannot be said of equity data. The factors that influence the return of a stock on any given day are diverse, and often obscured. In 1973 US economist, Burton Malkiel, famously wrote that stocks exhibit a ‘random walk’, indicating they are highly unpredictable and difficult to model.
What this means from the practitioner perspective is that one cannot simply plug equity data into a ML framework. The data needs to be cleaned extensively, and the modelling techniques also need to be thoughtfully selected to cope with the unpredictability in the data.
A constant state of evolution
The dynamics that drive markets include a multitude of factors; monetary and fiscal conditions, technological advancements, regulatory developments and shifts in investor sentiment. In addition, global events, geopolitical shifts and demographic trends contribute to the ever-changing landscape. As quantitative investors we recognise that history has a lot to teach us about the future, but we’re also very aware the future will never look exactly like the past.
This is in stark contrast to the mainstream use of AI. In LLMs for example, language is relatively stable; grammar, spelling and sentence structure do change but over a timespan measured by decades. This ‘stationarity’ means that data from the past is still representative of the current state, and models trained on more data create better outputs.
More data required
One of the datasets used to train ChatGPT (version 1) was BookCorpus2 , which contains 11,038 books - approximately 74 million sentences - by unpublished authors3 . Wikipedia, another training dataset, contains approximately 300 million sentences, according to our estimates4 .
In contrast, a global equity dataset containing monthly data going back 30 years will contain only 3.6 million stock observations - a large dataset but several orders of magnitude less than the dataset available to LLM models. The next hurdle to face is this dataset will not grow quickly - we can generate new data only through the slow progression of time, as we observe and measure returns going forward.
- PGEgaHJlZj0iaHR0cHM6Ly9ibG9nLmludmdhdGUuY29tL2NoYXRncHQtc3RhdGlzdGljcyI+NjArIENoYXRHUFQgRmFjdHMgQW5kIFN0YXRpc3RpY3MgWW91IE5lZWQgdG8gS25vdyBpbiAyMDI0PC9hPg==
- PGEgaHJlZj0iaHR0cHM6Ly9wYXBlcnN3aXRoY29kZS5jb20vZGF0YXNldC9ib29rY29ycHVzIzp+OnRleHQ9Qm9va0NvcnB1cyUyMGlzJTIwYSUyMGxhcmdlJTIwY29sbGVjdGlvbiwlMkMlMjBBZHZlbnR1cmUlMkMlMjBldGMiPkJvb2tDb3JwdXMgRGF0YXNldDwvYT4=
- RXN0aW1hdGUgYmFzZWQgb24gV2lraXBlZGlhIGRhdGEgPGEgaHJlZj0iaHR0cHM6Ly9lbi53aWtpcGVkaWEub3JnL3dpa2kvV2lraXBlZGlhOlNpemVfb2ZfV2lraXBlZGlhIj5XaWtpcGVkaWE6U2l6ZSBvZiBXaWtpcGVkaWE8L2E+
A challenging landscape but opportunities exist
These three factors - lack of historical data, high signal to noise ratio and non-stationarity - combine to create the biggest risk from using ML in equities: overfitting.
Overfitting occurs when a model learns to fit the training data too closely, effectively memorising the noise and idiosyncrasies of the historical dataset rather than capturing the underlying relationships that are expected to persist in the future. This leads to a model that performs very well on historical data but delivers poor performance in live trading.
Despite these challenges, we have embraced the potential of AI and machine learning, while being mindful of managing the associated risks. The following two models provide examples of how we've brought these techniques into our investment process at AXA IM.
Neural network tail risk identification
We developed a neural network to identify tail risk - it estimates the probability a stock will have a very sharp increase in volatility over the next month. The model, first deployed in 2017, uses a carefully selected set of features that individually are skilled at predicting increases in short-term volatility. By combining them with the neural network we were able to exploit the non-linear relationships between the signals, getting more than the sum of the parts. This model successfully identified as high risk two prominent US regional banks that failed in the first quarter of 2023.
The drawback of using neural networks is that they are a 'black box' i.e. it is very difficult to interrupt the output of the model. As systematic, fundamental investors, it’s important that we have full transparency on the underlying data changes that drive a trade recommendation. To achieve this, we build a ‘white box’ around the neural network. We take the output of the model and regress it against the input variables. This linear regression allows us to calculate which input variables are impacting the final recommendations the most.
NLP sentiment identification model
As systematic investors building well diversified portfolios, we depend on harvesting insight from data. By ensuring we have access to the most timely and accurate data on company fundamentals we can add value for our clients.
We use NLP to analyse what company chief executives and chief financial officers say, to inform our stock selection signals. We developed an NLP model, first deployed in 2020, that reads quarterly earnings calls that have been transcribed into text. The model measures the sentiment and language precision of company leaders, and feeds into our Quality and Sentiment factor models.
The next stage of evolution
The rapid advancements in LLMs and AI over the past few years have been truly remarkable. However, the application of AI into equity portfolios comes with some challenges. The complexities of equity data, the non-stationary nature of equity markets, and the inherent risks of overfitting pose significant hurdles.
We believe the use of these techniques without proper safeguards can be perilous. Nevertheless, our experience in equity investing coupled with our willingness to embrace new technologies has paved the way for the adoption of these advanced techniques into our next generation of models, ensuring we remain at the forefront of leveraging AI for our clients’ benefit.
We believe that AI and ML will not have a revolutionary impact on quantitative equity investing but do absolutely represent a very important evolutionary step. Managers who don’t adapt will be left behind - we have been on this journey since our founding 30 years ago and believe we are well placed to exploit these enhancements going forward.
References to companies are for illustrative purposes only and should not be viewed as investment recommendations.
Disclaimer