AI Decoded - Random Forest

Random Forest, a machine learning technique, helps uncover patterns in financial data, reduce noise, and improve equity signals.

Today’s rapidly evolving technological landscape offers a variety of advanced Artificial Intelligence (AI) techniques with the potential to enhance investment strategies. The Systematic Equity team at Allianz Global Investors has been at the forefront of this innovation. Among the many approaches we have explored and researched, we have identified several promising AI-driven signals. One of the key techniques we use to enhance stock selection is Random Forest, a machine learning method renowned for its ability to model non-linear relationships between input variables (e.g., company characteristics) and the outcomes (e.g., future relative returns). After testing various machine learning methods, Random Forest consistently emerged as a standout, delivering stronger, more reliable results.

But what exactly is a Random Forest? The name is actually quite intuitive: as the name “forest” suggests, it’s a group of trees – specifically, decision trees. A decision tree functions like a flowchart, branching through a series of questions to reach a conclusion or decision. For example, as illustrated in the exhibit below, determining whether a person is fit might start by assessing their age and then their habits: people under 30 who eat a lot of pizza are generally categorized as unfit, while those over 30 who exercise regularly are more likely to be fit.

However, in practice, one key challenge with decision trees is their tendency to overfit data, meaning they can become overly tailored to historical specifics, capturing individual events rather than the broader underlying patterns (see Exhibit 2 on the following page for an illustration of overfitting). While this may enhance performance on past data, it often undermines the model’s ability to generalize to future scenarios, weakening predictive power with new or unseen data. This issue is particularly critical in finance, where data is inherently noisy, and market dynamics are in constant flux. Therefore, for a model to be effective, it must strike a balance – filtering out noise while adapting to these ongoing changes as effectively as possible.

Exhibit 1: Decision tree on fitness – a mock example

Source: https://chirag-sehra.medium.com/ decision-trees-explained-easily-28f23241248

Exhibit 2: What is overfitting?

Source: Allianz Global Investors, Systematic Equity team. For illustrative purposes only.

For example, consider a decision tree designed to time investments in the equity market. During the period from 1990 to 2005, indicators such as Russian bond spreads proved useful in “predicting” specific market events like the LTCM’s demise1 in 1998, as illustrated below (Exhibit 3). However, beyond this isolated event, this indicator lost much of its predictive power, as market dynamics shifted and the specific conditions that once made the signal relevant no longer applied.

To reduce overfitting, it is important to conduct a diverse “forest” of decision trees – this is where the Random Forest truly excels. Each tree is trained on different sub-periods of data and subsets of company characteristics, offering a unique perspective by capturing distinct patterns from various historical periods, each shaped by different market regimes. For example, relying on a single decision tree based on indicators such as Russian bond spreads might lead to a short signal as illustrated above. However, other trees may focus on different periods or market conditions, such as one dominated by higher ISM (Institute for Supply Management Manufacturing Index) and consumer confidence (as in the second decision tree in Exhibit 4 on the following page), while another emphasizes periods with higher economic surprises and earnings upgrades (as in the third decision tree in Exhibit 4). By leveraging a “wisdom-of-the-crowd” approach and aggregating predictions through majority voting, the model arrives at a more reliable outcome. In this example, since both the second and third decision trees yielded to the same result, the majority vote leads to a long signal as well, as illustrated in the exhibit below. In summary, the diversity of decision trees is fundamental to success, as it mitigates the risk of over-reliance on any single event or condition, enhancing resilience against challenging market dynamics, unprecedented events and new data.

The Systematic Equity team does not try to time the market but tries to evaluate the attractiveness of all investable stocks at a given point in time. Our database contains long history of company data such as balance sheet and income statement items, prices and returns, and a plethora of alternative data items across a broad investment universe, creating a strong foundation for AI applications like Random Forest. This focus on data quality and breadth is crucial in the training process of any AI model.

The Systematic Equity team’s random forest model, applied to approximately 60 billion USD in assets, leverages hundreds of these established data fields we collected over the past 25 years. With ample data available, our random forest model can grow enough decision trees to ensure stable and reproducible predictions.



1LTCM’s demise: Long-Term Capital Management L.P. (LCTM) was a highly leveraged hedge fund. In 1998, it received a USD 3.6 billion bailout from a group of 14 banks, in a deal brokered and put together by the Federal Reserve Bank of New York. LTCM was initially successful, with annualized return of around 21% in its first year, 43% in its second year and 41% in its third year. However, in 1998 it lost USD 4.6 billion in less than four months due to a combination of high leverage and exposure to the 1997 Asian financial crisis and 1998 Russian financial crisis. Source: https://en.wikipedia.org/wiki/ Long-Term_Capital_Management

