QuantConnect / QuantConnect/Lean

AddFutureOption api refactor

Open
#6,491 0 comments 0 reactions 1 assignee View on GitHub

@jhonabreul is already working on this.

Since Jul 18, 2022.

consistency refactor
Dominant language
C#
Stars
21.7k
Forks
5.3k
Avg merge
2d 22h
Merged PRs (30d)
34

Description

Expected Behavior
  • AddFutureOption follows the AddSecurity/Equity/Option/Future.. etc pattern
Actual Behavior
  • Current implementation is public void AddFutureOption(Symbol symbol, Func<OptionFilterUniverse, OptionFilterUniverse> optionFilter = null)
Potential Solution
  • Add missing arguments in the expected order: resolution, fillForward, extended market hours,,
  • Should default to the settings of the underlying if no argument was given
  • If the settings of the FOP and the underlying are different should throw
  • Remove the optionFilter argument. Instead return a the OptionChainedUniverseSelectionModel instance wrapped behind an interface which allows users to call SetFilter on it like for Option & Future. The selection model would use this filter when creating the new universes.
    • AddUniverseOptions could also return the wrapped OptionChainedUniverseSelectionModel instance, but we can keep the option filter argument for it
Reproducing the Problem

N/A

System Information

N/A

Checklist
  • I have completely filled out this template
  • I have confirmed that this issue exists on the current master branch
  • I have confirmed that this is not a duplicate issue by searching issues
  • I have provided detailed steps to reproduce the issue

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.