Companies providing services related to gas, electricity or water are generally referred to as utilities stocks. The utilities sector umbrella also encompasses businesses providing more general infrastructure services, and the sector has also more recently come to include alternative energy companies in some cases as well. Thus, businesses focused on developing or providing wind power, geothermal power, solar power and more are oftentimes also considered utilities companies.

Utilities companies typically rely on massive infrastructure–things like pipe systems, power lines, and so forth–and, as a result, often carry significant debt. This makes them sensitive to changes in interest rates. In 2018, when the Federal Reserve increased the interest rate on four separate occasions, utilities faced external pressures such as those related to the payment of dividends. At the same, capacity growth across the sector has been increasing, and the high fixed cost associated with utilities companies has been a barrier to performance in the past as well. Further, most of 2018 was a period in which economic growth continued apace; if economic growth were to accelerate, the sector would likely suffer because it would appear to be less attractive to investors who no longer need to find a defensive investment.

In spite of these pressures, though, the utilities sector has managed to outperform most other sectors overall over the course of 2018. In the last few weeks of the year, many of the sector's gains have been wiped out in broader stock market declines. Nonetheless, the services and products that utilities companies provide are generally viewed as necessary, even when the economy is struggling (these companies can pass along increases in the price of gas or coal to their consumers). The fact that utilities are seen as relatively safe bets in times of market turmoil has helped these companies to remain stable throughout 2018.

Below, we'll explore the top five performers in the utilities sector for this past year. Companies considered for the ranking all have a market cap of at least $6 billion, are traded on the NYSE or Nasdaq, and are categorized under the Global Industry Classification Standard as "utilities" stocks. Figures are for 2018 year-to-date as of December 17.

1. NRG Energy, Inc. (NRG)

Market Cap: $12.2 billion

Performance in 2018 as compared with the S&P 500: 42.5% (NRG) vs. -5.6% (S&P 500)

2. AES Corporation (AES)

Market Cap: $10.5 billion

Performance in 2018 as compared with the S&P 500: 42.4% (AES) vs. -5.6% (S&P 500)

3. SCANA Corporation (SCG)

Market Cap: $6.8 billion

Performance in 2018 as compared with the S&P 500: 28.9% (SCG) vs. -5.6% (S&P 500)

4. FirstEnergy Corp. (FE)

Market Cap: $20 billion

Performance in 2018 as compared with the S&P 500: 27.6% (FE) vs. -5.6% (S&P 500)

5. Exelon Corporation (EXC)

Market Cap: $45.3 billion

Performance in 2018 as compared with the S&P 500: 19.1% (EXC) vs. -5.6% (S&P 500)

NRG Energy, Inc.

NRG Energy, Inc. is a New Jersey- and Texas-based multiservices provider, offering energy products across both residential and business spaces. Serving about 3 million customers across the U.S., NRG is also a leading integrated power power company with about 26,000 MW of generation.

NRG Energy had a phenomenal 2018, in spite of the generally lackluster performance among many of its competitors. For Q4 2017 and the first three quarters of 2018, the company produced average positive earnings surprise of nearly 220%, an astounding figure. A good portion of NRG's success this past year may be attributable to its three-year Transformation Plan, initiated in July of 2017. This plan aims to increase cost savings, boost shareholder value, and grow earnings. Indeed, NRG Energy has so far been successful at meeting the execution deadlines of the various points of its plan, and it is poised to achieve its target of $500 million in cost savings for 2018. If the plan continues apace, this number will be even higher in 2019 and 2020, making NRG Energy a strong prospect for the future as well.

AES Corporation

Virginia-based AES Corporation generates and distributes electrical power across more than a dozen countries. AES offers a broad range of products and fuel types, including coal, diesel, gas, renewables and more. For 2017, the company saw $11 billion in revenues and a total asset base of $33 billion.

Early in the year, AES announced a large-scale reorganization of its business which aimed to trim costs and carbon intensity. AES was one of several companies to shift its focus toward sustainable practices in recent years; the company bought up solar developer sPower in 2017. The reorganization involved the consolidation of five Strategic Business Unit structures, as well as a change to AES' growth and commercial activities to focus on the U.S., Central and South America. AES has so far been able to keep pace with its strategic objectives, per a press release in November. The company signed 392 MW of long-term renewables contracts for Q3, for instance. During this same period, AES saw an adjusted EPS 52% higher than the third quarter of 2017.

SCANA Corporation

SCANA Corporation is a holding company focused on energy businesses like regulated electric and natural gas. Most of the company's subsidiaries are active in its base of South Carolina, although it extends its operations throughout the larger southern United States region.

SCANA began 2018 by revealing that it would be purchased by Dominion Energy for about $7.9 billion in an all-stock deal. This came as welcome news for SCANA, which had faced external pressure associated with its decision to move away from a nuclear project in July of 2017. The V.C. summer nuclear project cost SCANA about $9 billion and prompted a subpoena from the Securities and Exchange Commission related to the project. When news of the acquisition broke in January, SCG stock spiked briefly before plateauing throughout most of the year. Indeed, perhaps the singular reason why SCANA appears on this list is because of the timing of the acquisition, which was finalized around the end of the third quarter. After this point, the price of SCN once again increased. Whether this one-time boost will carry over into 2019, however, remains to be seen.

FirstEnergy Corp.

Serving about 6 million customers throughout its base of Ohio and in states like Pennsylvania, West Virginia, Maryland and others, FirstEnergy Corp. focuses on electric power services.

2018 has been a mixed year for FirstEnergy. In March, the company's generation subsidy FirstEnergy Solutions filed for bankruptcy. Also in March, and again in August, FirstEnergy announced the closure of multiple Pennsylvania and Ohio nuclear power and coal plants. On the other hand, FirstEnergy also partnered with BMW and Nissan to explore the electric vehicle space in 2018 as well.

Exelon Corporation

Exelon Corporation is based in Chicago and serves about 10 million customers, making it the largest electric parent company in the country. The company reported earnings at the upper end of its guidance range for both the second and third quarters of the year. This may have been thanks to its efforts to invest in advanced infrastructure and technology. The company even completed a nearly-$1 billion smart meter installation program about three years ahead of schedule. It appears to be poised to carry this momentum into the new year as well.