Recent economic anxiety and conventional wisdom suggests selling this May could be wise, but a closer look at history says completely wiping out your equity positions now might be ill advised.

Instead of “going away” this May, strategists at S&P Capital IQ are recommending investors throw their capital into more defensive-oriented consumer staples stocks.

While the S&P 500 has advanced an average of just 0.9% from May to October since 1990, the S&P 500 consumer staples sector has generated a far healthier gain of 4.7% over that span, according to S&P.

“Even though a pullback in prices can’t be ruled out, and ‘Sell in May’ may only be delayed until the ‘Swoon in June’, history reminds us (but does not guarantee) that there is little historical evidence encouraging us to sell out of stocks altogether,” Sam Stovall, chief equity strategist at S&P Capital IQ, wrote in a note this week.

After soaring to multi-year highs earlier this year, stocks ran into some trouble in April due to renewed economic jitters. The S&P 500 finished the month with a 0.75% loss, halting a four-month winning streak.

However, Wall Street is kicking off May in bullish fashion as the Dow Jones Industrial Average registered triple-digit gains Tuesday afternoon amid enthusiasm for stronger-than-expected data on U.S. manufacturing. 

Still, there does seem to be some historical support to the traditional “Sell in May and go away” axiom.

The S&P 500 has inched up just 0.31% in May over the past 67 years, less than half of the average gain of 0.67% for all months and making it the fifth worth month overall, S&P Capital IQ says. The index is also up 57% of the time in May, compared with the average 59%.

Further, the May-through-October period is the worst of all rolling six-month periods historically, with the S&P 500 increasing an average of just 1.2% and advancing only 64% of the time, according to S&P. By comparison, the S&P 500 jumped an average of 6.8% from November 1 through April 30, generating gains 78% of the time.

The relative weakness in May has been more profound of late amid economic jitters that have cropped up in each of the past two years on Wall Street. Last year the S&P 500 tumbled 8.2% as it embarked on a 19.4% five-month plunge that nearly left the broad index in bear-market territory.

“What investors may be thinking is ‘fool me once, shame on you, fool me three times, shame on me.’ But fool investors the market typically does,” said Stovall.

That’s why S&P Capital IQ is recommending investors overweight the consumer staples sector, which so far this year has been led by double-digit gains from Whole Foods Market (WFM) and Mead Johnson Nutrition (MJN).

The consumer staples sector is a less sexy cousin of the consumer discretionary index, highlighting stocks like food and beverage giant PepsiCo (PEP), retail king Wal-Mart (WMT) and cereal maker Kellogg (K) that sell household products.

These stocks are believed to be safer choices during times of economic uncertainty largely because their sales are less susceptible to swings in consumer sentiment.  

For example, while sinking home values could cause some Americans to put off splurging on a $2,000 Mac made by Apple (AAPL), they are unlikely to shy away from buying Procter & Gamble’s (PG) Tide laundry detergent or Kraft’s (KFT) Trident gum.

Of course, there is no guarantee this more defensive stance will pay off for investors. If the recent economic jitters turn out to be overblown, consumer staples and other defensive stocks could end up underperforming the broader markets.

For example, the S&P 500 surged 18.7% from May 1 through November 1 in 2009 as the U.S. escaped from the shadow of the Great Recession, according to Yardeni Research.

“May Day is the day we are supposed to go away and come back on the first day of November. The recent history of this old saw is mixed,” Ed Yardeni, president of Yardeni Research, wrote in a note. “Stocks can be up or down in May, the same as every other month.”

Follow Matt Egan on Twitter @MattMEgan5