The Shocking Sector That Nearly Quadrupled the S&P 500's Return in 2014

^GSPC data by YCharts

As we approach the end of 2014 we as investors get time to sit back and reflect on the year that's been. This includes taking into account what's worked well for us and what hasn't exactly gone our way.

Overall, it's probably been a pretty good year for most long-term investors, with the broad-based S&P 500 gaining roughly 8%, which includes its recent swoon caused by rapidly sinking crude oil prices. This is pretty much on par with the stock markets' historic return over the long run.

Some sectors, as you probably guessed, were absolutely pummeled. If you own stock in oil drillers or practically any energy company, and you're up for the year, give yourself a pat on the back. Yet, many sectors shined. Biotech stocks, for instance, returned on average about five times the gains of the S&P 500 with more than one in 10 doubling in value (or more) year to date.

But the biotechnology sector is inherently volatile, so we'd expect moves like this from time to time. The same can be said for various technology and commodity-based companies. However, this year a surprising sector that often isn't very volatile absolutely trounced the S&P 500 and romped higher by 30%, or nearly four times the gains of the S&P 500.

The shocking sector that trounced the S&P 500 Before reading any further would you care to venture a guess as to which sector you think it could be?

Give up?

Source: COD Newsroom via Flickr.

Would any of you have actually guessed the hospital sector even if I allowed you 10 guesses? My money would be on "probably not."

The hospital sector is actually pretty small -- it's comprised of just 11 companies -- and I wound up excluding three which are simply too small to consider (below $200 million market value). Yet, the remaining eight grew by an average of 30% with just AmSurg, an operator of ambulatory surgical centers around the U.S., slightly underperforming the benchmark S&P 500 (it gained 7%).

The remainder of the sector absolutely soared, including the nation's largest operator by locations, HCA Holdings , which gained 53%. Universal Health Services, Community Health Systems, and Tenet Healthcare, also gained 32%, 30%, and 19%, respectively.

Why hospitals shined in 2014 How did hospital stocks achieve such mind-numbing gains in 2014? For the most part you can thank the Affordable Care Act, better known as Obamacare.

Obamacare's primary purposes are to decrease the number of uninsured, and through that reduction spread the cost of medical care across a greater percentage of the population in an effort to control medical cost inflation. Over the past year the uninsured rate has dipped to 13.4% according to Gallup, the lowest on record since Gallup first began recording the uninsured rate in mid-2008. The implication would be that having fewer uninsured people walking through hospitals doors would lead to less doubtful accounts.

Why's this important? The plight of hospitals is having to treat patients but not being able to collect on services rendered because patients either don't have insurance or they are underinsured and simply can't afford their portion of the bill. Traditionally some of the nation's largest hospital providers had set aside a substantial portion of their revenue as uncollectable because of the uninsured and underinsured. In 2012, for example, HCA Holdings set aside 10% of its revenue, almost $3.8 billion, as doubtful/uncollectable.

With the uninsured rate now falling we're beginning to see notable progress from a number of hospitals in terms of higher revenue recognition. Returning to HCA Holdings, through the first nine months of 2014 it has provisioned $2.34 billion of its revenue as doubtful, or 7.9% of its total revenue before provisions. Comparably, HCA had set aside $2.73 billion last year to cover these doubtful accounts, or 9.7% of total revenue. This reduction in provisions goes straight to hospitals' margins and boosts their profitability.

Source: Army Medicine via Flickr.

Falling doubtful account provisions could be the factor that allows some of the sectors' biggest companies to begin paying a dividend. At the moment just two hospital stocks (Select Medicaland Universal Health Services) pay a dividend.

Beyond rewarding shareholders with a possible payout, the extra profits can allow hospitals to buy state-of-the-art equipment to improve patient care and diagnosis, expedite their expansion into new states and/or cities, or boost hiring to handle what's expected to be an influx of patient care needs in the emergency room over the coming years.

We also shouldn't discount the positive effect that Medicaid expansion has had on the hospital sector. Last year 26 of 50 U.S. states took federal money to allow lower-income individuals making between 100% and 138% of the federal poverty limit to be fully covered by Medicaid. This expansion has been critical in helping lower the uninsured rate, and I'd certainly suggest it's been important in lowering most hospitals' doubtful accounts.

Could hospitals' success be repeated in 2015?Whether or not we'll see the same success in 2015 is a completely different story. With most hospitals seeing a slight to sizable reduction in doubtful provisions it's hard to argue Obamacare isn't providing a nice boost to many of their bottom lines.

Source: White House on Flickr.

However, the Department of Health and Human Services announced a major enrollment "boo-boo" in November that showed it had accidentally been counting dental plan enrollees among total Obamacare enrollees. The result was an overstatement of roughly 380,000 enrollees. With just 6.7 million people still paying as of mid-October (not the 7.1 million as previously stated) and the HHS lowering its 2015 enrollment expectations to just 9.1 million by year's end -- this is markedly lower than the 13 million enrollees previously forecast by the Congressional Budget Office -- it's safe to say that some degree of growth uncertainty has crept back into the picture for the sector.

I, for one, wouldn't be surprised to see the sector go on the defensive in 2015 and focus more on cost-cutting than expansion. I blame this on a lack of clarity on a number of issues, including the enrollment restatement and whether or not subsidies being paid to citizens who enrolled via the federal health exchange, Healthcare.gov, are legal. We may not have clarity on either issue until mid-year which is when the Supreme Court is expected to make its decision on the latter issue.

I remain encouraged that profit margins have the potential to improve with time in the hospital sector, but duplicating these returns in 2015 appears unlikely.

The article The Shocking Sector That Nearly Quadrupled the S&P 500's Return in 2014 originally appeared on Fool.com.

Sean Williamshas no material interest in any companies mentioned in this article. You can follow him on CAPS under the screen nameTMFUltraLong, track every pick he makes under the screen nameTrackUltraLong, and check him out on Twitter, where he goes by the handle@TMFUltraLong.The Motley Fool has no position in any of the stocks mentioned. Try any of our Foolish newsletter servicesfree for 30 days. We Fools don't all hold the same opinions, but we all believe thatconsidering a diverse range of insightsmakes us better investors. The Motley Fool has adisclosure policy.

Copyright 1995 - 2014 The Motley Fool, LLC. All rights reserved. The Motley Fool has a disclosure policy.