Lockheed Martin (LMT 1.38%) stock has either been a winner or loser in recent years, depending on the time frame used to judge it. Over the past five years, it's been up 83.97%, easily beating the S&P 500's 48% gain. But over the past 12 months, Lockheed shares have been down 10.59%, trailing a flat S&P 500 performance.

LMT Chart

LMT vs. S&P 500 data by YCharts.

Lockheed's outlook is complicated. A range of political and geopolitical risks have put a damper on expectations for 2019. However, the company, the world's largest defense contractor, also has a massive backlog that stretches well into the next decade and a portfolio designed to cater to some of the Pentagon's top priorities.

Here's a look at Lockheed Martin's business and forecast in order to determine whether it's a buy today.

Check out the latest earnings call transcript for Lockheed Martin.

An unmatched portfolio

Lockheed Martin's signature platform is the F-35 Joint Strike Fighter, a trillion-dollar warplane that after years of trials and turmoil is finally beginning to hit its stride. The F-35 accounts for about 30% of Lockheed Martin sales. The Pentagon will be a customer for decades to come (it just ordered its latest batch of 255 in November), and sales to foreign allies are ramping up as well.

Lockheed Martin F-35 in flight.

Lockheed Martin's F-35 Joint Strike Fighter. Image source: Lockheed Martin.

Although the F-35 gets most of the attention, Lockheed Martin is also a strong and growing player in areas that are getting a lot of Pentagon attention, such as in missile defense and rocket technology. The company is the master at hypersonics, missiles that travel at least five times the speed of sound. It was awarded more than $1.2 billion in contracts in 2018, and then an additional $846 million to work on a Navy design in late February.

The Pentagon has identified hypersonics as an area where China and Russia are on par or ahead of the U.S.'s efforts, so it needs extra investment and attention. Military leaders, in justifying awards to Lockheed Martin last year, said "no other contractor has this level of design maturity," estimating that the government would have been forced to absorb more than $100 million in duplicate development costs had it gone with any bidder other than Lockheed.

Lockheed Martin is also the maker of the THAAD anti-ballistic system deployed along the Pacific Rim to counter North Korea and the builder of the PAC-3 missile used on the popular Patriot missile defense platform. Overall, the company expects its missile business to post double-digit growth in 2019 and continue that momentum into 2020 and beyond.

Lockheed Martin generated $7.4 billion in cash in 2018 and expects to at least match that total this year. The company at year's end carried a backlog of $130 billion, up 25% year over year.

Chairman and CEO Marillyn Hewson on a call with investors last October said portfolio concentration related to the F-35, once a common criticism of Lockheed Martin, is no longer a concern due to the plane's growing number of international customers and the strength of the rest of the businesses.

We're seeing a lot of growth in all elements of our business. So every business area contributed to the growth for this quarter and for outlook for the year and we'll continue to see growth. We won a lot of new programs across the business and they will help to likewise mitigate the risk of one single program. So I feel very comfortable and I'd like to see the F-35 sales continue to grow.

Expect the unexpected out of Washington

But despite the enthusiasm, Lockheed Martin officials offered somewhat disappointing 2019 guidance following the first-quarter earnings report in late January. The company expects to earn between $19.15 and $19.45 per share in 2019. That's nearly 9% above 2018, but below the consensus $19.57 per share in earnings Wall Street had been expecting.

Lockheed Martin is bullish on its portfolio, but somewhat uncertain on how quickly it will be able to monetize its backlog. With the White House and the House of Representatives now controlled by different parties, Washington is gearing up for a fiscal 2020 budget showdown that could take most of the year to resolve. At best, that could delay Pentagon spending. At worst, it could limit how much the military has available to spend over the next 12 to 18 months.

Perhaps sensing the difficulty of the budget negotiations on the horizon, Lockheed recently added language addressing "the impact of government shutdowns" to its list of factors affecting forward-looking statements.

There are geopolitical concerns weighing on the company as well. Lockheed's agreement to deliver 100 F-35s to Turkey is in doubt due to tensions between that country and its NATO allies, as well as Turkey's planned purchase of Russian-made missile defense systems.

Given the strength of the F-35 order book, those planes could likely find buyers elsewhere, but a handful of Turkish companies are also key suppliers on the F-35 program responsible for electrical wiring interconnection systems, engine parts, and landing gear components.

A Lockheed Martin THAAD interceptor is launched over water.

A Lockheed Martin THAAD interceptor launch. Image source: Lockheed Martin.

There have also been lawmakers looking to halt a $15 billion deal to sell Lockheed-made THAAD systems to Saudi Arabia. Concerns about that contract were eased earlier this month when the Pentagon made a $945.9 million down payment on the system, but with criticism of the Saudi-linked killing of journalist Jamal Khashoggi last October and the Saudi-backed civil war in Yemen, it's hard to say for sure the full deal will get done.

Buy and hold

I wouldn't bet on Lockheed Martin shares outperforming the S&P 500 in 2019. If recent history is any guide, the partisan budget battle in Washington will be long and ugly, with plenty of rhetoric that could spook investors. In this climate, procurement tends to slow, making it more difficult for contractors to hit quarterly targets.

But for a long-term investor, Lockheed Martin's portfolio offers exposure to a wide array of products military leaders have identified as key to the national defense. I expect revenue growth to accelerate by the end of 2020 as some of that backlog is converted into firm orders and for profitability to improve as programs like the F-35 continue to mature.

LMT Dividend Yield (TTM) Chart

Defense sector dividend yield (TTM) data by YCharts.

While you wait, Lockheed Martin offers annual dividend boosts and a best-in-class 2.76% dividend yield.

With defense titans, it's best to try to look past the near-term noise and focus on the future. And for Lockheed Martin, the future looks bright. Lockheed Martin is, therefore, a buy.