Some statistics from Jim Stack, author of the InvesTech monthly letter. It turns out that, measuring from 1928 to 2002, if you started with $10 and you followed the famous buy-and-hold strategy, that $10 would become $10,957. If you missed the 30 best months, your $10 would only be $154.
However, if you missed the 30 worst months, your $10 would be $1,317,803. One can see from these numbers that missing the worst periods is very important to long-run compounding.
Interestingly enough, if you missed the 30 best months and the 30 worst months, your $10 would still be worth $18,558, which is 80% higher than the buy-and-hold strategy. This all comes about because stock prices tend to go down faster than they tend to go up, and tend to do so in compressed periods. Wall Street and most people tend to overlook the value of not losing money.