Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Ways of dealing with MemoryError

So I've got a data heavy algo that runs for one 6 trading days then busts on a MemoryError. I've got it broken into several CustomFactors and limited to the q500US universe, but aside from dropping data what else can be done?

In the documentation it says "Avoid accumulating an increasing amount of data in each bar of the backtest". Great idea...how do I go about doing this? Once I've computed my indicators on a given day I'm done with the data and don't care to carry it forward. I will recompute new indicators each day.

Thoughts?