Add QCAlgorithm.OptionChain() method to fetch option chains (#8316)
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
Python Virtual Environments / build (push) Has been cancelled

* Add new QCAlgorithm.OptionChain method to get full data option chain

* Add extension method to get canonical symbol

* Support future options in new OptionChain method

* Replace option chain provider with OptionChain method in some regression algorithms

* Add new regression algorithms for OptionChain method

* Replace option chain provider with OptionChain method in some regression algorithms

* Minor

* Cleanup

* Minor changes in regression algorithms

* Minor adjustments
This commit is contained in:
Jhonathan Abreu
2024-09-11 15:15:51 -04:00
committed by GitHub
parent 724d0b06a5
commit 16c4259342
64 changed files with 420 additions and 108 deletions
@@ -43,7 +43,7 @@ class AddOptionContractExpiresRegressionAlgorithm(QCAlgorithm):
data: Slice object keyed by symbol containing the stock data
'''
if self._option == None:
options = self.option_chain_provider.get_option_contract_list(self._twx, self.time)
options = self.option_chain(self._twx)
options = sorted(options, key=lambda x: x.id.symbol)
option = next((option