Shares of Duke Energy (NYSE: DUK) hit a 52-week high on Friday. Let's take a look at how it got there and see whether clear skies are still in the forecast.

How it got here
Earlier this year, during the midst of a multi-month stock market rally, I proposed five "necessity" stocks you could add to your portfolio that produce items that we use regardless of economic conditions. Electricity was one of those in-demand items with very little price elasticity, and Duke Energy was my selection for that category. As of now, that pick is looking very prescient.

Admittedly, Duke isn't going to bring exciting growth to the table, but its portfolio of power generation is basically unsurpassed. In addition to taking advantage of low-cost natural gas prices which are making electricity cheaper and boosting margins, Duke has been a leader in moving its production toward renewable energy fuel sources. Duke currently has 1,630 MW worth of wind energy production, 11 solar farms, and it produces 3,200 MW of hydroelectric power -- making Duke the second-largest renewables producer in the United States. It's even begun dabbling with the idea of biofuel electrical generation, which is something similar to what Hawaiian Electric Industries (NYSE: HE) does to keep its costs, and the costs of its customers, down.

Duke can also thank the huge barrier to entry in the utility business for keeping its dominance intact. With few competitors having the cash to take on Duke, it can instead focus less on marketing its business and more on researching ways to make electrical generation more efficient.

How it stacks up
Let's see how Duke Energy stacks up next to its peers:

DUK Chart

DUK data by YCharts

As you can see from the chart above, traditional energy-generating utilities Duke and Progress Energy (NYSE: PGN) have held a distinct pricing advantage over Exelon (NYSE: EXC) whose nuclear-heavy portfolio has struggled to control costs in light of cheap natural gas prices.

Company

Price/Book

Price/Cash Flow

Forward P/E

Dividend Yield

Duke Energy 1.3 8.3 15.0 4.6%
Progress Energy 1.6 10.8 16.8 4.5%
Exelon 1.4 4.1 12.4 4.1%
American Electric Power (NYSE: AEP) 1.3 4.8 12.1 4.9%

Source: Morningstar, Yields are projected.

Without beating around the bush, it's really difficult to differentiate utility companies by metrics alone since they're often extremely similar.

Exelon boasts one of the cheapest overall valuations because of its nuclear-heavy electrical generation portfolio. Without a possible subsidy by the U.S. government in the future, it's unlikely Exelon will be expanding its nuclear portfolio much, if at all.

American Electric Power has been held back by its secondary business of transporting dry-bulk coal. With natural gas prices remaining low and coal demand weak, that aspect of its business has struggled while the electric utility segment has remained strong.

Duke and Progress are the most similar to one another... so similar in fact that Duke is still in the process of trying to purchase the company. If successful, the cost-savings should be huge. Even without the merger, Duke appears to be a marginally better value than Progress based on the above metrics.

What's next
Now for the $64,000 question: What's next for Duke Energy? That question is going to depend on whether or not the Federal Energy Regulatory Commission approves of its merger with Progress Energy and if it can continue to improve its operating efficiency by diversifying its investments into green energy products.

Our very own CAPS community gives the company a four-star rating (out of five), with an overwhelming 95.5% of members expecting Duke to outperform. As you can deduce from my necessity stock article, I initiated a CAPScall of outperform on the stock and am up 10 points on that pick; don't expect for me to close that call anytime soon.

Duke Energy has a couple of things going its way that will keep it on top. First, its sheer size makes it a force to be reckoned with (remember, high barriers to entry equals operational security). Secondly, its investments in renewable energy are helping to drive down operational and customers' costs, as well as boosting the bottom line through government-sponsored tax credits. Finally, it supplies a necessary product with little price elasticity. That means that regardless of current economic conditions its cash flow shouldn't fluctuate much and investors should be privy to solid dividends and good profits for many years to come.

If you love high dividend yields and are excited by the idea of building your nest egg by reinvesting your returns, then you'd like the inside scoop on three more companies that could help you retire rich through healthy dividends and future growth alike, then click here for access to our latest free special report.

Craving more input on Duke Energy? Start by adding it to your free and personalized watchlist. It's a free service from The Motley Fool to keep you up to date on the stocks you care about most.