Commit Graph

3 Commits

Author SHA1 Message Date
9417a9e542 fix: cache yfinance misses, pass pre-fetched caps to all plot sims
- _fetch_market_caps: parallel fetch (20 threads), skip tickers with '/',
  cache None results so missing tickers are never re-queried
- simulate: fix prices.get() default from {} to ([], []) for bisect compat
- plot_position_size: pass _signals/_market_caps to avoid per-sim refetch
- plot_equity_curves: use tuple-based SPY price access
- plots: regenerate all three (hp_sweep, equity_curves, position_size)
- README: add position_size.png embed

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 11:50:47 +02:00
120a77aba3 plots: regenerate with cap-tier equity curves and SPY end-date fix
- equity_curves.png: now shows large/mid/small cap tiers with Alpaca costs
  vs theoretical no-cost baseline; SPY clamped to last strategy data point
- hp_sweep.png: updated to Alpaca zero-commission cost decomposition

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-26 18:54:07 +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