Quantitative investing

Random forest

Random forest (RF) is a popular machine learning algorithm.1
Its simplicity and versatility make it one of the most widely used learning algorithms for both regression and classification. It is used in many applications, including tasks as diverse as object recognition, credit risk assessment or purchase recommendations based on prior customer behavior.


In practice, the RF builds a myriad of individual decision trees. A decision tree is a tool that uses a tree-shaped model of possible options and their respective outcomes. It is a way to represent graphically an algorithm that only contains conditional control statements. Individual trees are created based on a random sample of observations in the broader dataset.

The RF then aggregates the individual the trees, a process called ‘bagging’, to get a more accurate and stable prediction. This can be done by averaging the results when the outcome is a number – for example the expected return of a given stock – or by performing a majority vote when predicting a class variable – for example, when the outcome can be ‘true’ or ‘false’, or a type of object.

To use a simple analogy, let’s imagine someone wants to buy a car and seeks advice from friends. The first friend may ask about the type of powertrain the person may be interested in, depending on the type of intended use (long vs. short distances, daily use vs. holidays only, city vs. countryside) and may come up with a recommendation based on the answers given to these possible choices.

The second friend may ask about the desired driving experience and come up with a very different decision tree (high vs. low driving position, quiet vs. sporty). The third friend may have more of an affinity for design and would therefore ask a series of questions about the desired shape of the vehicle. And so on. In the end, the person will choose the car that was most frequently recommended.

Among the advantages of RFs are the fact that they limit chances of overfitting, improve prediction accuracy and have results that tend to remain relatively stable as datasets grow. On the other hand, the main drawback of RFs is that a large number of trees could render the algorithm too slow and ineffective for real-time predictions.

In the asset management industry, random forest algorithms are being increasingly used for a number of machine learning applications, such as forecasting stock returns2 or predicting distress risk. 3

As technology advances, so do the opportunities for quantitative investors. By incorporating more data and leveraging advanced modelling techniques, we can develop deeper insights and enhance decision-making.

Footnotes

1 Breiman, L., 2001, “Random forests”, Machine learning, Vol. 45, No. 1, pp. 5–32.
2 See for example: Dixon, M., Klabjan, D. and Bang, J. H., 2017, "Classification-based financial markets prediction using deep neural networks”, Algorithmic Finance. See also: Khaidem, L., Saha, S. and Dey, S. R., 2016 "Predicting the direction of stock market prices using random forest”, working paper.
3 See for example: Shen, F., Liu, Y., Lan, D. and Li, Z., 2019, “A dynamic financial distress forecast model with time-weighting based on random forest”. In: Xu, J., Cooke, F., Gen, M. and Ahmed, S. (eds), “Proceedings of the twelfth international conference on management science and engineering management”.

Let's keep the conversation going

Keep track of fast-moving events in sustainable and quantitative investing, trends and credits with our newsletters.

Stay updated
Robeco

Robeco aims to enable its clients to achieve their financial and sustainability goals by providing superior investment returns and solutions.

Important information This disclaimer applies to any documents and the verbal or written comments of any person in presentations or webinars on this website and taken together is referred to herein as the “Information”. The services to which the Information relate are NOT FOR RETAIL CLIENTS - The information contained in the Website is solely intended for professional investors, defined as investors which (1) qualify as professional clients within the meaning of the Markets in Financial Instruments Directive (MiFID), (2) have requested to be treated as professional clients within the meaning of the MiFID or (3) are authorized to receive such information under any other applicable laws and must not be relied or acted upon by any other persons. This Information does not constitute an offer to sell, or a solicitation of an offer to buy, any financial product, and may not be relied upon in connection with the purchase or sale of any financial product. You are cautioned against using this Information as the basis for making a decision to purchase any financial product. To the extent that you rely on the Information in connection with any investment decision, you do so at your own risk. The Information does not purport to be complete on any topic addressed. The Information may contain data or analysis prepared by third parties and no representation or warranty about the accuracy of such data or analysis is provided.
In all cases where historical performance is presented, please note that past performance is not a reliable indicator of future results and should not be relied upon as the basis for making an investment decision. Investors may not get back the amount originally invested. Neither Robeco Institutional Asset Management B.V. nor any of its affiliates guarantees the performance or the future returns of any investments. If the currency in which the past performance is displayed differs from the currency of the country in which you reside, then you should be aware that due to exchange rate fluctuations the performance shown may increase or decrease if converted into your local currency. Robeco Institutional Asset Management B.V. (“Robeco”) expressly prohibits any redistribution of the Information without the prior written consent of Robeco. The Information is not intended for distribution to, or use by, any person or entity in any jurisdiction or country where such distribution or use is contrary to law, rule or regulation. Certain information contained in the Information includes calculations or figures that have been prepared internally and have not been audited or verified by a third party. Use of different methods for preparing, calculating or presenting information may lead to different results. Robeco Institutional Asset Management UK Limited (“RIAM UK”) is authorised and regulated by the Financial Conduct Authority. RIAM UK, 30 Fenchurch Street, Part Level 8, London EC3M 3BD (FCA Reference No:1007814). The company is registered in England and Wales under Ref No. 15362605.

In all cases where historical performance is presented, please note that past performance is not a reliable indicator of future results and should not be relied upon as the basis for making an investment decision. Investors may not get back the amount originally invested. Neither Robeco Institutional Asset Management B.V. nor any of its affiliates guarantees the performance or the future returns of any investments. If the currency in which the past performance is displayed differs from the currency of the country in which you reside, then you should be aware that due to exchange rate fluctuations the performance shown may increase or decrease if converted into your local currency. Robeco Institutional Asset Management B.V. (“Robeco”) expressly prohibits any redistribution of the Information without the prior written consent of Robeco. The Information is not intended for distribution to, or use by, any person or entity in any jurisdiction or country where such distribution or use is contrary to law, rule or regulation. Certain information contained in the Information includes calculations or figures that have been prepared internally and have not been audited or verified by a third party. Use of different methods for preparing, calculating or presenting information may lead to different results. Robeco Institutional Asset Management B.V. is authorised as a manager of UCITS and AIFs by the Netherlands Authority for the Financial Markets and subject to limited regulation in the UK by the Financial Conduct Authority. Details about the extent of our regulation by the Financial Conduct Authority are available from us on request.