QuantConnect / QuantConnect/Lean
No Universe Selection Model for Future Options
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 21.7k
- Forks
- 5.3k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 34
Description
Expected Behavior
We have a universe selection model for FOP.
Actual Behavior
There is no universe selection model for FOP.
Potential Solution
Add a universe selection model for FOP.
Reproducing the Problem
If you run
from Selection.OptionUniverseSelectionModel import OptionUniverseSelectionModel
class AdaptableAsparagusMule(QCAlgorithm):
def Initialize(self):
self.SetStartDate(2020, 12, 28) # Set Start Date
self.SetCash(100000) # Set Strategy Cash
self.SetUniverseSelection(OptionUniverseSelectionModel(timedelta(days=1), self.option_chain_symbol_selector))
def option_chain_symbol_selector(self, utc_time: datetime) -> List[Symbol]:
return [Symbol.Create(Futures.Indices.SP500EMini, SecurityType.FutureOption, Market.CME)]
then we get
During the algorithm initialization, the following exception has occurred: Cannot create future option Symbol using this method (insufficient information). Use
CreateOption(Symbol, ...)instead.
If we use CreateOption, we have to specify the OptionStyle, OptionRight, Strike, and Expiry instead of getting all of the FOP contracts for the Future.
System Information
QC Cloud.
Checklist
- I have completely filled out this template
- I have confirmed that this issue exists on the current
masterbranch - I have confirmed that this is not a duplicate issue by searching issues
- I have provided detailed steps to reproduce the issue
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the OptionUniverseSelectionModel and SetUniverseSelection entry points shown in the reproduction, then inspect how Symbol.Create and CreateOption handle future-option symbols. Done means a universe selection model can select future option contracts without requiring a specific style, right, strike, and expiry for each contract.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, fintech-quant, python
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100