Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
2ea13a8
Add unified market analysis tool for Kronos
claude Jun 30, 2026
f3633bb
Add no-API-key market data fetcher (stockanalysis/nasdaq) for analyze…
claude Jun 30, 2026
c4fdb17
Add comprehensive backtest statistics and intraday data support
claude Jun 30, 2026
c8161c7
Switch intraday fetcher from Alpha Vantage to Alpaca Market Data API
claude Jul 1, 2026
2cd4945
Add Alpaca crypto support and fix output filenames for slash-containi…
claude Jul 1, 2026
af9ab5d
Add aggregate mode: higher-timeframe candle reconstruction test
claude Jul 1, 2026
34b2af8
Add trading research stack: backtest engine, 27 studies, findings ledger
claude Jul 4, 2026
f50f077
Add commodity trend sleeve (gauntlet passed), grade v2, post-goal stu…
claude Jul 4, 2026
60b3cd9
Promote commodity trend sleeve to deployed keeper #4
claude Jul 4, 2026
d339b0a
S/R zones v2: touch-count inversion, volume-at-resistance cell, retes…
claude Jul 5, 2026
ba2a47e
Add running paper-trading returns tracker + book state
claude Jul 6, 2026
4dd12fc
Add Sleeve E (crisis buy-the-fear), VIX findings, survivor-terminal v…
claude Jul 6, 2026
4ea4e87
Ledger: VWAP-rollover fade debunked (structure real, geometry negative)
claude Jul 7, 2026
14871eb
Book: IBS QQQ exit fired at 7/8 close (IBS 0.93), flag exit at 7/9 open
claude Jul 8, 2026
0cbdda6
Book: close IBS QQQ at 7/9 open 718.19, -1.04% (first forward-log clo…
claude Jul 9, 2026
19d0559
Study: SMA9 5m crosses predictable (3%->40% by state) but zero post-c…
claude Jul 10, 2026
e2af662
Study: early loud spike + quiet counter-float has no snap-back; flush…
claude Jul 10, 2026
d96fdb2
Discovery: SMA9/lowerBB corridor -> BB width is a magnitude (vol) sig…
claude Jul 11, 2026
60c77e2
Discovery: volume-surge range breakout is real but weak + asymmetric …
claude Jul 11, 2026
3b33a0d
Drill: surge downside flush is a fast-reverting scalp, too small for …
claude Jul 11, 2026
128060b
Codex v1 + independent replication of user's crypto volume-spike stra…
claude Jul 11, 2026
9937a4c
Lock AGG-MAX weights (A55/B10/C20/D15); deploy crypto down-spike H2 a…
claude Jul 13, 2026
46e6f21
Book: IBS fired 7/13 (grade +2 GREEN), TQQQ entry pending 7/14 open
claude Jul 13, 2026
a496962
Book: TQQQ filled 75.22 at 7/14 open; QQQ IBS 0.67 = hold
claude Jul 14, 2026
bbc7000
Warrior patterns, generic track: all negative-to-null on index ETFs (…
claude Jul 16, 2026
b40b7c2
Conditional open 2x2: down-down opens recover; gap-fill ladder; low e…
claude Jul 16, 2026
c4f6ad7
Warrior track 2 complete: 72k signals on 5.4k gappers — mechanical en…
claude Jul 16, 2026
cbb5557
Add conditional probability study: open states, gap-fill ladder, IBS …
claude Jul 16, 2026
3115f7d
Close TQQQ IBS trade: QQQ IBS=0.85 exit signal 7/21, -5.3% loss
claude Jul 21, 2026
a703aba
Correct TQQQ exit px to actual 7/22 open: 69.63, -7.4% loss
claude Jul 22, 2026
6889e20
Open TQQQ IBS trade: QQQ IBS=0.17 grade 2 GREEN, entry 7/27
claude Jul 24, 2026
035b7da
Correct TQQQ entry to actual 7/27 open: 66.07 (gapped up from 64.00)
claude Jul 27, 2026
f112497
Add paper-trading book state with exit signal for TQQQ position
claude Jul 30, 2026
faa8700
Close TQQQ trade #3: -0.51% (exit 7/31 open 65.73)
claude Jul 31, 2026
2f77a80
Add momentum day-trading strategy notes (Ross Cameron first-pullback)
claude Aug 11, 2026
f85da98
Add momentum first-pullback paper trader (Sleeve E candidate)
claude Aug 11, 2026
57a0657
Add momentum backtest harness; upgrade replay for historical use
claude Aug 11, 2026
0d16cf0
Momentum first-pullback backtest v1 results: cost-bound, fails at 0.5…
claude Aug 11, 2026
fe17880
Add raw post-entry movement analysis for momentum entries
claude Aug 11, 2026
ea978e0
Fix daily_bars lookback (Alpaca defaults start to today); first live …
claude Aug 11, 2026
70be747
Backfill SEC-sourced floats for 8/11 momentum candidates
claude Aug 11, 2026
4693558
Momentum scan 2026-08-12: 3 candidates, 0 trades
claude Aug 12, 2026
14d9e67
Pre-register spec v2 (dip-conditioned take-profit) before OOS test
harrisonm23-byte Aug 12, 2026
d106a1b
Pre-register spec v3 (laddered scale-out + ratcheting stop) before OOS
harrisonm23-byte Aug 12, 2026
c3b9f98
OOS test: v2 dip-conditioned exit passes all pre-registered criteria
harrisonm23-byte Aug 12, 2026
cb8f87c
Spec-faithful momentum scan; runner tranche tested and rejected
harrisonm23-byte Aug 12, 2026
d7e259b
Trailing-stop exit beats fixed target 5-6x; captures the tail
harrisonm23-byte Aug 12, 2026
e953c7d
Spec v4: deployable exit system (ATR trail, no stop, wide-pullback fi…
harrisonm23-byte Aug 12, 2026
c775025
Spec v5: double-digit per-trade returns in both windows
harrisonm23-byte Aug 12, 2026
bbc7e0d
Momentum scan 2026-08-13: CURI trade -1.12R; exclude non-common tickers
claude Aug 13, 2026
b2ad857
v5 scan 2026-08-13: 3 entries, none pass width/price filter
claude Aug 13, 2026
4c67c85
Add STATUS.md: one-page operation state as of 2026-08-13
claude Aug 14, 2026
1e2b37e
Refocus STATUS.md on the momentum strategy only
claude Aug 14, 2026
1c4b7c3
Add v5 trade-roster generator
claude Aug 14, 2026
b1674b9
Correction per user audit: n=41 is a subset, not the strategy; add ma…
harrisonm23-byte Aug 14, 2026
a72aa9d
Corrected Cameron backtest: source-true pullback + crossing definitions
harrisonm23-byte Aug 14, 2026
6bce32e
Add regenerated v5 per-trade roster (40 trades, both windows)
claude Aug 14, 2026
69b8e25
Post-entry state-sequence analysis: ~78% memoryless continuation
harrisonm23-byte Aug 14, 2026
bb4e74b
Threshold-free recovery curve: smooth depth-dependent decay, 50/50 at…
harrisonm23-byte Aug 14, 2026
c48a460
Add full percentiles of next-leg advance to recovery curve doc
harrisonm23-byte Aug 14, 2026
163ea95
Momentum scans 2026-08-14: v5 no qualified trades; v1 AEYE -1.25R
claude Aug 14, 2026
488d313
Order differentiation: no effect once depth controlled; band-table ca…
harrisonm23-byte Aug 14, 2026
dd02ff9
Conditional next-junction analysis: depth clustering, +0.38 rank corr
harrisonm23-byte Aug 15, 2026
95fe08c
Freeze spec v6 (junction-process policy) before blind-window test
harrisonm23-byte Aug 15, 2026
240fb57
README: append Cameron momentum backtest results appendix
harrisonm23-byte Aug 15, 2026
5fb5a35
Add v6 simulator and in-sample-context results
harrisonm23-byte Aug 15, 2026
b1e557e
Tracker 8/17-8/18: signals graded out; momentum scans + 8/17 reconstr…
claude Aug 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,4 @@ venv.bak/
temp/
tmp/
.python-version
data/
145 changes: 145 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -335,3 +335,148 @@ This project is licensed under the [MIT License](./LICENSE).




---

# Appendix: Momentum Day-Trading Backtest (Cameron First-Pullback)

Independent research appended to this fork. Not part of the upstream Kronos
model. Full detail in [`research/FINDINGS.md`](research/FINDINGS.md);
per-trade data in [`research/momentum_master_table.csv`](research/momentum_master_table.csv).

**Strategy under test.** Five-pillar small-cap momentum selection (relative
volume ≥5× 50-day average, intraday gain ≥10%, price $2–$20, float <20M,
gap/catalyst), first-pullback entry on the crossing candle, per
`research/momentum_daytrading_notes.md`.

**Data & conventions.** Alpaca SIP 1-minute bars, `adjustment=raw`, full
sessions. Two windows: 2024-08→2025-08 and 2025-08→2026-08. Universe = active
US equities (survivorship-biased; a delisted-universe probe found 2 qualifying
entries, both winners). Costs: 0.5%/side, plus 2% slip-through on stop fills
unless noted. Float pillar could not be applied historically.

## 1. Universe funnel and frequency

| Window | Candidate-days | Entries | First-pullback | Later-pullback |
|---|---|---|---|---|
| 2024-08→2025-08 | 4,792 | 109 | 21 (0.4/wk) | 88 (1.7/wk) |
| 2025-08→2026-08 | 5,005 | 182 | 32 (0.6/wk) | 150 (2.9/wk) |

Dynamic intraday qualification (a stock may qualify any time 07:00–10:00 ET,
not only at the open) expanded the candidate pool ~4× versus an open-gap scan.

## 2. Raw post-entry movement, first-pullback entries (no exit rules)

| Metric | 2024-25 (n=21) | 2025-26 (n=32) |
|---|---|---|
| MFE by 10:00, median | +26.0% | +15.5% |
| MAE by 10:00, median | -28.2% | -16.6% |
| Price at 10:00, median | -15.5% | +0.1% |
| Day close vs entry, median | -25.8% | -8.2% |
| Touched +5% / +10% / +20% / +50% | 76 / 76 / 62 / 10% | 84 / 75 / 53 / 22% |

Large two-sided movement; the median entry closes **below** the entry price.

## 3. Drawdown → recovery curve (threshold-free)

2,201 retracement episodes / 291 ticker-days. Every dip below a running high
is an event; depth grid is a reporting cut, not an event definition.

| Retrace reached | n | P(new high) event-wtd | 95% CI | day-wtd | median time to recover |
|---|---|---|---|---|---|
| ≥2% | 1,892 | 84.9% | [83.0, 86.4] | 66.6% | 1 min |
| ≥5% | 1,341 | 78.7% | [76.3, 80.7] | 58.0% | 3 min |
| ≥8% | 969 | 70.8% | [67.9, 73.3] | 49.5% | 7 min |
| ≥10% | 807 | 65.4% | [62.2, 68.4] | 45.3% | 9 min |
| ≥15% | 554 | 51.1% | [47.2, 54.6] | 32.6% | 21 min |
| ≥20% | 431 | 40.4% | [35.5, 45.1] | 25.0% | 25 min |
| ≥30% | 285 | 26.7% | [21.7, 31.6] | 17.9% | 42 min |

Smooth monotone decay, no plateau or cliff; crosses 50/50 near 15% depth.
Day-weighted runs 18–20 pts below event-weighted (each ticker-day carries at
most one terminal failure). CIs from a ticker-day cluster bootstrap.
Retracement **order** (1st/2nd/3rd) carries no measurable information once
depth is known.

## 4. Escalation ladder — P(a retracement that reached X% goes on to reach Y%)

| From \ To | ≥5% | ≥10% | ≥15% | ≥20% | ≥30% |
|---|---|---|---|---|---|
| reached 2% | 71% | 43% | 29% | 23% | 15% |
| reached 5% | — | 60% | 41% | 32% | 21% |
| reached 10% | — | — | 69% | 53% | 35% |
| reached 15% | — | — | — | 78% | 51% |
| reached 20% | — | — | — | — | 66% |

Escalation odds *rise* with depth: shallow dips usually stop, deep dips tend
to keep going.

## 5. Next-leg advance after a recovered ≥X% retracement

Next event's peak vs the recovered peak (recovered episodes only).

| X% | n | p5 | p25 | med | p75 | p90 | p99 | max | mean |
|---|---|---|---|---|---|---|---|---|---|
| 2 | 1,021 | +0.4 | +1.7 | +3.8 | +7.3 | +13.4 | +30.7 | +61.2 | +5.7 |
| 5 | 790 | +0.5 | +2.4 | +4.8 | +9.0 | +15.7 | +32.8 | +61.2 | +7.0 |
| 8 | 516 | +0.6 | +3.3 | +7.3 | +14.0 | +19.9 | +39.2 | +61.2 | +9.5 |
| 10 | 372 | +0.6 | +4.0 | +9.1 | +16.8 | +24.6 | +42.3 | +61.2 | +11.5 |
| 15 | 169 | +0.6 | +5.8 | +13.2 | +25.0 | +37.5 | +61.3 | +69.5 | +17.4 |
| 20 | 69 | +1.1 | +6.9 | +16.1 | +34.9 | +49.5 | +97.7 | +120.9 | +23.3 |

## 6. Downside from a naive dip-buy (additional fall below the −X% price)

| Buy at | n | med | p75 | p90 | if it recovers (med) | if it fails (med) |
|---|---|---|---|---|---|---|
| −2% | 1,892 | 6.4% | 16.3% | 35.7% | **5.1%** | **36.3%** |
| −5% | 1,341 | 7.6% | 22.1% | 38.8% | 5.3% | 34.3% |
| −10% | 807 | 12.6% | 29.0% | 43.6% | 6.2% | 30.7% |
| −20% | 431 | 19.3% | 31.2% | 49.3% | 10.5% | 24.0% |

Recovering and failing episodes separate around 15–20% below the buy price.

## 7. Fixed-level policies — exhaustive grid (all negative)

Mean %/trade, buy at −X% from running high, fixed stop and take-profit,
2024-26 pooled. Best cell per rung shown; **all 156 tested combinations lost**.

| Buy rung | Best stop/TP | Mean/trade | n | Win rate |
|---|---|---|---|---|
| −2% | −3% / +2% | −3.49% | 33,136 | 26% |
| −5% | −10% / +2% | −2.32% | 9,834 | 69% |
| −10% | −10% / +2% | **−2.29%** | 4,523 | 69% |
| −20% | −3% / +3% | −2.88% | 1,516 | — |

With **zero costs and perfect fills**, the TP>stop family still loses
(−0.10% to −0.90%/trade). Reason: the 85% recovery statistic is measured with
no stop in the way; any fixed stop is tagged during the escalation that
precedes most recoveries, collapsing the realized win rate to ~13–30%.

## 8. Exit-mechanism comparison, corrected entries

| Exit | First-pullback (n=53) | All entries (n=291) |
|---|---|---|
| Indicator exits + pullback-low stop | −1.05 R | — |
| Fixed target (dip-conditioned) | — | +0.4 to +1.0% |
| Laddered scale-out + ratcheting stop | negative | negative |
| Fixed buy/stop/TP grid (§7) | negative | negative |
| Junction cycling (arm −10%, exit −10%) | — | −4.5 to −5.1% |
| **No stop; arm at +2%; trail 0.25×ATR(14,1m); flat 10:00** | **+2.42%** | **~+1.2%** |

Per-day: ~+1.0% per qualified day; 222 of ~504 trading days qualified (44%);
~+0.46% per calendar trading day. Every fixed initial stop tested (6/8/10/12/
15/20%) reduced returns monotonically versus no stop.

## 9. Caveats

- **n = 53** first-pullback trades. Approximate 95% CI on +2.42% spans roughly
−0.5% to +5.4%. The n=291 population (~+1.2%/trade) is sturdier.
- Exit parameters (0.25×ATR, +2% arm) were tuned on data overlapping both
windows; the structure, not those two constants, was validated out-of-sample.
- **Fill quality is the binding assumption.** At 5% slip-through most edges
here fall by half or vanish. Only live fills can settle it.
- Survivorship bias; float pillar unapplied historically; no options exist on
~93% of these names; short-selling is impractical (borrow, SSR, buy-in).
- Earlier versions of this work reported a +13.96%/trade figure on n=41. That
was an optimization subset combined with an entry-definition bug and is
**superseded**; see `FINDINGS.md` §9g–9h for the correction record.
Loading