# All tests so far: trade bot (9/17 – 10/3/2026)

Prepared Saturday 10/3. Results are from tick replays (simulate.py) or 1-minute-bar studies. "In-sample" means the rule was tuned on the same days it was tested on. **Entries and exits were tested separately, as you asked:** exits on a fixed list of buys, entries on every signal.

## 1. Setup J era (9/17 – 9/28)

| Test | Result | Decision |
|---|---|---|
| Live 9/17–9/22 | 70 trades, 30% won, −$212. "Deterioration" exits: 53 trades, −$678 | Exits were the problem |
| Giveback-room exit (2/3, then 1/4) | Worse on both days (−$211, −$359): freed slots got refilled with weaker stocks | Off |
| Live entry score ≥55 | Small gain on 2 days (in-sample) | Superseded by v2 |
| Fixed hard stop | No gain in the sim, because of slot-refill churn | Kept, for safety |
| Entry slope rule (5 bars) | −$155 vs −$311 (3 days) | Superseded |
| Exits on 144 fixed buys | Current −$34; **stall 45 min +$41** (the only helpful one); breakeven locks worse | — |
| Re-entry after a loss only above the old entry | +$1.84 vs −$0.29 per signal, better on all 4 days | **Live (still on)** |
| Trade plan (R:R ≥1.5) | 25 signals, +$6.54 avg, 64% win | Superseded |
| Real level targets (5 days) | +$352 vs +$216 | Superseded |
| Max 3–5% above open (6 days, tick) | −$1 vs +$145: blocked strong trend pullbacks | Rebuilt later as v2's 3% + breakout exception |
| 5-day levels + target cap | −$51 vs +$145 | Off |
| 20-day bar study, J = above-open + R:R 2 | +$103 vs −$98 | J went live 9/28 |
| Shadow entry-rules gate (20 days, tick) | J +$21 vs gate +$6 | Off |
| Distance above VWAP | Only consistent signal across 3 studies: stop hit first 25% below VWAP → 47% at 4%+ above | Became v2's VWAP 0 to +2% rule |

## 2. Research studies (what predicts and what doesn't)

| Study | Result |
|---|---|
| Big winners (63 of 630 stock-days) | "Buy the early leaders at 10:30" loses (−$517 to −$1,610). Winners peak after noon. **Exits are the lever.** |
| trade1 entry rules (620 picks, 21 days) | Hold to close −$1,275. No feature separates risers from fallers (best AUC 0.56) |
| trade1 exits on those picks | Step-R + 1% stop + breakeven: −$397. **With a 15-bar wait: +$407** (first positive) |
| Speed/shape (654 stock-days) | No prediction (AUC 0.45–0.54) |
| Buy/sell flow (660 stock-days) | No prediction. Only "down on net selling keeps falling" |
| VWAP reclaim (680 stock-days) | Negative in every variant |
| Pattern groups (in-sample rules) | Failed on 6 months out of sample (ALLOW +0.00% vs AVOID −0.03%) |
| 2-year rule study (~500 days) | Only **X1 climax** holds: after a ≥10× volume bar at a new day high, −1% came first 46–47% of the time vs +1% first 33–39%, in every period |
| Opening-range breakout (your uploaded bot.py; 503 days) | **Negative in all 12 variants.** Take only its safety features (broker-side stop, daily loss limit, kill switch, PDT plan) |

## 3. Entry rules v2 and exit_v2 (9/28 → now)

| Test | Result | Decision |
|---|---|---|
| v2 replay on 9/28 | 6 trades, +$142 | v2 live 9/29 |
| Exits on v2's fixed buys (23 days) | J +$141; **smooth +$126 (both halves +)**; smooth+trail +$68; trail only +$20 | exit_v2 smooth, trail OFF |
| + X1 climax exit (24 days) | +$68 → **+$108** | Live 10/1 (re-check fix live 10/5) |
| Smooth arm 0.7 vs 0.8 (24 days) | **+$282 vs +$107**, halves +$177/+$104, better on 9 days and worse on 2 | **Live from 10/5** |
| Smooth sell only below VWAP | −$277 | Off |
| Entries: v2 live vs B1 (block after a volume burst), 24 days | **Live +$37** (80 trades, 54% win) vs B1 −$6 | B1 off |
| v2 buys by time of day | 9:45–11:30 +$32 (49 trades); **11:30–13:30 −$32 (18)**; 13:30–15:15 +$37 (13) | Watch (small sample) |

