The U.S. stock market overall did well in 2019, but that doesn't mean that every individual stock did. Some entire sectors produced far smaller gains for their shareholders than the broader market -- particularly when it came to industries that face serious questions about their abilities to navigate through changing economic and political climates.

For example, the energy industry stood out as an underperformer as oil and natural gas prices remained weak throughout most of the year. Other sectors also lagged, albeit by smaller amounts. Below, we'll look more closely at what held Energy Select Sector SPDR (XLE -0.01%), Healthcare Select Sector SPDR (XLV -0.47%), and Materials Select Sector SPDR (XLC -0.89%) back last year, and what it would take for them to post bigger gains in 2020.

XLE Total Return Price Chart

XLE Total Return Price data by YCharts.

Looking for more energy

The energy sector's struggles have been well-documented, especially given that they've lasted for years now. Ever since crude oil prices fell below $100 a barrel in the early 2010s, they have struggled to gain traction. Today, they remain low enough to cause challenges for those producers that would like to invest money to develop new wells.

However, there are reasons for optimism. Years of weak prices have forced exploration and production companies to become smarter about the ways they search for oil and natural gas, and the resulting cost savings have made it easier for them to operate even in low-price environments.

Mylar balloons spelling 2020.

Image source: Getty Images.

Meanwhile, it's also taken a long time for midstream infrastructure companies to design, gain approval for, and build pipelines to move those energy products from the hard-to-reach areas where they are being extracted to the established refining and distribution hubs. Now, many of those projects are coming online, which should help boost activity in the sector. Combine those points with the rising geopolitical risks in the Middle East, and the result is an environment that could give U.S. energy stocks a nice lift in 2020.

A healthier look for healthcare stocks

Healthcare's gains in 2019 weren't anything to sneeze at -- indeed, only in a year when the S&P 500 jumped almost 30% would a 20% gain seem remotely disappointing. The potential that further healthcare reform efforts and other regulatory changes might be on the agenda soon in Washington dampened enthusiasm for stocks in the sector. Yet investors are now coming to the conclusion that major changes for healthcare are less likely than they feared.

Moreover, investors are starting to look more closely at the things healthcare companies are getting done. New treatments are sending stocks of pharmaceutical and biotech companies soaring when they get approved, and advances in medical technology continue to lift providers of sophisticated medical devices.

There's always some risk that new regulations will reduce the industry's profitability, and the 2020 presidential election will be a key event in determining the future of U.S. healthcare. Yet given its fundamental strength, healthcare is a hotbed of interesting stocks, and investors are increasingly paying attention.

Material returns

Finally, the materials sector posted a 24% gain in 2019, finishing at the bottom of a group of several sectors that delivered returns within a few percentage points of each other. Raw materials companies don't tend to get a lot of attention from most investors, as businesses such as mining, harvesting forest products, or producing chemicals lack excitement. Beyond that, the general economic sluggishness globally has sapped demand for many raw materials.

However, this year is looking brighter for many of these industry players. Precious metals prices have soared recently, boosting prospects for the mining sector. The possibility that recently imposed barriers to trade might get lifted is also a potential positive -- especially if the U.S. and China can come to some resolution of their trade conflict that involves rescinding tariffs, which weighed both on the producers of materials and the manufacturers that require them. Setbacks have happened -- and could happen again -- but if negotiations yield real results, that would bode well for the materials sector in 2020 and beyond.

Look for better times in 2020

It's never fun to lag the market in a winning year, and although all three of these sectors saw double-digit percentage returns in 2019, investors want more in the future. If you think these three industries can bounce back in 2020, then investing in sector funds would be a great way to gain exposure to those portions of the market.