Skip to content

Implement improved offline backtest#6

Open
lee101 wants to merge 105 commits intomainfrom
kt83uw-codex/implement-fake-backtest-simulation
Open

Implement improved offline backtest#6
lee101 wants to merge 105 commits intomainfrom
kt83uw-codex/implement-fake-backtest-simulation

Conversation

@lee101
Copy link
Copy Markdown
Owner

@lee101 lee101 commented May 22, 2025

Summary

  • improve FakeAlpaca to track cash, entry price and closing profit
  • rewrite offline_backtest to use FakeAlpaca and step through AAPL prices
  • update README with new instructions

Testing

  • python -m pytest -q (fails: No module named pytest)

@lee101 lee101 force-pushed the main branch 2 times, most recently from 198c06f to 4b5c43f Compare March 24, 2026 07:45
lee101 added a commit that referenced this pull request Mar 25, 2026
…61%@5bps) new #6

Exceptional cluster at seeds 206-210 (all >1000% ann at 8bps):
s206(+874%) < s207(+964%) < s208(+1904%) < s209(+2716%) < s210(+3996%)

5bps confirmations (all robust, 5bps >= 8bps):
- s210: 5bps=+4461%, Sortino=5.27 — NEW #6 overall
- s209: 5bps=+3091%, Sortino=5.36
- s208: 5bps=+2064%, Sortino=5.0
- s211 breaks cluster at +692%

s121-200: s165(+1380%), s166(+1058%) added; top still s123(+6191%)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
lee101 added a commit that referenced this pull request Mar 25, 2026
crypto70 s201-300 (12/100): s210=+3996% ann@8bps (NEW #6 at 5bps=+4443%),
s209=+2716%, s208=+1904%, s207=+964%, s206=+874% — exceptional hit rate ~75%

crypto70 s301-400 (4/100): s301=+564% ann@8bps (5bps=+581%, robust)

crypto15 tp03: s200-350, s350-500, s500-700 sweeps running (300s budget)
s78 still champion at +141%/180d

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
lee101 added a commit that referenced this pull request Mar 25, 2026
s628 (s601-700): +7158% ann at 5bps, 5bps>>8bps (7.27 vs 6.72) VERY ROBUST.
New #6 all-time. WR=61%, Trades=77, tight percentile spread.
s601-700 now has SIX top-55 seeds: s628(#6!), s609(#13), s627(#50).

Other new s601-700:
- s627: +1509%@5bps, WR=59%, Trades=135

New s301-400:
- s336: +952%@5bps (minor overfitter), WR=60%

New s401-500:
- s428: +1072%@5bps, 5bps>>8bps ROBUST, WR=60%

New s701-800:
- s729: +1027%@5bps, 5bps>8bps ROBUST, WR=62%, Trades=82 (compact)

100 seeds ranked in leaderboard. Sweeps at ~43/100(s201), ~36/100(s301),
~30/100(s401), ~28/100(s501,s601), ~31/100(s701), ~19/100(s801), ~6/100(s901).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
lee101 added a commit that referenced this pull request Mar 25, 2026
…rmed at 5bps

s431 (s401-500): honest>pool! +1588%@5bps, 5bps≈8bps (3.01 vs 3.08), WR=57%
- Rare case: generalization better than training — indicates strong robustness

s820 (s801-900): +1545%@5bps, 5bps>>8bps VERY ROBUST (2.97 vs 2.78), WR=70%
- WR=70% is extraordinary for s801-900 range

s430 (s401-500): +672%@5bps (minor overfitter), WR=59%, Trades=49 (compact)
s335 (s301-400): +604%@5bps, 5bps>8bps ROBUST, WR=63%

s426 (s401-500): FAILED at 5bps (p50=0.98<1.0), overfitter — NOT saved.

s908 (s901-1000): Sortino=16(!) in training, honest_8bps=+450%, 5bps pending.

110 seeds ranked. s628(#6), s431(#48), s820(#50) now confirmed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
lee101 added a commit that referenced this pull request Mar 25, 2026
New top-10 additions:
- s628: +7,145% @5bps, Sort=6.79 — new #6 from s601-700 range
- s321: +3,072% @5bps — new top-20

s601-700 produces 3 top-10 seeds: s602, s609, s628
s501-600 produces 3 top-10 seeds: s507, s520, s523

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
lee101 added a commit that referenced this pull request Mar 25, 2026
Updated top-10 5bps leaderboard (145 evaluated):
#4 s456: +8,802% (ultra-robust: 5bps > 8bps, Sortino=6.71)
#6 s452: +8,002% (ultra-robust: 5bps > 8bps, Sortino=6.65)
#7 s734: +7,160% (ultra-robust: 5bps > 8bps)
#10 s446: +6,536% (ultra-robust: 5bps > 8bps)
#15 s827: +4,801% (ultra-robust: 5bps > 8bps)

7 sweeps ongoing: s201-900 at 55-62% complete

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
lee101 added a commit that referenced this pull request Mar 25, 2026
Leaderboard updated (169 evaluated at 5bps):
#1 s275: +23,595% (Sortino=9.0, ultra-robust: 5bps > 8bps)
#2 s240: +17,642%
#3 s434: +10,359%
#4 s71:  +9,381%
#5 s456: +8,802% (new)
#6 s507: +8,273%
#7 s452: +8,002% (new)

Top-10 mean: +10,796% ann | 7/10 ultra-robust (5bps >= 8bps)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant