ML algorithms and economic basis?

How do we turn the characteristics from a ML black box into an economic theory that can be tested as a trading strategy?



Hello everyone,

I have a question about the interpretability of Machine Learning models applied to finance. Indeed, it is often written that "the trading strategy is only here to test an economic theory"



For example, in Marco Lopez de Prado's book "Advances financial Machine learning", he explains that we must perfectly understand the economic mechanism that makes us earn money that someone else will lose. In the book, the following examples are given "Is it a behavioral bias? Asymmetric information? Regulatory constraints?"



This brings us to my question (I haven't totally finished the book but I can't find a clear answer, hence my subscription to the group to try to find some answers). How to create an economic theory based on the result of a Machine Learning algorithm? Any information, link or other would be very useful. (An example, even of a losing strategy with its economic reasoning, would be great if you know where to find one. Thanks in advance for your help.

Hello Lucas,  

In the book you have mentioned, the author is reiterating a few things.

"The goal of the strategist is to make
sense of all these observations and to formulate a general theory that explains them"

This says that one must make sense of features used in the machine learning algorithm through a general theory you can come up with or by any standard economic theory...
This also translates to saying that it is advisable to use features that have some backing of an economic theory or a general theory than just randomly selecting a huge set of features. 

This is reiterated by another statement from the same book

"The theory needs to explain a large collection of
important features. In particular, a theory must identify the economic mechanism that
causes an agent to lose money to us".

Now, coming to your question- How to create an economic theory based on the result of a Machine Learning algorithm?

This is not the right approach in general and is also explained in the book.
You come up with the theory first and then select features and an ML model to test the theory. And also, the theory can be properly tested by the ML model only when all relevant features are selected. 
You can read about omitted-variable bias (OVB)  here

To be specific, when you are creating an ML model for trading, you should ask the following questions

1) Interpretability of model mechanism and results 
--Are you able to understand how the model is working with features? Does it make sense to do those calculations (done by the model) on the features?
--Are you able to make sense of the model results? is there any economic theory (or a general logic) that explains the results?

2) Can you attribute your model performance to known sources of alpha and risk?

For example, if you are creating an ML-based investment strategy using different market sentiment indicators as features. You can check how your model is acting at extremely negative or positive market sentiments. Do the results of the model account for these sources of alpha and risks? Cause as a general theory, you expect your holdings to underperform at times of extreme negative market sentiment and overperform at times of extreme bullish sentiment.

So, to summarise, 

The goal of the strategist is to make
sense of all these observations and formulate a general theory that explains them.
Therefore, the strategy is merely an experiment designed to test the validity of this
theory. (But not a method to create an economic theory)

Hope this helps!

 

Can you give me an example of a economic theory with its ML algo? Maybe from one of the Quantre courses, I have nearly all of them

Hello Lucas, you can test the efficient market hypothesis (EMH) with machine learning implementation of Natural language processing (NLP).



The EMH is an investment theory that states that financial markets are efficient and that it is impossible to consistently achieve abnormal returns on investment through the use of fundamental or technical analysis. It follows that prices of securities reflect all available information and any new information is quickly absorbed into prices.



There are several ways that NLP could potentially be used to test the EMH. For example, you can use NLP techniques to analyze large amounts of financial news articles or social media posts to see if they contain any information that could potentially be used to predict future stock price movements. This could be used to determine whether or not there is a relationship between the information contained in these sources and stock prices, which could provide some insight into the efficiency of financial markets.



You refer to Natural Language Processing in Trading course in which the ensemble machine learning algorithm XGBoost was used to predict the sentiment of the news headlines by implementing the BERT (Bidirectional Encoder Representations from Transformers) model. 

I hope this helps!

Thanks a lot for that amazing exaplantion, but I do not find a lot of examples to truly understand the idea. Can you give me more examples or do you know where can I find a list with some examples please?



It should be very helpful for me! Thanks in advance!



 

Can you give me an example based on technical indicator or one of the ML algo in your course please because I do not work with NLP?

Hello Lucas, 

You can also use technical indicator-based strategies to disprove the efficient market hypothesis (EMH). As per EMH, neither technical nor fundamental analysis can produce risk-adjusted excess returns (alpha) consistently, and only inside information can result in outsized risk-adjusted returns.



So, if you created a technical analysis-based strategy that consistently generates results, then it would disprove EMH. You can refer to many of the Quantra courses on technical indicator-based strategies. 



In addition to this, you can also check the Post Earnings Announcement Drift (PEAD) strategy explained in Day Trading Strategies for Beginners course (link).



The earnings announcement moves stock prices, and the movement will continue for some time in the same direction after the announcement as per the PEAD hypothesis. For example, if a company announces good earnings, the company's stock price will move in an upward direction, and it will persist in the upward direction for some time. 



This disproves EMH where the current price is expected to include all information released so far and any strategy that is trying to predict the price/direction as per past information (earnings release in this example) wouldn't generate consistent returns.



I hope this helps!