Yesterday, Oshkosh (OSK -1.24%) stock beat analyst estimates with a fiscal third-quarter report featuring $1.13 per share in diluted earnings on $1.75 billion in sales. Those sales numbers were up 8% in comparison to last year's Q3, while Oshkosh's earnings number was flat year over year (and would have been down, but for stock buybacks that concentrated less net profit among fewer shares outstanding, holding the line on earnings per share).

That makes for a good news/bad news kind of a quarter for Oshkosh shareholders. For one Wall Street analyst, however, it also appears to have made a compelling case for buying the stock.

Here are three things you need to know about why RBC Capital decided to upgrade Oshkosh today.

Oshkosh makes armored cars, B'Gosh. Image source: Oshkosh.

1. Sales boom

All of Oshkosh is divided into four parts: defense, fire and emergency, commercial, and access equipment. And the good news is that three of these businesses appear to be doing quite well, while the fourth isn't doing all that badly.

Sales at the company's rapidly growing defense business surged 36% in Q3, while fire and emergency sales jumped 24%. The company's flagship access equipment division, which builds aerial work platforms and telehandlers for construction, saw sales inch up 2%. Only commercial sales (concrete mixers and garbage trucks) experienced a small sales decline of 2%.

2. But sales are not profits

Profits-wise, things look a bit different. Despite the small slippage in sales, for example, Oshkosh's commercial operating profits were actually up year over year. Profits more than doubled in the company's fire and emergency vehicles division, and in defense, Oshkosh shifted from a $7 million loss last year to report $19 million in profits in Q3 2016.

Meanwhile, the company's access equipment division struggled to grow profits despite a small gain in sales last quarter. The $122 million earned in Q3 was down 10% year over year.

3. Business is looking up

Reviewing all of the above, RBC Capital finds Oshkosh stock to be undervalued at its current share price of $53 and change, and argues the stock should fetch closer to $63. Most important of all, though, is RBC's assessment that the outlook for Oshkosh's defense business, and its access equipment unit as well, are both improving. 

As CEO Wilson Jones pointed out in yesterday's earnings release, Oshkosh is only now preparing to "ramp up production and deliver our revolutionary new Joint Light Tactical Vehicle (JLTV)" to the U.S. military -- a multibillion dollar project that should propel profits for years to come. Additionally, the company is getting ready to deliver on a large order for "more than 1,000 of our Mine Resistant Ambush Protected-All Terrain Vehicles (M-ATV)," said Jones. 

Meanwhile at access equipment, Oshkosh is focusing on working down its unsold inventory (which helps explain why profits were weak -- they were cleaning house) and attempting "to optimize our working capital." Management's observation that telehandlers were selling in higher volume in North America suggests that sales may continue rising in future quarters -- hopefully at better profit margins.

The most important thing: Valuation

Do these faint hopes for a revival in access equipment (which according to data from S&P Global Market Intelligence, accounts for more than 55% of Oshkosh's total revenue), combined with proven improvements at defense and fire and emergency, justify RBC's optimism about the stock?

Well, according to management, Oshkosh now expects to earn as much as $2.80 per share this fiscal year on sales of up to $6.1 billion, and to produce positive free cash flow of $400 million. The raised guidance, says Oshkosh, is based primarily on better performance in defense and fire and emergency -- and so not dependent on improved performance at access equipment.

This suggests that RBC doesn't necessarily have to be right about the access equipment business getting better for Oshkosh to hit its numbers. At the same time, though, Oshkosh's forecast implies a valuation of close to 20 times earnings on the stock. Is that cheap enough to buy?

Perhaps. S&P Global estimates put Oshkosh's projected profits growth rate at 15% annually over the next five years. That's a bit slow to justify a 20 P/E ratio -- but it's not expensive at all if you value the stock on its enterprise value ($4.9 billion) divided by its projected free cash flow ($400 million), which works out to only a 12.2 multiple.

While Oshkosh appears to be closing in on fair value, I don't think it's quite there yet. The stock still has room to grow and, if RBC is right about the turnaround in access equipment, Oshkosh stock may grow even higher than we expect.