What happened

The stock of Peabody Energy (BTU 0.27%) was on fire today, trading 9% higher as of 1:50 p.m. ET. The coal stock rallied as much as 14.5% within 20 minutes of the market's opening on Tuesday.

With today's move, Peabody stock is now up almost 21% this month as of this writing. I saw this rally coming, although for a different reason.

So what

Peabody Energy stock received a huge analyst upgrade this morning, and I believe it is one of the highest price targets accorded to the coal stock in recent memory.

Jefferies analyst Christopher LaFemina upgraded Peabody's rating to buy, and bumped up its price target to $36 a share from $25. LaFemina's new price target represents a solid 38% upside from the stock's Monday closing price, so it's not surprising to see the market react so strongly to this analyst upgrade.

A miner working at an underground mine.

Image source: Getty Images.

The analyst last upgraded Peabody Energy stock in March, citing higher commodity prices. LaFemina even projected mining to outperform over the next five years or so given the geopolitical risks.

Coal prices have skyrocketed in recent months, with Newcastle coal prices -- the coal benchmark for the Asian market -- now hovering above $400 per metric ton and just about $20 short of its record highs, according to data from TradingEconomics.com.

With economic activity across the globe expanding after the COVID-19 slowdown, demand for power is rising rapidly. This comes at a time when the war between Russia and Ukraine has disrupted supply of fossil fuels and sent prices of oil and gas to the moon. With the summer heat also driving demand for natural gas higher to power air conditioners, utilities have been forced to stock up on coal.

Coal prices have surged as a result, with the Newcastle price more than doubling year to date.

Higher coal prices mean higher revenue and cash flows for coal giant Peabody Energy, which is why investors still see strong upside in the stock.

Now what

Within the next 12 months, TradingEconomics.com projects Newcastle coal prices to shoot up to almost $522 per metric ton. If that happens, Peabody Energy's cash flows should skyrocket, and there's no reason the boom shouldn't be reflected in the stock price. That's what analysts and investors alike anticipate, and therefore they bet on Peabody today.