NEW YORK (TheStreet) -- While it's hard to predict the markets, when it comes to the month of May, one thing is for certain: You'll hear someone say, at least once, "sell in May and go away." The cliché, which suggests that smart investors should sell off their portfolios in May and only re-enter the market in the fall, has long been part of Wall Street culture, but where does it come from? 

The saying dates back to old England, when the stock brokers would go on summer vacation in May and not return until September. The original saying was, "Sell in May and go away, do not return until St. Leger's Day." The final horse race of the season happened on St. Leger's Day and the old time stock brokers didn't bother getting back to work until the racing season had ended. The market in those days was pretty flat over the summer months.

According to the Stock Trader's Almanac, the Dow Jones Industrial Average has had an average gain of 7.5% during the November through April period and a gain of only 0.3% over the May through October period, going back to 1950.

Even though the worst crashes in history have occurred in October, on average, October is not the worst month of the year for stocks. In October of 1929, the market dropped over 24% in two days, and that two-day drop is still the worst in history. On October 19th, 1987, the Dow dropped a record 22% in one day. In October 2008 the Dow dropped over 22% in eight trading days.

TheStreet Recommends

In spite of the history of October crashes, the worst month has been September. The average return for the month of September for the S&P 500 going back to 1950 has been -0.65%. The best month of the year historically has been December with an average return over that same time frame of 1.59%.

Diving deeper than the market as a whole, different sectors have different performance throughout the year. A study titled "The Halloween Effect in U.S. Sectors" by Ben Jacobsen at the University of Edinburgh Business School and Nuttawat Visaltanochti from New Zealand's Massey University found that consumer staples, leisure, multimedia, retail and utilities perform just as well over the summer months as they do in the winter months and that an investor in those sectors will have better performance by staying in the market year round. 

Another interesting seasonal tendency is that of the VIX Volatility IndexI:VIX, which typically has a negative correlation to stocks. The VIX is also known as "the fear index" and is a measure of the implied volatility of options on the S&P 500 index. Over the last twenty years, on average, the VIX has bottomed in late June or early July, then risen steadily and normally peaks out in October. June, on average, has not been a good performing month for stocks, even though the VIX usually bottoms out then, with an S&P 500 average return of -0.07% each year going back to 1950.

This article is commentary by an independent contributor. At the time of publication, the author held no positions in the stocks mentioned.