pep8 conversion of python algos #12 (#7954)
Python Virtual Environments / build (push) Has been cancelled
API Tests / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
Report Generator Tests / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled

* pep8 conversion

* PEP8 updates/fixes

* Update pythonnet version to 2.0.35

---------

Co-authored-by: Jhonathan Abreu <jdabreu25@gmail.com>
This commit is contained in:
Louis Szeto
2024-04-20 04:55:48 +08:00
committed by GitHub
parent b64ad5f68a
commit fa886eba79
27 changed files with 272 additions and 273 deletions
@@ -18,16 +18,16 @@ from AlgorithmImports import *
### </summary>
class OptionDataNullReferenceRegressionAlgorithm(QCAlgorithm):
def Initialize(self):
self.SetStartDate(2016, 12, 1)
self.SetEndDate(2017, 1, 1)
self.SetCash(500000)
def initialize(self):
self.set_start_date(2016, 12, 1)
self.set_end_date(2017, 1, 1)
self.set_cash(500000)
self.AddEquity("DUST")
self.add_equity("DUST")
option = self.AddOption("DUST")
option = self.add_option("DUST")
option.SetFilter(self.UniverseFunc)
option.set_filter(self.universe_func)
def UniverseFunc(self, universe):
return universe.IncludeWeeklys().Strikes(-1, +1).Expiration(timedelta(25), timedelta(100))
def universe_func(self, universe):
return universe.include_weeklys().strikes(-1, +1).expiration(timedelta(25), timedelta(100))