feat: causal lab

This commit is contained in:
OpenSquared
2026-07-01 21:01:00 +02:00
parent 1829335ad1
commit e1681edffc
5 changed files with 774 additions and 445 deletions

View File

@@ -1238,6 +1238,16 @@ def init_db():
except Exception:
pass
# Purge macro_series_log entries from multi-country contamination.
# USD-series (UNRATE, PAYEMS…) were logging both US and foreign events → flip-flop.
# Safe to truncate: all data is synthetic backfill, no real live captures yet.
try:
c.execute(
"DELETE FROM macro_series_log WHERE source IN ('backfill', 'calendar_sync')"
)
except Exception:
pass
conn.commit()
conn.close()