af06685542
Adds an opt-in recorder to the backtester so a replay keeps the evidence each trade setup was decided on: every indicator's vote, value, confidence, base weight, regime multiplier, effective weight and contribution on the primary and both confirmation timeframes, penalties, the setup and outcome, and the Forex Factory calendar events around the trade (4 h before entry to exit, all-day rows on the New-York date). --record-bars adds one float32 row per analyzed bar with the same votes plus 1 h/4 h/24 h forward moves in ATRs. Output is Parquet in a folder per run with a manifest carrying the engine/gate fingerprints, the regime weight table in force and the book MD5. Nothing in the signal core changes: the trade book is byte-identical with recording on or off (control-vs-recorded MD5 equal on both 2-year runs, M5 781 / +146.07R / PF 1.52, M15 793 / +117.62R / PF 1.41 at $0.65). Module 33 adds 12 tests (498 total): snapshot reproduces the engine's composite, absence is no vote, calendar join edges/phases/holiday, write/load round-trip, _replay_span parity with recording on, CLI flags, import and source guards. Also: backtest/replay_scorecard.py (first-look scorecards, calendar buckets, in-book and per-bar what-ifs, --check invariants), scripts/ff_calendar_scraper.py restored from git history (the only way to regenerate the gitignored calendar file), report in backtest/research/replay_recording_2026-09-09.md. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Nc9Ninzyi18QkWezrxeBvB
34 lines
380 B
Plaintext
34 lines
380 B
Plaintext
# Secrets
|
|
.env
|
|
.env.local
|
|
config.json
|
|
|
|
# Editor / tooling
|
|
.claude/
|
|
.vscode/
|
|
.idea/
|
|
|
|
# Python
|
|
__pycache__/
|
|
*.pyc
|
|
*.egg-info/
|
|
.venv/
|
|
venv/
|
|
.coverage
|
|
|
|
# OS
|
|
.DS_Store
|
|
Thumbs.db
|
|
|
|
# Logs
|
|
*.log
|
|
|
|
# Backtesting data (keep scripts, ignore generated files)
|
|
backtest/cache/
|
|
backtest/*.csv
|
|
backtest/__pycache__/
|
|
.env.*
|
|
logs/
|
|
backtest/research/sizing_2026-09/
|
|
backtest/research/replay_2026-09/
|