Actual simulation results with 1.5% round-trip show -2.5% annualized (vs SPY +16%).
The per-trade signal exists but the margin (~0.68% alpha) is too thin to survive
realistic small-cap execution costs and a 1-day entry delay.
Also explains why insider-copytrade sites report outperformance: they use same-day
entry and omit spread/slippage from their simulations.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Replace db/schema.sql + raw sqlite3 with SQLAlchemy ORM (db/models.py)
- Filing, Signal, PriceCache models with proper indexes
- db/db.py uses SQLAlchemy sessions throughout; no raw SQL strings
- Add PriceCache table: stores daily close prices per ticker
- backtest._fetch_prices checks DB first; skips yfinance for completed ranges
- New data persisted via upsert_prices()
- get_cached_prices() / upsert_prices() added to db.py
- EDGAR poller incremental fetch: get_latest_filed_date() returns newest
filed_date in DB; fetch_and_store_new_filings skips entries older than
that cutoff before even checking accession_exists
- Add get_signals_for_backtest() to db.py; backtest no longer opens its
own sqlite3 connection
- requirements.txt: add sqlalchemy>=2.0.0
Co-authored-by: dodox <dodox@users.noreply.local>