Back to Community
How am I NOT trading the tradeable universe when using QTradableStocksUS() ?

In the algorithm environment I'm initializing my custom factor with "Filters.QTradableStocksUS() & Filters.Q3000US()". Then the backtester tells me on the first tab:
"Tradable Universe : No / To be eligible for the contest, algorithms must trade within the Quantopian Tradable Universe"

How is that check carried out exactly? I'm using QTradableStocksUS because I don't want to worry about this.

3 responses

Do you reblance every day? If not, stocks may have fallen out of the universe on days that you didn't rebalance. That can cause this error.

Are you using MaximizeAlpha or TargetWeights? I believe there is a bug with TargetWeights where this can happen in certain scenarios. Apparently Quantopian can't figure out how to fix this? People have posted workarounds in the forum. I don't have a link handy, but try Google.

Oh excellent hint, thank you! Indeed I'm rebalancing weekly. And yes it seems by TargetWeights backtests failed.

If I wasn't clear, these are two different potential issues that can cause that problem.

You can keep your weekly rebalance -- you'll just need to add another daily function that removes positions that have expired from the QTradableStocksUS universe. It is done something along these lines, I believe: