diff --git a/infra/migrations/035_model_validation.sql b/infra/migrations/035_model_validation.sql index 2da929e..0e566e5 100644 --- a/infra/migrations/035_model_validation.sql +++ b/infra/migrations/035_model_validation.sql @@ -10,7 +10,7 @@ CREATE TABLE IF NOT EXISTS prediction_snapshots ( id UUID PRIMARY KEY DEFAULT gen_random_uuid(), generated_at TIMESTAMPTZ NOT NULL, ticker VARCHAR(20) NOT NULL, - window VARCHAR(20) NOT NULL, + "window" VARCHAR(20) NOT NULL, horizon VARCHAR(20) NOT NULL, direction VARCHAR(20) NOT NULL, action VARCHAR(20) NOT NULL, diff --git a/services/trading/backtest_replay.py b/services/trading/backtest_replay.py index 9fb29b4..44dae53 100644 --- a/services/trading/backtest_replay.py +++ b/services/trading/backtest_replay.py @@ -507,7 +507,7 @@ class BacktestReplay: # because that function fetches *latest* prices (not point-in-time). insert_sql = """ INSERT INTO prediction_snapshots ( - id, generated_at, ticker, window, horizon, direction, action, mode, + id, generated_at, ticker, "window", horizon, direction, action, mode, strength, confidence, contradiction, p_bull, p_bear, score_company, score_macro, score_competitive, evidence_count, unique_source_count, duplicate_evidence_count, diff --git a/services/validation/prediction_snapshot.py b/services/validation/prediction_snapshot.py index 7308f52..f514f80 100644 --- a/services/validation/prediction_snapshot.py +++ b/services/validation/prediction_snapshot.py @@ -240,7 +240,7 @@ def _compute_layer_scores( _INSERT_SNAPSHOT_SQL = """ INSERT INTO prediction_snapshots ( - id, generated_at, ticker, window, horizon, direction, action, mode, + id, generated_at, ticker, "window", horizon, direction, action, mode, strength, confidence, contradiction, p_bull, p_bear, score_company, score_macro, score_competitive, evidence_count, unique_source_count, duplicate_evidence_count,