Adv_Fin_ML_Exercises icon indicating copy to clipboard operation
Adv_Fin_ML_Exercises copied to clipboard

Can anyone please help me to explain 'meta-labelling' in the most understandable form ?

Open Chetanbuye12 opened this issue 5 years ago • 7 comments

Chetanbuye12 avatar Nov 05 '18 22:11 Chetanbuye12

Hey,

Assume you have a trading model to decide on the side of a bet, long or short. Usual thing is to open a position right away. Meta labeling is for making a decision on either opening or not opening that position.

In practice, since you know the side of the bet and you have your labels, you already know if this is a profit or a loss (two classes 1,0). Hence, Meta labels are the PNL of the trading strategy.

Using these two classes as the response variable and using your same features set as the input variable, you can train a binary classification model like logistic regression to decide on either opening or not opening those positions. You can also decide on the size of the bet using the probability of the prediction.

mehmetdilek avatar Nov 06 '18 04:11 mehmetdilek

Thanks you very much !! My conclusion (please correct me if I sound wrong) From our trading model we get the side of the bet (as 1 or 0, long or short respectively). We will use this in real environment for trading and get the real output as profit or loss (1 or 0, profit and loss receptively//similar as side). The 'output from model' as input the 'real trading output' as output we train a classifier, depending on the output of classifier we choose our positions ------ This is called Meta-labelling

Chetanbuye12 avatar Nov 06 '18 15:11 Chetanbuye12

I notice that de Prado will add additional inputs, beyond simply side (i.e. moving average plus side are the inputs, and binary output)

Does anybody have insight on which is preferred? Because intuitively, we'd want to add more and more inputs beyond side as a trading signal in live trading

lionelyoung avatar Nov 06 '18 16:11 lionelyoung

My understanding is that we want informative features in addition to the side during meta-labeling training to assist the model in discriminating between profitable and unprofitable signals.

BlackArbsCEO avatar Nov 07 '18 14:11 BlackArbsCEO

I had some similar questions. I Read all the papers in the bib and have built up somewhat of an intuition but still so many questions. I wrote the following notebook on Quantopian illustrating meta labeling but using MNIST data. https://www.quantopian.com/posts/meta-labeling-advances-in-financial-machine-learning-ch-3-pg-50

Later on in the bet sizing chapter de Prado expands a bit more on the relevance of meta labeling.

Jackal08 avatar Jan 26 '19 12:01 Jackal08

My understanding is that we want informative features in addition to the side during meta-labeling training to assist the model in discriminating between profitable and unprofitable signals.

Opened an issue regarding this in the Ch3 notebook.

Jackal08 avatar Mar 02 '19 13:03 Jackal08

It isn't really explained very well theoretically. A few observations: it is basically a meta-probability model if you forget about bet-size and just focus on model B is predicting probability model A is correct given $Y_{pred}^A, X$. If you think of it like that, it is a way of adding capacity to a model (slightly more than double if you use the same model twice) but the first layer has some alternative objecting. A bit like boosting and stacking but the objectives are different between the models.

My suspicous is that when you include context data (X) you almost always are running out of data points if you do anything but classification on a binarized outcome. Quantile regression should help, I didn't see this discussed.

It would be interesting to see some work with these different model objectives but on layers of an algo (a "network"). You could vary the weights on these to go from the fullly disconnected model A to a blend of model A caring about it's objective and the overall objective.

Generally, adding extra objectives has a regularizing effect on these problems. This is likely the most intuitive way to think about if it actually makes sense.

If you take the words literally in the book, he seems to be confounding bet-sizing withe predicting the distribution conditional on the side.

For example, how would you use meta-labeling as Prado discribes it to combine the predictions of many models across many times and assets to make portfolio level decisions?

cottrell avatar Apr 07 '20 16:04 cottrell