Revert "Merge pull request #1526 from AlexCatarino/python3"

This reverts commit 2e523992d0, reversing
changes made to fa48fc23ea.
This commit is contained in:
Stefano Raggi
2018-02-14 16:03:12 +01:00
parent 7246b8b6b6
commit a39e6a8e28
75 changed files with 245 additions and 241 deletions
@@ -33,7 +33,7 @@ from datetime import timedelta
class BasicTemplateFuturesAlgorithm(QCAlgorithm):
def Initialize(self):
self.SetStartDate(2013, 10, 7)
self.SetStartDate(2013, 10, 07)
self.SetEndDate(2013, 10, 11)
self.SetCash(1000000)
@@ -49,7 +49,7 @@ class BasicTemplateFuturesAlgorithm(QCAlgorithm):
if not self.Portfolio.Invested:
for chain in slice.FutureChains:
# Get contracts expiring no earlier than in 90 days
contracts = list(filter(lambda x: x.Expiry > self.Time + timedelta(90), chain.Value))
contracts = filter(lambda x: x.Expiry > self.Time + timedelta(90), chain.Value)
# if there is any contract, trade the front contract
if len(contracts) == 0: continue