Exchange-traded funds span the investing universe, with some funds offering complete coverage of the entire stock market while others home in on particular types of investments. One popular way of investing in various sectors of the economy is the Sector SPDR line of ETFs, with 10 different funds that track the primary industry classifications.

2017 was a strong year for the stock market, but three Sector SPDRs had particularly good performance relative to the market. Below, we'll look at how Technology Select Sector SPDR (XLK 1.11%), Materials Select Sector SPDR (XLB 0.49%), and Industrial Select Sector SPDR (XLI 0.70%) managed to outpace their peers.

XLK Total Return Price Chart

XLK Total Return Price data by YCharts.

Technology shines

The technology SPDR led the way forward in 2017, with gains of 34%. Technology has become an important part of the broader stock market, with the sector making up more than a quarter of the weighting of the S&P 500 overall, and its big gains helped pull the entire market higher.

Top holdings of the fund include all of the major players in electronic devices, software, social media, internet search, and semiconductors. The fund also includes companies on the fringe of what most people consider technology, such as telecom stocks and payment processing networks. Notably absent is e-commerce, which falls into consumer discretionary. With most of the top tech companies posting extremely powerful returns during 2017, it was inevitable that the technology SPDR would do well, and upward momentum looks poised to continue into 2018.

Green bar graph rising to the right, with white letters ETF in the front.

Image source: Getty Images.

Materials bounce back

The materials SPDR got the No. 2 spot among sector ETFs with a return of just over 24%. Among the companies that helped bring about solid returns for the group were leaders in the production of chemicals, agricultural products, industrial gases, and base metals. After struggling through years of tepid performance, the promise of a recovery for the old-economy side of the market helped to power outpaced gains for materials stocks.

One of the biggest moves affecting the sector in 2017 was the combination of Dow Chemical and DuPont into DowDuPont (DD 0.46%), which by itself represents almost a quarter of the SPDR's assets. The stock soared 30% in 2017 thanks in large part to its merger, which is expected to lead to a future division into three separately traded businesses within the next couple of years. For now, DowDuPont will maintain an industrywide exposure that should serve it well in the current environment.

Industrials hit the gas

Finally, the industrial SPDR also weighed in with about a 24% return. Gains were widespread throughout the sector, with the biggest gains coming from the aerospace manufacturing, heavy equipment, and package delivery businesses. After a long period of sluggish activity levels in the industrial sector, broader-based participation among rank-and-file industrial companies helped to add to the outperformance that leaders like aviation have provided for several years now.

One notable exception came from General Electric (GE 1.74%), which suffered huge setbacks as its exposure to the energy and power businesses failed to pay off. Yet at this point, GE hardly qualifies as an industrial stock. Many foresee a greater emphasis on areas like healthcare to help it bounce back from long-term strategic challenges that started during the financial crisis and then extended into moves back toward its industrial roots. Fortunately for ETF investors, General Electric makes up less than 5% of the assets of the SPDR, limiting their exposure and letting them enjoy the big benefits from aircraft manufacturers and other leaders.

Place your bets for 2018

Market sectors tend to be cyclical, with favorable performance in one year giving way to changing conditions the next. Yet sometimes, positive trends take longer than a year to play out fully. Sector SPDRs remain a good way to take positions in various segments of the market, and their versatility and convenience will keep them among top holdings of ETF investors in the years to come.