## 4. The playbook / Star Follow (10/1 → now)

| Test | Result |
|---|---|
| Reference calibration (150 closest days) | "Up" share AUC 0.63, but it measures **movement, not direction**; expected-value score correlation 0.003 |
| Star Follow, all versions (25 days) | −250% to −456% (old marks, confirmed marks, winners-only, + market/gap, band, since) |
| Star Follow, 6 months (Mar–Aug) | −910% / −1,199% |
| Winners vs losers, majority (25 days) | **+8.0%** (40 trades), but halves +25.7 / −17.6 |
| Winners vs losers, normal | −56.9% (172 trades) |
| 101 watched stocks on 10/2 | Original −85%, latest about −35%, majority **+1.0%** (5 trades), normal −5.3%. Bot alone −$3.41 (replay) |
| Advisor: bot trades, playbook overrides at 60% (10/2) | Playbook-added buys lose (−$86 to −$108). **No-add version** (skip/hold/sell only): 5 min −$15, **10 min +$28**, 15 min +$17. Most of the gain is UNIT |
| Advisor no-add, 10-day validation | **Running.** First 3 days: 9/18 same, 9/21 worse (−$54 / −$22 vs −$13), 9/22 needs a re-run |

---

## 5. The best setup found so far (live from Monday 10/5)

This is the best **tested** combination. Its edge is still small: entries alone made +$37 over 24 days (second half −$48). Most of the measured gain comes from the exits.

### Entry: rules v2 (entry_v2.py, config `entry_v2`)
A stock on the scanner's watch list is bought only when **all** rules pass on **3 checks in a row**:

1. **Wait:** at least 15 one-minute bars since the open, so no buys before 9:45.
2. **Unusual volume:** volume so far ≥ **1.5×** its 14-day normal for that time of day, and the last 15 minutes no more than **5×** normal (not a blow-off).
3. **Room:** at least **1%** below the nearest 14-day resistance (or already above the 14-day high).
4. **Buyers in control:** buy share ≥ **55%** of the last 15 minutes' volume.
5. **Steady climb:** 30-bar smoothness R² ≥ **0.7** and straightness (efficiency) ≥ **0.5**.
6. **Position vs VWAP:** **0 to +2%** above VWAP.
7. **Not stretched:** no acceleration spike (acc5 < 1.5 ATR), and not both ≥3× its normal move and ≥4% over VWAP.
8. **Not extended:** no buy more than **3% above the 9:30 open**, unless it is a confirmed fresh breakout: 2 closes above yesterday's high or an older day high, broken within 30 min, and no more than 1.5% above it.
9. **Spread** ≤ **1%**.
10. **After a losing trade** in the same stock, re-buy only above the old entry + 1¢.

**Stop at entry:** under the nearest 14-day support, between **1% and 3%** below the buy (at least 1%).
**Sizing:** 1% of equity at risk, capped at 19% of equity per position, **5 positions** max, no new buys after 15:15.

### Exit: exit_v2 (exit_v2.py, config `exit_v2`, replaces J's exits)
Checked every poll, the first one to trigger sells:

1. **X1 climax:** a finished 1-minute bar after the buy with ≥ **10×** its normal volume **and** a new day high → sell. Re-checked every poll from Monday.
2. **Stop:** the entry stop, at least 1% below the buy. It does not trail (trail = off).
3. **Smooth break:** once the last 30 bars' smoothness (R²) reaches **0.7** after the buy (armed; was 0.8), sell when it drops below **0.6**: the steady climb has broken.
4. **15:55:** sell everything.

### Still open
- **Playbook advisor** (skip/hold/sell at 10–15 min): promising on 10/2, not yet confirmed; 10-day test running.
- **Exit robustness** (arm 0.6–0.75, break 0.5–0.65): running tonight.
- **Buy/sell flow history** for the playbook: 203/503 days; two workers, done about Sunday evening.
- **Before real money:** broker-side stop orders, a daily loss limit and kill switch, a PDT plan, and the security items (.env exposure, key rotation, REPORT_PASSWORD).
