PyInvesting

Backtesting software for stock market investors

Test your trading strategy. Follow its buy and sell signals.

Compare your trading strategy with a benchmark. Follow changes to its model holdings with Premium.

Run a free backtest

Three free backtests. No credit card required.

200 Day Moving Average in Stocks

Recorded from to in USD, against SPY.

Return per year
15.4%
SPY 10.7%
Total return
2,025%
SPY 784%
Deepest decline
-56.3%
SPY -55.2%
Cumulative change from the start of the selected period. Simulated with adjusted prices and recorded trading costs. The 116-stock list was fixed in 2026 after removing stocks with incomplete histories, which favors companies that survived. Past results do not predict future returns.
Explore the backtest

Backtest your rules
before you trade

Compare simulated returns and drawdowns with a benchmark. Save your results as you refine your rules.

Run a free backtest Three free backtests. No credit card required.

Monitor with Premium

Follow a saved strategy as new daily market data arrives.

  • Model holdingsSee each position and its portfolio weight.
  • Buy and sell signalsSee which trades your rules would trigger.
Compare plans