As investors weigh on the growth outlook and strength of our economy, defensive consumer staples sector-related ETFs have been outperforming.

Over the past three months, the Consumer Staples Select SPDR (NYSEArca: XLP)  increased 6.8%, compared to the 3.4% gain for the SPDR S&P 500 ETF (NYSEArca: SPY).

The consumer staples segment has long been viewed as a high-quality and defensive play. The slow and steady nature of the consumer staples business has long been touted as a safe play for all periods since consumers will still need to buy the basic necessities.

Consumer staples are the products that people use frequently and occupy a significant chunk of the average household’s budget. The sector provides the goods that shoppers typically consume on a weekly or even daily basis, and many will continue to purchase these products even during a recession.

The sector has been the second-best performing area of the S&P 500 over the past three months, falling just behind high-growth technology stocks. Among the stalwart names, Coca-Cola (NYSE: KO), Procter & Gamble Co. (NYSE: PG) and Walmart (NYSE: WMT) have all been trading at or near all-time highs, the Wall Street Journal reports.

Along with the consumer staples sector, some analysts have highlighted other relatively defensive quality consumer names like McDonalds (NYSE: MCD) and Starbucks (NYSE: SBUX). McDonald’s recently jumped to a record after the burger giant’s sales expanded across the world in the latest quarter. Meanwhile, Starbucks’ stock also hit an all-time high last week after the world’s largest coffee chain revealed sales rose in key U.S. and China markets.

The Consumer Discretionary Select Sector SPDR ETF (NYSEArca: XLY), which includes significant exposure to both McDonalds and Starbucks, gained 2.7% over the past three months.

However, the consumer discretionary sector ETF has been outperforming this year, increasing 25.6% year-to-date, whereas XLP advanced 20.5% and SPY gained 22.0% so far this year.

For more information on the market sectors, visit our sector ETFs category.