What happened

Shares of Lockheed Martin (NYSE:LMT) rocketed 28.5% higher in 2017 as the entire defense sector rallied on President Donald Trump's promise to boost military spending and on growing concern from overseas threats. Lockheed in particular stood out thanks to the progress it has made bringing its F-35 fighter jet to market, a plane that is expected to become the most lucrative weapons platform ever developed.

So what

Lockheed had been a company in transition for the last few years, integrating its 2015 $9 billion acquisition of helicopter-maker Sikorsky while trying to work out kinks in the F-35 ramp-up. The company has spent more than 10 years developing the plane, dogging initial critical performance reviews and surviving cost overruns, but the F-35 finally appears to be on track.

F-35 fighter

A Lockheed Martin F-35 fighter in flight. Image source: Lockheed Martin.

The importance of the F-35 to Lockheed's future can not be understated. The jet already accounts for about one-third of Lockheed Martin's $50 billion in total revenue and is expected to generate more than $1 trillion in revenue for the company over the next half-century or more. Lockheed Martin also has a large presence in missile systems, space, and other areas, but the company is not predicting much growth outside of airplane manufacturing in the year to come.

Lockheed appears on track to sell more than 400 F-35s in the next few years, helping to fuel the market's optimism about the company. Added interest in the company's Terminal High Altitude Area Defense (THAAD) anti-ballistic missile defense system -- seen as the best hope to counter threats from North Korea -- also helped push shares higher.

Now what

None of the factors driving Lockheed Martin higher in 2017 vanished when the calendar turned over. Still, given how far shares of the company have climbed, it's hard to imagine 2018 being a repeat of last year.

While the Pentagon's budget does seem likely to grow, recent threats of a government shutdown are reminders that Washington budget battles still rage, and the compromises needed to dramatically boost spending are unlikely to come quickly or easy. Defense is a steady and reliable sector, but not one known for dramatic share gains from its largest participants, and 2017's gains are likely more of an outlier than a sign of things to come.

Current Lockheed Martin holders should sleep easy knowing the company is headed in the right direction, but it feels way too late to climb aboard now.

Lou Whiteman has no position in any of the stocks mentioned. The Motley Fool has no position in any of the stocks mentioned. The Motley Fool has a disclosure policy.