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
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user