Skip to content

Fix startegies - #91

Merged
lsbardel merged 1 commit into
mainfrom
ls-strats
Aug 4, 2026
Merged

Fix startegies#91
lsbardel merged 1 commit into
mainfrom
ls-strats

Conversation

@lsbardel

@lsbardel lsbardel commented Aug 4, 2026

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings August 4, 2026 17:48
@lsbardel
lsbardel merged commit 37f6d86 into main Aug 4, 2026
8 checks passed
@lsbardel
lsbardel deleted the ls-strats branch August 4, 2026 17:51

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new options strategy (Ladder) to the strategies module, expands strategy documentation in markdown, and removes redundant class docstrings in favor of description = load_description(...).

Changes:

  • Added Ladder strategy implementation, documentation, exports, and tests.
  • Removed class docstrings from several existing strategies (keeping markdown descriptions as the source of truth).
  • Expanded/clarified markdown documentation for Butterfly and Strangle.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
quantflow/options/strategies/strangle.py Removes in-code class docstring (markdown description remains).
quantflow/options/strategies/straddle.py Removes in-code class docstring (markdown description remains).
quantflow/options/strategies/spread.py Removes in-code class docstring (markdown description remains).
quantflow/options/strategies/calendar_spread.py Removes in-code class docstring (markdown description remains).
quantflow/options/strategies/butterfly.py Removes in-code class docstring (markdown description remains).
quantflow/options/strategies/ladder.py Introduces the new Ladder strategy factory methods and construction logic.
quantflow/options/strategies/init.py Exports Ladder from the strategies package.
quantflow/options/docs/strangle.md Clarifies delta discussion for strangles.
quantflow/options/docs/ladder.md Adds ladder strategy documentation.
quantflow/options/docs/butterfly.md Expands butterfly documentation (balanced vs broken-wing behavior, etc.).
quantflow_tests/test_strategies.py Adds ladder tests and imports.
Suppressed comments (2)

quantflow_tests/test_strategies.py:133

  • This test asserts a long put ladder is short gamma at FORWARD=100, but gamma can be positive near the bought strike (here K_high=100 is ATM). This makes the test sensitive to the pricing model and strike selection.

Prefer checking a construction invariant (net short one option) rather than gamma sign at a single point.

    assert ladder.price(pricer, FORWARD, REF_DATE).gamma < 0

quantflow_tests/test_strategies.py:142

  • The one-by-two ladder is net short one option, but the test currently asserts gamma < 0 at a single forward level. Gamma sign here is not guaranteed and can be model/parameter dependent.

Prefer asserting the net position size implied by the legs.

    assert ladder.price(pricer, FORWARD, REF_DATE).gamma < 0

Comment on lines +122 to +123
# net short one option: short gamma when long the ladder
assert ladder.price(pricer, FORWARD, REF_DATE).gamma < 0
strike closest to the money and two sold further out of the money. It is sometimes called a
Christmas tree.

The position is net short one option, so a long ladder is short volatility and short gamma.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants