Investors have been shifting money to consumer staples exchange traded funds that invest in Wal-Mart (NYSE: WMT) and other defensive stocks to provide stability and income to their portfolios.

Standard & Poor’s Equity Strategy recently boosted its opinion on the consumer staples sector to overweight from market weight. The sector’s defensive attributes and above-average 2.9% dividend yield position it for outperformance, according to the analysts.

“The S&P strategy group believes that investors have shifted their focus from better than expected S&P 500 first quarter earnings per share to global macro-economic risks, which it believes will fuel choppier equity market performance,” according to a note.

“Also, S&P Equity Strategy thinks the recent broad-based decline in commodity input costs is another positive for consumer staples, as is a bullish technical outlook,” the analysts wrote.

The $4.9 billion Consumer Staples Select Sector SPDR Fund (NYSEArca: XLP) is up 10.6% year to date to outperform the S&P 500, according to Morningstar.

“Investors have forsaken old favorites (silver ETFs and energy stocks, for example) and migrated to the unloved (healthcare), ignored (utilities) and boringly stable (consumer staples),” Nicholas Colas, ConvergEx Group chief market strategist, wrote in a report this week. “The same dynamic has been working its way through the options market, repricing risk as market attention shifts.”

“Overall, we see a mixed fundamental picture for the consumer staples area, but think the sector has defensive appeal when compared to other, more economically-sensitive sectors,” added the S&P analysts.

“In the year-ahead for larger consumer staples companies, we expect generally good cash flow, some of which we think will be used to support dividends and stock repurchase activity,” S&P said. “Also, we expect sector companies to bolster earnings and cash flow through cost reduction or restructuring programs, but we anticipate some year-to-year commodity cost pressure.”

Consumer Staples Select Sector SPDR Fund