Commit Graph

2 Commits

Author SHA1 Message Date
d0e98b9cb7 feat: cap-tier filtering, Alpaca cost model, README cleanup
- simulate.py: --cap-tier large|mid|small|micro; yfinance market cap fetch
  with DB cache (ticker_meta table); argv fix for main.py dispatch
- plot.py: equity curves now show cap tiers with Alpaca costs (zero commission);
  HP sweep uses Alpaca cost decomposition; SPY line clamped to last strategy date
- db/models.py: TickerMeta table
- db/db.py: get_cached_market_caps, upsert_market_caps
- README: add --cap-tier to simulate docs; backfill note (~3 days for 2 years
  at SEC 10 req/s limit); remove duplicate setup block; remove em-dashes in prose;
  results table tilde estimates to be updated once cap-tier sims complete

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-26 18:10:09 +02:00
399f69b817 feat: HP sweep heatmap + equity curve plots, scam analysis in README
- backtest/plot.py: generates two plots saved to plots/
  - hp_sweep.png: 7x7 heatmap of holding_days x round-trip cost, showing
    annualised excess vs SPY and raw annualised return per cell
  - equity_curves.png: portfolio equity vs SPY for 4 cost scenarios
- backtest/simulate.py: accept pre-loaded prices dict to avoid reloading
  on every sweep iteration; return equity_curve in result
- main.py: add `plot` command
- README: updated results section with Alpaca-specific cost breakdown
  (zero commission, costs are spread+slippage only); added honest analysis
  of why insidercopytrading.com-style services show outperformance that
  cannot be replicated in practice; note Alpaca integration not finished

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-26 17:59:18 +02:00