SSRN Id3177534 PDF

Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

Financial Machine Learning

in 10 Minutes

Marcos López de Prado


ORIE - Cornell University

Electronic copy available at: https://ssrn.com/abstract=3177534


Key Points
• Most publications in Financial ML seem concerned with forecasting prices.
• While these are worthy endeavors, Financial ML can offer much more.
• Over the next 10 minutes, we will review a few important applications:
– Portfolio construction
– Structural breaks
– Bet sizing
– Feature importance
– Detection of false investment strategies (backtest overfitting)

• ML does not need to be a “black box.” Black-box ML is a choice, not a


characteristic.

2
Electronic copy available at: https://ssrn.com/abstract=3177534
1. Portfolio Construction
• Most firms continue to allocate trillions of dollars using mean-variance portfolio
optimization (MVO). “The most expensive piece of beautiful math in history.”
• It is widely known that MVO underperforms the naïve allocation out-of-sample (De
Miguel et al. [2009]).
• In contrast, ML solutions outperform MVO (and 1/N) out-of-sample, with gains in
Sharpe ratio that exceed 31% (López de Prado [2016]).

Covariance-based models require


the independent estimation of
𝑁 𝑁 + 1 /2 variables.

ML models need only 𝑁 − 1


hierarchical estimates, making them
more robust and reliable.

3
Electronic copy available at: https://ssrn.com/abstract=3177534
2. Structural Breaks
• A recurrent criticism of quantitative models is that they are “fit to fail.”
– That may be true of simple linear regression models, like the ones used in Econometric analysis.
• ML models are particular good at detecting change, even in chaotic systems.
– ML models can be designed to compute the probability that an observation belongs to previously
observed clusters.
– The goal of such models is to derive a regime switch probability, not to make a point prediction.

ML models can feed on large amounts of unstructured data


to detect the preconditions of a model’s break.

For example, SADF series can be used to determine when


prices exhibit bubble-like patterns, and therefore mean-
reverting models should be avoided.

The purpose of those ML algorithms is to estimate the


probability of a regime switch, rather than predict a price.
4
3. Bet Sizing
• Suppose that you have a model for making a buy-or-sell decision:
– You just need to learn the size of that bet, which includes the possibility of no bet at all (zero size).
– This is a situation that practitioners face regularly. We often know whether we want to buy or sell a
product, and the only remaining question is how much money we should risk in such bet.
– Meta-labeling: Label the outcomes of the primary model as 1 (gain) or 0 (loss).

• Meta-labeling builds a secondary ML model that learns


how to use a primary exogenous model.
• The secondary model does not learn the side. It only
learns the size.
• We can maximize the F1-score:
𝑝𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛 ∙ 𝑟𝑒𝑐𝑎𝑙𝑙
𝐹1 = 2
𝑝𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛 + 𝑟𝑒𝑐𝑎𝑙𝑙
𝑇𝑃
𝑝𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛 =
𝑇𝑃 + 𝐹𝑃
𝑇𝑃
𝑟𝑒𝑐𝑎𝑙𝑙 =
𝑇𝑃 + 𝐹𝑁
5
4. Feature Importance
• ML algorithms identify patterns in a high dimensional space.
• These patterns associate features with outcomes.
• The nature of the relationship can be extremely complex, however we can always
study what features are more important.
– E.g., even if a ML algorithm may not derive an analytical formula for Newton’s Gravitational Law, it will
tell us that mass and distance are the key features.

In traditional statistical analysis, key features are often missed as a


result of the model’s misspecification.

In ML analysis, we give up closed-form specifications in exchange for


identifying what variables are truly relevant.

Once we know what are the factors at play, we can develop a theory
of how.

6
5. Detection of False Investment Strategies
The y-axis displays the distribution of the maximum Sharpe ratios
(max{SR}) for a given number of trials (x-axis). A lighter color indicates a
higher probability of obtaining that result, and the dash-line indicates
the expected value.
For example, after only 1,000 independent backtests, the expected
maximum Sharpe ratio (E[max{SR}]) is 3.26, even if the true Sharpe ratio
of the strategy is zero!
Most quantitative firms invest in false discoveries.
Solution: Deflate the Sharpe ratio by the number and variance of trials.
Stats Cluster 0 Cluster 1 Cluster 2 Cluster 3
Strat Count 3265 1843 930 347 The selected strategy belongs to
aSR 1.5733 1.4907 2.0275 1.0158
SR 0.0974 0.0923 0.1255 0.0629 Cluster 2. After taking into
Skew -0.3333 -0.4520 -0.4194 0.8058 account the number and
Kurt 11.2773 6.0953 7.4035 14.2807
T 2172 2168 2174 2172 variance of trials involved in the
StartDt
EndDt
2010-01-04
2018-05-01
2010-01-04
2018-04-25
2010-01-04
2018-05-03
2010-01-04
2018-05-01
discovery, the probability that
Freq 261.0474 261.0821 261.1159 261.0474 𝑆𝑅 > 0 is virtually 1. Hence, the
sqrt(V[SR_k]) 0.0257 0.0256 0.0256 0.0257
E[max SR_k] 0.0270 0.0270 0.0270 0.0270
backtest is unlikely to be overfit.
DSR 0.9993 0.9985 1.0000 0.9558
7
For Additional Details
The first wave of quantitative innovation in finance was led by Markowitz
optimization. Machine Learning is the second wave and it will touch every
aspect of finance. López de Prado’s Advances in Financial Machine Learning is
essential for readers who want to be ahead of the technology rather than
being replaced by it.
— Prof. Campbell Harvey, Duke University. Former President of the American
Finance Association.

Financial problems require very distinct machine learning solutions. Dr. López
de Prado’s book is the first one to characterize what makes standard machine
learning tools fail when applied to the field of finance, and the first one to
provide practical solutions to unique challenges faced by asset managers.
Everyone who wants to understand the future of finance should read this
book.
— Prof. Frank Fabozzi, EDHEC Business School. Editor of The Journal of
Portfolio Management.

8
THANKS FOR YOUR ATTENTION!

9
Bio
Dr. Marcos López de Prado is the chief executive officer of True Positive Technologies. He founded Guggenheim
Partners’ Quantitative Investment Strategies (QIS) business, where he developed high-capacity machine
learning (ML) strategies that consistently delivered superior risk-adjusted returns. After managing up to $13
billion in assets, Marcos acquired QIS and spun-out that business from Guggenheim in 2018.

Since 2010, Marcos has been a research fellow at Lawrence Berkeley National Laboratory (U.S. Department of
Energy, Office of Science). One of the top-10 most read authors in finance (SSRN's rankings), he has published
dozens of scientific articles on ML and supercomputing in the leading academic journals, and he holds multiple
international patent applications on algorithmic trading.

Marcos earned a PhD in Financial Economics (2003), a second PhD in Mathematical Finance (2011) from
Universidad Complutense de Madrid, and is a recipient of Spain's National Award for Academic Excellence
(1999). He completed his post-doctoral research at Harvard University and Cornell University, where he teaches
a Financial ML course at the School of Engineering. Marcos has an Erdős #2 and an Einstein #4 according to the
American Mathematical Society.

10
Disclaimer
• The views expressed in this document are the authors’ and do not necessarily
reflect those of the organizations he is affiliated with.
• No investment decision or particular course of action is recommended by this
presentation.
• All Rights Reserved.

11

You might also like