fix: correct simulation loop and equity curve calculation after real-data testing
- BacktestRunner.run() now iterates all NYSE trading days (not just candidate days) via SnapshotStore.all_trading_days() so stop/target/time exits are checked every day, not only on days with new candidates - Record initial DailyPortfolioState before simulation loop starts so total_return_pct is computed relative to the true initial equity (100k), not the first post-entry equity snapshot - SnapshotStore._fetch_event_metadata() now synthesises event_timestamp from event_date + 21:00 UTC when filed_at_utc is NULL (transparent enrichment at loader boundary, not silent substitution in selector) - SnapshotStore._async_load() maps event_close → entry_price_est when the column is absent, and derives score from abs(reaction_day_return) when the Parquet snapshot has no score column - Add --snapshot-dir CLI flag to BacktestRunner to override the default parquet_dir base path (needed for non-standard snapshot locations) - Fix integration test assertion: total_trading_days >= 2 (was == 2) - Add configs/experiments/realdata_test_v1.json for real Phase 3 snapshot runs Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>main
parent
2f4d9f61f7
commit
867d70afae
@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
"experiment_name": "realdata_test_v1",
|
||||||
|
"dataset_snapshot_id": "b1868603-5193-4308-9627-a185e054f99d",
|
||||||
|
"description": "Real data integration test using Phase 3 snapshot. score_threshold=0 to include all events.",
|
||||||
|
"base_config": "configs/backtest/defaults.json",
|
||||||
|
"overrides": {
|
||||||
|
"signal": {
|
||||||
|
"score_threshold": 0.0,
|
||||||
|
"max_candidates_per_day": 10
|
||||||
|
},
|
||||||
|
"risk": {
|
||||||
|
"per_trade_risk_pct": 0.01,
|
||||||
|
"max_daily_new_risk_pct": 0.05,
|
||||||
|
"max_positions": 10,
|
||||||
|
"max_positions_per_sector": 5
|
||||||
|
},
|
||||||
|
"execution": {
|
||||||
|
"max_holding_days": 5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"splits": [],
|
||||||
|
"tags": ["realdata", "integration-test"],
|
||||||
|
"notes": "Real Phase 3 Parquet snapshot. Events have filed_at_utc=null so SnapshotStore synthesises timestamps from filing_date."
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue