Stock strategy backtests

New backtest

Runs

Tick up to 8 runs to compare them. Running ones update live.
Queue a backtest or tick finished runs to compare them.

Portfolio value (log scale)

Drawdown from the previous high

Return per calendar year

Results

Data coverage: S&P 500 members with price data

The index always has about 500 members. The gap below 500 is companies that left the index and are no longer on Yahoo Finance (bankrupt, acquired, delisted). Strategies can only pick from what has data, so they miss many of the losers that dropped out: strategies that pick from the members look better than they would have been (survivorship bias), most in the early years. Buy & hold of SPY/QQQ/RSP is not affected.

Assumptions

  • Prices: Yahoo Finance daily open/close, adjusted for splits and dividends (dividends reinvested). Membership: point-in-time S&P 500 lists (github.com/fja05680/sp500).
  • Trades fill exactly at the day's open or close plus the cost per side (commission, spread, slippage). No market impact.
  • Cash earns no interest; shorts pay no borrow fee. Stocks that stop trading are sold at their last close.
  • New strategies: add a file to custom/ on the server (see custom/example_strategy.py) and restart the UI.
  • Past results; not trading advice.