Oshkosh Corporation (NYSE:OSK) had a fantastic 2016, in which its stock price rose 65.8%. The company is an industry leader in the access equipment, fire and emergency vehicle, and specialty commercial vehicle markets. Its robust defense division is also developing specialty trucks for the Pentagon and other international clients. 

Here's why the company performed so well in 2016, and why it looks as if 2017 could be another banner year for this hundred-year-old manufacturer.

Cement mixer at construction site.

Oshkosh is poised to benefit from a construction boom or an infrastructure package. Image source: Oshkosh Corporation.

Starting at the bottom

On one hand, Oshkosh's 2016 stock surge was a lucky happenstance. The company's stock -- along with the stocks of several other truckmakers and heavy-equipment manufacturers such as PaccarNavistar, and Caterpillar -- all bottomed out in late January or early February 2016 after a couple of rough years:

OSK Chart

OSK data by YCharts.

As you can see, Oshkosh's stock is the only one that's beat the S&P over that three-year period. And Navistar fared the worst. But if you were to look at 2016 in a vacuum, you'd think that all three companies had done incredibly well, with Navistar having the best performance:

OSK Chart

OSK data by YCharts.

The construction market in the U.S. -- from which Oshkosh derives 76% of its revenue -- was hit hard during the Great Recession and is still climbing back to normal levels. Because Oshkosh's defense segment derives 86% of its sales from the U.S. Department of Defense, the winding down of overseas U.S. military operations hit the company's defense segment hard in 2014 and 2015. Additionally, cyclical weak demand crippled the company's largest division -- access equipment -- in 2015. So Oshkosh's stock had been justifiably hurt in 2014 and 2015, and was poised to rebound. And rebound it did.

Keep on truckin'

The company had a string of earnings beats in 2016, which kept the stock price moving higher throughout the year. The exception was a weak Q1 report, released in January. That's hardly surprising, since the company's first quarter (encompassing October-December) has traditionally been a slow one for heavy-equipment purchases. Even so, access equipment sales during the quarter were particularly disappointing, falling 26.1% year over year. 

In April, though, things changed. The company released better-than-expected numbers for its second quarter, including $0.76 in per-share earnings, more than twice analysts' expectations. Access equipment sales were still down year over year, but not as much as anticipated. And defense sales more than made up the difference with a whopping 87% year over year increase. The stock jumped accordingly. It did it again in July, after another positive earnings report.

There wasn't much of a bump in the stock price after the company's fourth-quarter earnings report landed in mid-November, despite another amazing quarter. Oshkosh saw year-over-year sales increase across all four divisions, and the company began the first shipments of its eight-year contract to supply new Joint Light Tactical Vehicles to the Department of Defense, the company's largest customer. 

But the reason was that the big bump had already occurred a couple of days earlier.

The Trump factor

Oshkosh's stock soared, along with other defense industry stocks, in the wake of Donald Trump's upset presidential win in November (just days before Oshkosh released its fourth-quarter earnings). The market clearly expects military spending to increase under a Trump presidency, and bid up Oshkosh's shares accordingly.

The market also seemed to think that construction will get a boost under Trump, probably due to his proposed trillion-dollar infrastructure spending package. Stocks of construction equipment manufacturers like Caterpillar also rose in the wake of his win, and Oshkosh likely also benefited from this angle. 

But Oshkosh's management is trying to put the brakes on expectations. In the company's most recent earnings call, CEO Wilson Jones spoke to the market's bullish outlook on the company:

It's clear that we have a unique mix of businesses. That's one of the reasons why we believe our Company is a different integrated global industrial. We have a positive long-term outlook even without the benefit of initiatives that may be implemented by the new administration and Congress.

We certainly believe we can benefit from an infrastructure stimulus package, increased defense spending, or tax reform. However, these initiatives must first be passed by Congress and the president. That will take time, and we don't know the details of how the final initiatives will look, so we are not incorporating any of these items in our outlook.

That outlook, though, is strong, as the company expects adjusted EPS in the $3 to $3.40 range for its 2017 fiscal year (October 2016-September 2017)), compared to $2.90 for its fiscal-year 2016.

What to expect in 2017

Oshkosh's business model makes it difficult to predict exactly how well the company will fare in future years. One or more large contracts can yield upside surprises, like the major Department of Defense JLTV contract did in 2015. On the other hand, a loss of one of those contracts, or a competitive multiyear contract being awarded to another company, can cause unexpected disappointments. 

However, 2017 looks good for Oshkosh. The company expects the construction market to continue to recover in 2017, a sentiment that is commonly held by industry-watchers. However, Oshkosh cautions that "aggressive fleet management" has led to lower demand for replacement equipment from its customers. Fire and emergency segment sales should continue to improve as aging fleets are replaced. And potential increased infrastructure and defense spending will only sweeten the pot for Oshkosh. 

Given current trends, the company's own forecasts, and its recent outperformance, Oshkosh looks poised to have a strong 2017.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.