PyInvesting

Backtesting software for stock market investors

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

Compare your stock 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.2%
SPY 10.8%
Total return
1,958%
SPY 791%
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 a stock 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