Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Having problem with Algo

So I have created this algo for the competition. I am just having one problem with it. My algo appears to be unable to sustain 90% or greater investment in QTradable stocks. My algo comes withen about 85% or greater most of the time but i can never quite get it to that 90%. I have tried everything I can possibly think of: A filter to get rid of non-Qtradable stocks, adding greater numbers of stockson top of the 120+ I already have, decreasing turnover etc. Can someone review my algo, provide greater detail on this requirement and suggest ways to tackle this problem?

4 responses

I don't mind to review it and help as I have had this issue before. Us the collaborate function to share one-on-one

Hi Subarno,

Try reducing the number of holdings - I find often even slightly may work - say max_num_longs & max_num_shorts at 50:50 to start with.
I'm happy to have a look at snippets of your code - no need to collaborate or the full algorithm - where relevant..

Hope this helps.

@Subarno,

Are you using TargetWeights construct for optimization? There is a known problem when using it to optimize, sometimes it doesn't properly close trades as intended when stock in position is dropped from QTU. I have a temporary workaround fix for this but it is not 100% guaranteed to work all the time. Hope this helps.

@Karl

Thanks for the advice. I will attempt to implement it.