in 4_Kinesis/model/algo_base.py [0:0]
def next(self):
dt=self.datas[0].datetime.datetime(0)
#print("[NEXT]:%s:close=%s" % (dt,self.dataclose[0]))
#SOM
if self.lastMonth!=dt.month:
if self.lastMonth!=-1:
chg=self.broker.getvalue()-self.monthCash
print("[%s] SOM:chg=%.2f,cash=%.2f" % (dt,chg,self.broker.getvalue()))
self.lastMonth=dt.month
self.monthCash=self.broker.getvalue()
#SOD
if self.lastDay!=dt.day:
self.lastDay=dt.day
print("[%s] SOD:cash=%.2f" % (dt,self.broker.getvalue()))