Exhibit 3: Relying on one decision tree might lead to bias

Source: Allianz Global Investors, Systematic Equity team. Securities mentioned in this document are for illustrative purposes only and do not constitute a recommendation or solicitation to buy or sell any particular security.

Exhibit 4: Diversity of the decision trees is key to success: 2:1 vote for long

Source: Allianz Global Investors, Systematic Equity team. For illustrative purposes only.

The decision tree approach can enhance the performance of nearly all classical equity signals. While traditional equity signals – such as P/E ratio, dividend yield, or price momentum indicators – offer valuable insights, they may not always adapt quickly enough to new market regimes. Random forest, on the other hand, integrates a wide range of factors and perspectives (Please see Exhibit 5 for an example of a decision tree utilized by the Systematic Equity team in their real-world research.), allowing it to adapt more efficiently to different market environments, thereby enhancing the information ratio. This ability to learn from diverse data and aggregate multiple signals results in more reliable predictions, providing an improvement over classical equity signal like Value as illustrated in Exhibit 6 on the following page.
Exhibit 5: An example of a decision tree at the Systematic Equity team

Source: Allianz Global Investors, Systematic Equity team. For illustrative purposes only.

Exhibit 6: Enhancing the information ratio of Value with AI

Source: Allianz Global Investors, Systematic Equity team. Valuation period: 31/12/1998 – 30/09/2024. For illustrative purposes only. The hypothetical performance and simulations shown are for illustrative purposes only and do not represent actual performance; they do not predict future returns. Please see important information regarding back-testings and hypothetical or simulated performance data at the end of this document. For illustrative purposes only and does not represent actual performance of any client account. The information should not be relied upon as an indicator of future results.

Back-testings and hypothetical or simulated performance data have many inherent limitations, only some of which are described as follows:(i) They are designed with the benefit of hindsight, based on historical data, and do not reflect the impact that certain economic and market factors might have had on the decision-making process, if a client’s portfolio had actually been managed. No back-testings, hypothetical or simulated performance can completely account for the impact of financial risk in actual performance.(ii) They do not reflect actual transactions and cannot accurately account for the ability to withstand losses.(iii) The information is based, in part, on hypothetical assumptions made for modelling purposes that may not be realised in the actual management of portfolios. No representation or warranty is made as to the reasonableness of the assumptions made or that all assumptions used in achieving the returns have been stated or fully considered. Assumption changes may have a material impact on the model returns presented. The back testing of performance differs from actual portfolio performance because the investment strategy may be adjusted at any time, for any reason. Investors should not assume that they will experience a performance similar to the back-testings, hypothetical or simulated performance shown. Material differences between back-testings, hypothetical or simulated performance results and actual results subsequently achieved by any investment strategy are possible. Source: AllianzGI, as of 30/06/2024. The statements contained herein may include statements of future expectations and other forward-looking statements that are based on management’s current views and assumptions and involve known and unknown risks and uncertainties that could cause actual results, performance or events to differ materially from those expressed or implied in such statements. We assume no obligation to update any forward-looking statement.

Investing involves risk.The value of an investment and the income from it may fall as well as rise and investors might not get back the full amount invested. Investing in fixed income instruments may expose investors to various risks, including but not limited to creditworthiness, interest rate, liquidity and restricted flexibility risks. Changes to the economic environment and market conditions may affect these risks, resulting in an adverse effect to the value of the investment. During periods of rising nominal interest rates, the values of fixed income instruments (including positions with respect to short-term fixed income instruments) are generally expected to decline. Conversely, during periods of declining interest rates, the values of these instruments are generally expected to rise. Liquidity risk may possibly delay or prevent account withdrawals or redemptions. The volatility of fund unit/share prices may be increased or even strongly increased. Past performance does not predict future returns. If the currency in which the past performance is displayed differs from the currency of the country in which the investor resides, then the investor should be aware that due to the exchange rate fluctuations the performance shown may be higher or lower if converted into the investor’s local currency. This is for information only and not to be construed as a solicitation or an invitation to make an offer, to conclude a contract, or to buy or sell any securities. The products or securities described herein may not be available for sale in all jurisdictions or to certain categories of investors. This is for distribution only as permitted by applicable law and in particular not available to residents and/ or nationals of the USA. The investment opportunities described herein do not take into account the specific investment objectives, financial situation, knowledge, experience or specific needs of any particular person and are not guaranteed. The Management Company may decide to terminate the arrangements made for the marketing of its collective investment undertakings in accordance with applicable de-notification regulation. The views and opinions expressed herein, which are subject to change without notice, are those of the issuer companies at the time of publication. The data used is derived from various sources, and assumed to be correct and reliable at the time of publication. The conditions of any underlying offer or contract that may have been, or will be, made or concluded, shall prevail. The duplication, publication, or transmission of the contents, irrespective of the form, is not permitted; except for the case of explicit permission by Allianz Global Investors GmbH.

