For many energy companies,the pendulum has swung both ways in the past two years.

The pendulum has been swinging in the right direction for Petroleo Brasileiro, commonly known as Petrobras (PBR) - Get Report , with American depositary receipts of the company up more than an eye-popping 186% this year.

Recent strength for the ADR is the result of the company's first credit rating upgrade in five years by Moody's Investors Service. The upgrade was likely prompted by a combination of a perceived decline in liquidity risk, Petrobras' increased autonomy over its pricing policy and the unveiling of the company's 2017 to 2021 business plan.

Image placeholder title

The Brazilian government owns a majority of the company, so the upgrade also reflects improving sentiment about the country's economy. President Michel Temer is trying to restore Brazil's sinking public finances and overcome the effects of the worst recession in more than a century.

The company's broad cash generation and asset sale targets are ambitious. However, while the appreciation of the Brazilian real has helped cut costs, the high risk of execution challenges could put a damper in asset sales, and Petrobras needs to sell some assets.

Petrobras is the world's most indebted oil company, with a debt load of $125.51 billion.

For next year and in 2018, the company's maturing debt comes in at a cumulative $22.4 billion. And the company is also contending with a class action, an investigation by the Securities and Exchange Commission, and a Department of Justice probe, all of which could result in hefty fines.

TheStreet Recommends

It looks as if the company's fortunes could change quickly. For instance, analysts expect a 24% decline in earnings over the next five years.

Investors who are looking for a safer alternative should check out ExxonMobil, which has a 19% earnings growth rate projected for the same period. BP looks strong as well, in terms of an earnings growth revival.

Petrobras' near-insurmountable debt pile exacerbates the risks in the ADR. And though one could argue that Chesapeake Energy managed to come back from the abyss and successfully lower its debt, that company's debt at its highest was still lower than Petrobras' mountain.

Trading at about 16.33 times forward earnings, Petrobras isn't available at a bargain price, either. BP trades at 12.90 times, Royal Dutch Shell comes in at less than 13 times and Total trades at about 10 times.

If the Petrobras ADRs in an investor's portfolio have already risen with the company's fleeting fortunes, now is the time to get out and book profits. Those looking for an entry point should continue to hold out. 

---

A crisis is coming. But I've found seven companies that should continue to prosper no matter what's going on in the economy. Each one of these powerful, yet overlooked companies barely even blink when the market tumbles. And they'll skyrocket when it rebounds. You can pick up all seven for pennies on the dollar right now. Get their names here before it's too late.

The author is an independent contributor who at the time of publication owned none of the stocks mentioned.