Hi guys

Following code snippet is leaking 1-2 MB of RAM per second in live test (paper or IB, doesn't matter):

 

import talib

class BasicTemplateAlgorithm(QCAlgorithm):

def Initialize(self):

self.SetCash(10000)
self.SetStartDate(2017,1,1)
self.SetEndDate(2017,1,10)

self.spy = self.AddEquity('SPY', Resolution.Minute)
self.spy.MarginModel = PatternDayTradingMarginModel()

def OnData(self, slice):
return

 

It runs out of memory on 512MB server in about 20 minutes. Am I doing something wrong?