For investors in Europe (excluding Switzerland & the United Kingdom): For a free copy of the sales prospectus, incorporation documents, daily fund prices, Key Information Document, latest annual and semi-annual financial reports, contact the issuer at the address indicated below or www.allianzgi-regulatory. eu. Austrian investors may also contact the Austrian information agent Erste Bank der österreichischen Sparkassen AG, Am Belvedere 1, AT-1100 Vienna. Please read these documents, which are solely binding, carefully before investing. This is a marketing communication issued by Allianz Global Investors GmbH, www.allianzgi.com, an investment company with limited liability, incorporated in Germany, with its registered office at Bockenheimer Landstrasse 42-44, 60323 Frankfurt/M, registered with the local court Frankfurt/M under HRB 9340, authorised by Bundesanstalt für Finanzdienstleistungsaufsicht (www.bafin.de). Allianz Global Investors GmbH has established branches in France, Italy, Spain, Luxembourg, Sweden, Belgium and the Netherlands. Contact details and information on the local regulation are available here (www.allianzgi.com/Info). The Summary of Investor Rights is available in English, French, German, Italian and Spanish at https://regulatory.allianzgi.com/en/investors-rights

For investors in Switzerland: For a free copy of the sales prospectus, incorporation documents, daily fund prices, key investor information, latest annual and semi-annual financial reports, contact [the Swiss funds’ representative and paying agent BNP Paribas Securities Services, Paris, Zurich branch, Selnaustrasse 16, CH-8002 Zürich – for Swiss retail investors only] or the issuer either electronically or by mail at the given address. Please read these documents, which are solely binding, carefully before investing. This is a marketing communication issued by Allianz Global Investors (Schweiz) AG, a 100% subsidiary of Allianz Global Investors GmbH. The Summary of Investor Rights is available in English, French, German, Italian and Spanish at https:// regulatory.allianzgi.com/en/investors-rights

For investors in the United Kingdom: For a free copy of the sales prospectus, incorporation documents, daily fund prices, Key Investor Information Document, latest annual and semi-annual financial reports, contact the issuer at the address indicated below or regulatory.allianzgi.com. Please read these documents, which are solely binding, carefully before investing. This is a marketing communication issued by Allianz Global Investors UK Limited, 199 Bishopsgate, London, EC2M 3TY, www.allianzglobalinvestors.co.uk. Allianz Global Investors UK Limited, company number 11516839, is authorised and regulated by the Financial Conduct Authority. Details about the extent of our regulation are available from us on request and on the Financial Conduct Authority’s website (www.fca.org.uk). The duplication, publication, or transmission of the contents, irrespective of the form, is not permitted; except for the case of explicit permission by Allianz Global Investors UK Limited. January 2025



LDS-250018

Explore Insights

Equity

As China welcomes the Year of the Horse on 17 February 2026, anticipation is building. The Horse, symbolizing strength, freedom, and speed, points to a year likely marked by vitality and dynamic change.

Read More

Navigating Rates

A divergence between tech exporters and demand-led economies, a “rewiring from within” thanks to regional trade, and less dependence on developed markets – here are our top macro themes for Asian fixed income investors this year.

Read More

Navigating Rates

The boom in artificial intelligence is creating exciting growth opportunities but also risks. We examine the geopolitical and cyber threats involved with this emerging technology.

Read More

Allianz Global Investors

You are now leaving the Allianz Global Investors’ website and being redirected to

Welcome to the Allianz Global Investors website dedicated to the United Kingdom

