Un-supported financial market data mining is a pet peeve of mine. In this case, there are some critical problems with your analysis:

* First, your "N" of 1,578 is way overstated, to the extent that we should be inferring that we're looking at 1,578 independent data points. What you seem to have done is to treat every month from January 1871 through June 2002 as a separate data point. However, the past 12 month performance for any two data points within 11 months of each other are correlated (highly correlated the closer in time they are). Further, the 5 year returns of any two data points within 59 months of each other are also correlated (again, very correlated for close-together data points). So you actually have just 26 independent data points here, which is a statistically dubious sample size. For the 10, 20, and 30 year versions, you have 12, 5, and 3 independent data points, respectively -- statistically meaningless.

* Second (and for the same reason), your N for each subset of the data corresponding to different timing strategies is even less. Without looking at the historical data, I can't say exactly how many independent data points you really have in each subset, but I know, for example, that in the last 137 years there have been only a few stock market declines of a magnitude of 20 - 50%; certainly nowhere near the 139 that your "N" suggests. So even the 5-year study has a meaningless sample size for the individual triggers.

* Third, your subset samples are biased because individual "real" data points are reflected in varying quantities depending on how many adjacent months the signal remained for. So, even if we had enough real data points in theory, your sample is skewed towards those buy signals which lasted longer.

* Fourth: you say, "For 10-year investments, investing when the market is down 20% to 50% is probably going to produce better returns than a investment at a random point in time, but it's a close call". But even if your data were accurate, the 10-year charts are such a close call that there's actually no conclusion to be drawn from them.

* Finally, you had no prior hypothesis. This is a fatal flaw with many attempts to mine historical stock market return data. Instead, you measured sixteen separate investment strategies (four different buy signals times four different time horizons). Without a prior hypothesis, you have not done a scientific study, but you have just mined data for patterns. In any sufficiently large corpus of data, there will be patterns simply by coincidence. A prior hypothesis is necessary to distinguish those patterns which exist by coincidence from those which we predicted ahead of time due to a correct explanatory framework.

Even if your analysis had none of these flaws, we'd need to be wary of it, because of the phenomenon of publication bias (only those studies which show something interesting get noticed by people; but every so often someone predicts something, and the data seems to confirm it, simply because they had an unusual sample despite their having done everything properly). So your conclusions would merely be tentative pending followup studies (on independent data points; which means we'd have to wait decades to start to be confident). But each of these flaws, individually, are enough to completely invalidate any inferences we can make from your data.

Don't feel bad, however. People have been drawing un-supported inferences from stock market data forever.