When I use top and bottom, this is applied to the entire universe (before QTradableUniverse Filter is applied), so this:
shorts = Returns(window_length=2).top(1)
longs = Returns(window_length=2).bottom(1)
picks the top 1 and bottom 1 of the entire universe. Is it possible to change it such that it is applied to QTradableUniverse only?
The attached notebook illustrates how the top 1 and bottom 1 are not part of the QTradableUniverse and thus I get an empty dataframe (note: I do understand that I could just remove the QTradableUniverse filter and then I would get the top 1 and bottom 1 of the entire universe- but that is not what I want. I want the top 1 and bottom 1 of the QTradableUniverse).