Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
QTU Not Working For Me

On some of my algorithms, despite making sure the Quantopian Universe is added first to the universe Im sorting through, and despite adding it to my pipelines, the final backtest says the QTU was not used.

This is a big problem for me as this is currently effecting my best/favorite strategies I've developed on Quantopian.

I've linked an algorithm that is similar in structure to some of my own, that I believe should use the QTU, but results say do not. This particular one was most of my confidential/proprietary factors removed.

I'd very much appreciate any help figuring out what is causing this, as I have tried several approaches to fix it, and yet I'm still somehow not in the QTU.

Thanks,
Paul

4 responses

Here's an updated version of the algorithm with a Sharpe of 0.74, and all risk constraints except turnover met, just to keep things entertaining, and maybe to inspire someone.

Hi Paul,

There is an known issue with regards to the use of the TargetWeights construct of the Optimize API with QTU as discussed here and a possible fix can be found here stat-arb-11-year-backtest-notebook Hope this helps.

This is getting frustrating, I implemented a fix from the above post, where the algorithm looks through the portfolio weekly to find the "stuck" positions and sell them.

The fix quite simply did not work. I've linked the example algorithm and backtest here. Which again, somehow didn't pass the QTU restraint.

I tried doing a daily portfolio check, which did kind of work, as in passed QTU restraint, but somehow reduced leverage by ~15%, and somehow screwed the constraints on the algorithm.

I'm sorry to say this, but Quantopian should have a means where I can assign the weights I intend and get the optimal-order api to work. I'd like to submit what is a very good algorithm in my opinion (which has this problem), and if this continues I would like to see the QTU constraint calculated weekly or more loosely, as I see this to primarily be a problem on your end, not with my algorithm.

While MaximizeAlpha does seem to work, it radically changes the intent of my strategy, seemingly unpredictably, and shouldn't be a requirement to submit an algorithm imo.

I hope this is considered as I'd very much like to continue to submit quality work to Quantopian.

I just tried MaximizeAlpha with my favorite algorithm (which is intended to work with TargetWeights), and even with MaximizeAlpha used instead, it did NOT pass the structural constraint of "in QTU", despite trading on a weekly basis, and holding significant positions of stocks.

I am hoping to demonstrate this on an example algorithm soon.