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.