The 50 day moving average is an important demarcation, but a few closes beneath it are nothing to be concerned about.
Buy SPY at the close if
- it has traded < 10 day beneath the 50 day simple moving average
Sell the trade at the close X days later.
No commissions or slippage included. All SPY history used.
As the chart shows, there is nothing much to be worried about if SPY trades beneath the 50 day for a few days or even a couple of weeks.
The buy-n-hold results are calculated by chopping all SPY history into 50 day segments and then averaging those segments.