We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OptionChainProvider.GetOptionContractList provides the same symbols as OptionChain
In some cases GetOptionContractList returns an empty list while OptionChain is not empty
GetOptionContractList wraps OptionChain.
The following algorithm logs the days GetOptionContractList returns an empty list while OptionChain is not empty. There are plenty of cases.
class CryingFluorescentPinkDogfish(QCAlgorithm): def initialize(self): self.set_start_date(2023, 4, 29) self.set_cash(100000) spx = self.AddIndex('SPX').Symbol self.canonical_option = Symbol.CreateCanonicalOption(spx, 'SPX', Market.USA, '?SPX') self.Schedule.On(self.DateRules.EveryDay(spx), self.time_rules.before_market_close(spx, 120), self.buy) def buy(self): symbols = self.OptionChainProvider.GetOptionContractList(self.canonical_option, self.time) if not symbols: df = self.option_chain(self.canonical_option).data_frame if not df.empty: self.Log(f'{self.time} : Empty GetOptionContractList and OptionChain is {df.size}')
master
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Expected Behavior
OptionChainProvider.GetOptionContractList provides the same symbols as OptionChain
Actual Behavior
In some cases GetOptionContractList returns an empty list while OptionChain is not empty
Potential Solution
GetOptionContractList wraps OptionChain.
Reproducing the Problem
The following algorithm logs the days GetOptionContractList returns an empty list while OptionChain is not empty. There are plenty of cases.
Checklist
master
branchThe text was updated successfully, but these errors were encountered: