Option strategy matcher can prefer a wide credit call spread over a cheaper naked call
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 54/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- csharp
- 领域
- backend, fintech-quant
调研方向
Read UncoveredShortQuantityOptionStrategyMatchObjectiveFunction and the call-side width check, then compare its strike-based proxy with OptionMarginModel's naked-call margin floor. Reproduce the SPY example from the issue and check whether the matcher selects a grouping with lower TotalMarginUsed; the issue does not name a test file, so locate the relevant matcher tests. Done when the call grouping reflects the lower maintenance margin without regressing put matching.
由索引模型根据 Issue 内容生成。
描述
Expected Behavior
When OptionStrategyMatcher has to choose between covering a short call with a wide credit-side long and leaving that short naked, it should prefer the grouping that requires less maintenance margin.
Actual Behavior
UncoveredShortQuantityOptionStrategyMatchObjectiveFunction counts a credit-side long as covering a short when the strike width is at most MaximumCreditCoverWidthFactor (10%) of the short strike. The matcher has no prices, so the strike stands in for the naked-margin floor. For puts, this matches OptionMarginModel's floor. For calls, OptionMarginModel's floor is 10% of the underlying price. For out-of-the-money calls the underlying is below the strike, so the score treats wide call spreads as covered even when they cost more than the naked call.
Reproduction (standard margin models, SPY at 100, multiplier 100, all calls expiring 2025-02-21):
| Strike | Quantity | Price |
|---|---|---|
| 140 | +1 | 0.30 |
| 150 | -1 | 0.15 |
| 151 | -1 | 0.10 |
| 164 | +1 | 0.02 |
- Current grouping: Bull Call Spread (+C140/-C150, margin 0) plus Bear Call Spread (-C151/+C164, margin 1,400).
TotalMarginUsedis 1,400. - Greedy grouping, which the second candidate replaces because it scores -1 instead of 0: Bull Call Ladder (+C140/-C150/-C151) plus a lone long C164. The ladder is margined as the naked C151, about 1,010.
The 14-point width is under 10% of the 151 strike (15.1), but over the naked-call floor of 10% of the underlying (10).
Potential Solution
A suggestion, not a requirement: compare actual maintenance margin, or use the underlying price for the call-side width check. #10062 (for #10035) gates only the new third matching candidate on actual maintenance margin. The first two candidates still rely on the strike-based proxy alone.
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
- 主要语言
- C#
- 星标
- 22.6k
- 派生
- 5.4k
- 平均合并
- 11 小时 39 分钟
- 30 天内合并 PR
- 104
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
QuantConnect/Lean 的其他 Issue
-
priority:p2
难度 2/5 1-3 小时 新手友好度 72/100
QuantConnect/Lean#10216 ·
维护者通常 1 天内回复
-
priority:p2
难度 2/5 1-3 小时 新手友好度 78/100
QuantConnect/Lean#10206 ·
维护者通常 1 天内回复
-
priority:p2
难度 2/5 1-3 小时 新手友好度 85/100
QuantConnect/Lean#10199 ·
维护者通常 1 天内回复
-
priority:p2
难度 2/5 1-3 小时 新手友好度 76/100
QuantConnect/Lean#10198 ·
维护者通常 1 天内回复
-
priority:p2
难度 2/5 1-3 小时 新手友好度 78/100
QuantConnect/Lean#10197 ·
维护者通常 1 天内回复
查看 QuantConnect/Lean 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 66/100
dotnet-outdated/dotnet-outdated#871 ·
维护者通常 1 天内回复
-
triage/untriaged
难度 2/5 1-3 小时 新手友好度 78/100
unoplatform/uno#26676 ·
维护者通常 1 天内回复
-
.NET bug
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 62/100
jhaizhou-ops/S2Arm#2177 · 3 条评论 ·
维护者通常 1 天内回复
-
area-CodeGen-coreclr untriaged
难度 2/5 1-3 小时 新手友好度 65/100
dotnet/runtime#138181 · 1 条评论 ·
维护者通常 1 天内回复