While the consumer staples and consumer staple sectors both rely on spending habits, consumer related exchange traded funds act differently in a shifting economy.

Typically, investors can look at the two consumer sectors as discretionary “wants” and staple “needs.”

Discretionary goods include nonessential items that consumers would splurge on during the good times but are willing to cut back during tougher times. These types of items and services include retailers, media, durables, apparel and automobiles.

So far this year, the Consumer Discretionary Select Sector SPDR (NYSEArca: XLY) has gained 24.3%, outperforming the S&P 500. [Consumer Discretionary ETFs Still Crushing the S&P 500]

Top holdings include Walt Disney 6.4%, Home Depot 6.4%, Comcast 6.2%, Amazon 5.9% and McDonald’s 5.9%. Top sectors include Media 30.0%, Specialty Retail 19.1%, Hotel Restaurants & Leisure 14.5%, Internet & Catalog Retail 9.9% and Multiline Retail 6.8%.

“Investors should take note that the Consumer Discretionary Select Sector SPDR is a cyclical play tied to consumer spending,” according to Morningstar analyst Robert Goldsborough. “At the same time, cyclical firms usually do rally before the economy fully emerges from a slump.”

Consumer confidence is rising, along with the improving U.S. economy and a rising employment rate.

Next page: Consumer Staples

However, during any economic condition, people will still need basic goods or consumer staples, like food, beverages, tobacco and other household items, that many are unwilling to live without regardless of financial hardship.

The Consumer Staples Select Sector SPDR (NYSEArca: XLP) has gained 18.2% year-to-date.

Top holdings include Procter & Gamble 14.1%, Coca-Cola 10.1%, Philip Morris 9.3%, Wal-Mart Stores 8.1% and CVS Caremark. Top sectors include Food & Staples Retailing 24.0%, Household Products 21.0%, Beverages 19.9%, Food Products 17.1% and Tobacco 16.0%.

“Staples companies typically deal with narrow margins, which can make it difficult to rapidly increase profitability and thus support swift growth in stock prices,” writes Brad Sorensen, Director of market Sector Analysis, Schwab Center for Financial research. “So while staples have done well since the beginning of the year, we think their recent positive run probably has a limited time horizon.”

Moreover, uring times of improving economic growth, defensive, non-cyclical sectors like consumer staples typically fall out of favor as more investors take on riskier cyclical stocks. [Consumer Staples ETFs Losing Defensive Allure]

“Staples stocks may have been driven up by investors who’d been out of the market for some time and tip-toed back in by starting with more defensive areas,” Sorensen added. “If this is the case, then investment money may move toward cyclical sectors as investor confidence improves.”

For more information on consumer stocks, visit our consumer staples or consumer discretionary category.

Max Chen contributed to this article.