WS0 cleanup: DuckDB-free + wire DATABASE_URL
- Drop duckdb dependency (pyproject, requirements) -> psycopg2-binary. - run_live_paper: boot log shows the real Postgres target (masked); add _db_target_desc() helper. - .env.example: document DATABASE_URL / PG* vars; mark WATCHER_EVENT_DB_PATH legacy. - evaluation/storage.py: INSERT OR REPLACE -> INSERT (setup_id is a fresh uuid). Verified: 67/67 tests green on Postgres with duckdb UNINSTALLED; app boots against the live endpoint (127.0.0.1:5432 proxy) and wrote 205 daily bars. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
c4669fe0ce
commit
b1ef0930ca
5 files changed
+32
-5
No files matched your search
+11
-1
@@ -2,6 +2,16 @@
|
||||
# Momentum — environment configuration (copy to .env and fill)
|
||||
# ============================================================
|
||||
|
||||
# ---- Database (PostgreSQL) — the single datastore (event store + bar warehouse)
|
||||
# Either a full URL:
|
||||
DATABASE_URL=postgresql://USER:PASSWORD@HOST:5432/momentum
|
||||
# ...or individual vars (used only if DATABASE_URL is unset):
|
||||
# PGHOST=127.0.0.1
|
||||
# PGPORT=5432
|
||||
# PGUSER=admin
|
||||
# PGPASSWORD=
|
||||
# PGDATABASE=momentum
|
||||
|
||||
# ---- Alpaca (market data + paper broker) — REQUIRED for live paper trading
|
||||
ALPACA_API_KEY=
|
||||
ALPACA_SECRET_KEY=
|
||||
@@ -47,7 +57,7 @@ TRADING_MAX_DAILY_LOSS_PCT=0.03 # daily-loss circuit breaker
|
||||
# Intraday watcher (signal engine)
|
||||
WATCHER_ENABLED=1
|
||||
WATCHER_INTERVAL_SECONDS=60
|
||||
WATCHER_EVENT_DB_PATH=./data/momentum.duckdb
|
||||
# WATCHER_EVENT_DB_PATH is legacy and ignored — the datastore is PostgreSQL (see DATABASE_URL above)
|
||||
WATCHER_MAX_SYMBOLS=25
|
||||
WATCHER_MIN_BARS=30
|
||||
WATCHER_MIN_QUALITY=0.30
|
||||
|
||||
Reference in new issue
Block a user