1. Modify the code in Section 4.7 to apply an exponential time-decay factor. 2. Consider you have…

1. Modify the code in Section 4.7 to apply an exponential time-decay factor.

2. Consider you have applied meta-labels to events determined by a trend-following model. Suppose that two thirds of the labels are 0 and one third of the labels are 1.

(a) What happens if you fit a classifier without balancing class weights?

(b) A label 1 means a true positive, and a label 0 means a false positive. By applying balanced class weights, we are forcing the classifier to pay more attention to the true positives, and less attention to the false positives. Why does that make sense?

(c) What is the distribution of the predicted labels, before and after applying balanced class weights?