Select Role
  • Adviser & Wealth Manager
  • Individual Investor
  • Institutional Investor
  • You have connected to this site as a “Professional” as defined by MiFID.  To continue, you must have the experience and knowledge required in investment management, particularly regarding the risks involved in accessing this site.

    If you are not a “Professional” client, we invite you to leave this page and reconnect on the “Individuals” page from the Allianz Global Investors website.

    US persons: The information shown on this site is not intended for US citizens, US nationals, or to those US persons such as defined by “Regulation S” of the Securities and Exchange Commission under the Security Act of 1933.

    This site is only intended to provide information on Allianz Global Investors and the products authorised for marketing in the UK.  The information presented on this site does not constitute an offer to sell or subscribe to a financial instrument.

    The information, and opinions expressed on this site are subject to change and may be modified at any time and without prior warning.

    Your access is subject to the UK regulation and to the legal terms and general conditions of access to this site.

    In choosing to access our site, you acknowledge that you understand and accept these conditions.  We advise, for your best interest, to read these conditions carefully.

    Please read the following page carefully before proceeding as it contains important information concerning your use of the website and explains certain legal and regulatory restrictions applicable to any investment in Allianz Global Investors investment products. By pressing ‘Accept’ you agree that you have read and understood the following information.

    The material on this site is directed only at persons in the UK and does not constitute an offer or invitation to buy or sell the funds to persons in any jurisdiction other than the UK.

    Allianz Global Investors (AllianzGI) has taken reasonable care to ensure the accuracy of information available through the site. However, the information may be amended at any time by AllianzGI without notice. As far as it is permitted under the Financial Services and Markets Act 2000, AllianzGI does not accept liability for any loss, direct or indirect, owing to reliance on any information contained herein.

    The views and opinions expressed herein, which are subject to change without notice, are those of the issuer companies at the time of publication.  They are subject to change and should not be interpreted as investment advice which AllianzGI is not authorised to give.

    This site may provide links to third party websites over which AllianzGI has no control. These links are provided for your convenience and AllianzGI accepts no responsibility for the content of such websites.

    For your security we may record or randomly monitor all telephone calls.

    A word of warning
    Past performance does not predict future returns. The value of an investment and the income from it may fall as well as rise and investors might not get back the full amount invested. Exchange rate fluctuations may vary causing the value of overseas investments to go down or up. For your own security any calls may be recorded and randomly monitored.

    For information on any specific risks associated with our funds and products please see our Key Investor Information Documents (KIIDs) and Supplementary Information Documents (SIDs).

    The use of this website is subject to English Law and any dispute will fall under the jurisdiction of the English courts.

    Regulation and Status Disclosure
    Allianz Global Investors represents products and services of Allianz Global Investors UK Limited, www.allianzglobalinvestors.co.uk. Allianz Global Investors UK Limited is an investment company incorporated in the United Kingdom, with its registered office at 199 Bishopsgate, London, EC2M 3TY.

    Allianz Global Investors UK Limited, company number 11516839, is authorised and regulated by the Financial Conduct Authority. Details about the extent of our regulation are available from us on request and on the Financial Conduct Authority's website (www.fca.org.uk). The duplication, publication, or transmission of the contents, irrespective of the form, is not permitted; except for the case of explicit permission by Allianz Global Investors UK Limited.  

    Throughout the website Allianz Global Investors UK Limited may sometimes be referred to as Allianz Global Investors or AllianzGI.

    Copyright
    Copyright in this website is owned by Allianz Global Investors UK Limited. The copyrights of third parties are reserved.

    You may download or print a hard copy of individual pages and/or sections of the website, provided that you do not remove any copyright or other proprietary notices. Any downloading or other copying from the website will not transfer title to any software or material to you.

    You may not reproduce (in whole or part), transmit (by electronic means or otherwise), modify, link or use for any public or commercial purpose the website without the prior permission of Allianz Global Investors.

    Cookies
    Allianz Global Investors UK Limited uses session cookies for the purpose of saving data relating to the management of a user session in the memory of the web browser on the user's computer. By cookie it is meant the small text file that is stored on the hard disk of a computer by the web browser on the said computer. Such file contains information sent by the web server of the Website that a user has visited. The information derived from session cookies enables Allianz Global Investors UK Limited to identify which areas of the Website are seemingly of more interest to users so that it can improve the Website and the information provided to users. The data which is stored via session cookies does not include any private information regarding the user, and is erased as soon as the browser is shut down. It is to be noted that most web browsers are set up in such a way that they automatically accept cookies. Users can, however, amend the configuration of the web browser on their computers so that they are systematically notified of any instance where the Websites that they are about to visit contain cookies.

Please check the checkbox to accept the terms and conditions.