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
@@ -30,8 +30,8 @@ class OptionOpenInterestRegressionAlgorithm(QCAlgorithm):
def Initialize(self):
self.SetCash(1000000)
self.SetStartDate(2014,6,5)
self.SetEndDate(2014,6,6)
self.SetStartDate(2014,06,05)
self.SetEndDate(2014,06,06)
option = self.AddOption("TWX")
@@ -47,12 +47,12 @@ class OptionOpenInterestRegressionAlgorithm(QCAlgorithm):
for contract in chain.Value:
if float(contract.Symbol.ID.StrikePrice) == 72.5 and \
contract.Symbol.ID.OptionRight == OptionRight.Call and \
contract.Symbol.ID.Date == datetime(2016, 1, 15):
if slice.Time.date() == datetime(2014, 6, 5).date() and contract.OpenInterest != 50:
contract.Symbol.ID.Date == datetime(2016, 01, 15):
if slice.Time.date() == datetime(2014, 06, 5).date() and contract.OpenInterest != 50:
raise ValueError("Regression test failed: current open interest was not correctly loaded and is not equal to 50")
if slice.Time.date() == datetime(2014, 6, 6).date() and contract.OpenInterest != 70:
if slice.Time.date() == datetime(2014, 06, 6).date() and contract.OpenInterest != 70:
raise ValueError("Regression test failed: current open interest was not correctly loaded and is not equal to 70")
if slice.Time.date() == datetime(2014, 6, 6).date():
if slice.Time.date() == datetime(2014, 06, 6).date():
self.MarketOrder(contract.Symbol, 1)
self.MarketOnCloseOrder(contract.Symbol, -1)