Improve performance of OptionChain (#8359)
Report Generator Tests / 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
Python Virtual Environments / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
Report Generator Tests / 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
Python Virtual Environments / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
- Improve performance of OptionChain by creating a single pandas df
This commit is contained in:
@@ -37,7 +37,7 @@ class OptionChainFullDataRegressionAlgorithm(QCAlgorithm):
|
||||
|
||||
# Get the contract with the latest expiration date.
|
||||
# Note: the result of df.loc[] is a series, and its name is a tuple with a single element (contract symbol)
|
||||
self._option_contract = contracts.loc[contracts.expiry.idxmax()].name[0]
|
||||
self._option_contract = contracts.loc[contracts.expiry.idxmax()].name
|
||||
|
||||
self.add_option_contract(self._option_contract)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user