SP500 Strategy Simulator

Can we outperform a simple buy-and-hold strategy on the S&P500 index by using moving averages to decide when to buy and sell?
In the Detailed Analysis tab, you can run your own strategy with a detailed analysis.
In the Optimize Strategy tab, the simulator will run through all possible combinations of the parameters you set and find the best strategy.
Remember that just because a strategy works in the past, doesn't mean it will work in the future.
This is not financial advice. Invest at your own risk.

Optimization Parameters

Shortest moving average window (in days) to test. Smaller values react quickly but are noisier.
Longest moving average window (in days) to test. Larger values are slower but filter out short-term noise.
Step size between tested window values. Smaller increments are more thorough but much slower to run.

Strategy Parameters

Sell all holdings when the SP500 drops below its X-day moving average. A signal that the market may be entering a downtrend.
Buy back in when the SP500 rises above its Y-day moving average. A signal that the market may be recovering or continuing an uptrend.