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
@@ -19,14 +19,14 @@ from OptionPriceModelForOptionStylesBaseRegressionAlgorithm import OptionPriceMo
### that supports European style options and asserting that the option price model is used.
### </summary>
class OptionPriceModelForSupportedEuropeanOptionRegressionAlgorithm(OptionPriceModelForOptionStylesBaseRegressionAlgorithm):
def Initialize(self):
self.SetStartDate(2021, 1, 14)
self.SetEndDate(2021, 1, 14)
def initialize(self):
self.set_start_date(2021, 1, 14)
self.set_end_date(2021, 1, 14)
option = self.AddIndexOption("SPX", Resolution.Hour)
option = self.add_index_option("SPX", Resolution.HOUR)
# BlackScholes model supports European style options
option.PriceModel = OptionPriceModels.BlackScholes()
option.price_model = OptionPriceModels.black_scholes()
self.SetWarmup(7, Resolution.Daily)
self.set_warmup(7, Resolution.DAILY)
self.Init(option, optionStyleIsSupported=True)
self.init(option, option_style_is_supported=True)