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.