Title and summary
The engine scans put-option chains by expiration and strike, prunes by risk/liquidity gates, computes per-pair pricing, assigns a viabilityScore, and keeps the highest‑viability short‑long pair as the selected bull put spread.
How candidates are filtered, priced, scored, and how the “best” chain is selected for bull put vertical opening orders.
The engine scans put-option chains by expiration and strike, prunes by risk/liquidity gates, computes per-pair pricing, assigns a viabilityScore, and keeps the highest‑viability short‑long pair as the selected bull put spread.
When viableOnly is false, max allowed spread width tightens by BP/minBP tier, with retirement‑specific tiers supported.
For PM users (non‑viableOnly), cap short‑put strike at the minimum existing short‑call strike to avoid inverted structures.
Remove dates/expirations outside DTE, non‑standard/invalid chains, outside delta band, too‑wide bid/ask, and above strike cap.
Short‑Long vertical open pricing overview:
Start → Scan chains → Filter → Pair strikes → Price → Compute viability → Select best → Build order → Gates → Submit
%%{init: {"theme":"base","flowchart":{"curve":"basis"},"themeVariables":{
"fontFamily":"Inter, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif",
"primaryTextColor":"#e5e7eb",
"primaryColor":"#111827",
"primaryBorderColor":"#94a3b8",
"lineColor":"#94a3b8",
"tertiaryColor":"#0e1729",
"tertiaryBorderColor":"#22d3ee",
"edgeLabelBackground":"#00000000"
}}}%%
flowchart TB
A([Start]) --> G[Get put chains]
G --> F[Apply filters DTE/Delta/Bid-Ask/Strike caps/BP-tier width]
F -->|No candidates| OUT[Stop: no viable chains]
F --> P[Per-expiration pairing]
P --> S1[Pair strikes short above long within width]
S1 --> PR[Compute open pricing - mark diff × spread, bumps, cap]
PR --> V[Compute viabilityScore]
V -->|No viable| OUT
V --> B[Select max viability]
B --> R[Build bull put order]
R --> OG[Ordering open-ready gates]
OG -->|Fail| OUT
OG --> SUB[Submit]
SUB --> DONE([Placed or queued])
classDef step fill:#111827,stroke:#94a3b8,color:#e5e7eb,stroke-width:1px;
classDef gate fill:#0e1729,stroke:#22d3ee,color:#e5e7eb,stroke-width:1px;
classDef out fill:transparent,stroke:#94a3b8,color:#cbd5e1,stroke-dasharray:5 3;
class A,G,F,P,S1,PR,V,B,R,OG,SUB,DONE step;
class OUT out;