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,024%
SPY 786%
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

Build your trading strategy

Start with a template, then set your stocks, rules, and dates.

Relative strength

Rank stocks by past returns and test how a portfolio of the leaders performed.

Test relative strength

Start with three free backtests