Trade Calendar
Compare
LONG
SHORT
My Pairs
Short Stocks
Longs
Analysis
← Select a short, then a long
Account
Portfolio Performance
Connect Schwab to view performance
Account Value
—
Cash
—
Day P&L
—
Unrealized P&L
—
Open Positions
Loading positions...
⚙️ Settings & System
🔌 Schwab API
👤 Account
Username—
DatabaseConnected
Total Pairs—
Starred Shorts—
Active Signals—
Cached Combos—
Last Cached—
⚡ Signal Engine
Overnight Bulk Job (Midnight ET)
Runs at 12:00am every night. For every starred pair with an upcoming ex-date in the ±7 day window:
• Fetches 10 years of daily price history from Polygon
• Fetches full dividend / ex-date history from Schwab
• Runs the full 19,110-combination optimizer — every combination of entry day (−7 to +6), prior condition window (−1 to −7), bucket (0.1% increments −10% to +10%), and exit day
• Stores qualifying W/L stats in the optimizer cache so live checks are instant
• Fetches 10 years of daily price history from Polygon
• Fetches full dividend / ex-date history from Schwab
• Runs the full 19,110-combination optimizer — every combination of entry day (−7 to +6), prior condition window (−1 to −7), bucket (0.1% increments −10% to +10%), and exit day
• Stores qualifying W/L stats in the optimizer cache so live checks are instant
Live Signal Check (Every 60 Seconds)
Runs every 60 seconds during market hours (9:30am–4pm ET). For each active pair:
• Fetches live quotes from Schwab
• Computes the live prior signal value for each condition window
• Matches the current value to its 0.1% bucket in the overnight cache
• Fires a BUY signal if the bucket's win rate ≥ 80% with positive avg return
• Updates the calendar every minute
• Fetches live quotes from Schwab
• Computes the live prior signal value for each condition window
• Matches the current value to its 0.1% bucket in the overnight cache
• Fires a BUY signal if the bucket's win rate ≥ 80% with positive avg return
• Updates the calendar every minute
🔴 Live Analysis — Best Play Right Now
How It Works
Called via
For the current entry day (e.g. Day 0), it:
• Gets live Schwab prices for both legs
• For each prior condition window (−1 through −7): computes the live spread move and finds which 0.1% bucket it currently falls in
• Looks up that exact bucket in the overnight cache for every exit day
• Pools the W/L counts across all prior conditions per exit day (e.g. prior −1 gives 12W/3L, prior −2 gives 24W/4L → total 36W/7L)
• Win rate = pooled wins ÷ total trades. Avg return = weighted average
• Returns the exit day with the best combined win rate
GET /api/pairs/SHORT/LONG/live-matrix
For the current entry day (e.g. Day 0), it:
• Gets live Schwab prices for both legs
• For each prior condition window (−1 through −7): computes the live spread move and finds which 0.1% bucket it currently falls in
• Looks up that exact bucket in the overnight cache for every exit day
• Pools the W/L counts across all prior conditions per exit day (e.g. prior −1 gives 12W/3L, prior −2 gives 24W/4L → total 36W/7L)
• Win rate = pooled wins ÷ total trades. Avg return = weighted average
• Returns the exit day with the best combined win rate
Two Modes
?mode=current (default)
You know today's entry day. Shows all prior conditions pooled per exit day and picks the single best exit. Answers: "I'm entering today — when should I exit?"
?mode=scan
Scans every entry day from −7 through +6. For today's day uses live prices; for all other days uses historical closes from the last ex-date cycle. Answers: "Should I enter today or wait for a better setup?"
You know today's entry day. Shows all prior conditions pooled per exit day and picks the single best exit. Answers: "I'm entering today — when should I exit?"
?mode=scan
Scans every entry day from −7 through +6. For today's day uses live prices; for all other days uses historical closes from the last ex-date cycle. Answers: "Should I enter today or wait for a better setup?"
Pooled Result Example:
Entry Day 0 · Exit +1
Prior −1: 12W/3L (+0.3% bucket)
Prior −2: 24W/4L (+0.5% bucket)
Prior −3: 8W/5L (+1.2% bucket)
Total: 44W / 12L = 78.6% · avg +0.9%
Entry Day 0 · Exit +1
Prior −1: 12W/3L (+0.3% bucket)
Prior −2: 24W/4L (+0.5% bucket)
Prior −3: 8W/5L (+1.2% bucket)
Total: 44W / 12L = 78.6% · avg +0.9%
📐 Trading Parameters
Lookback Period10 years
Min Dollar Volume$1,000,000 / day
Min Sample Size8 trades
Optimizer Combinations19,110 per pair
Bucket Width0.1% increments
Buy Signal Win Rate≥ 80%
Pool Range (each side)± 0.5%
Hold Win Floor≥ 67%
Hold Min Edge+0.3%
Long Ex-Date Window1–14 trading days after short