Lockheed Martin (LMT -0.75%) ranks as the world's largest defense contractor, with a diversified collection of products ranging from fighter planes to space electronics and from helicopters to missile defense systems.

Headlines from around the world this year have served as a grim reminder of the need for these systems, and have cast a fresh spotlight on defense stocks. Yet Lockheed Martin shares are actually down year to date.

Here's a look at what's going on at Lockheed Martin, with an eye toward whether investors should buy in right now.

An impressive arsenal stuck in neutral

Lockheed Martin manufactures the F-35 Joint Strike Fighter, a trillion-dollar program for the company and its subcontractors that is a near lock to provide a steady stream of revenue and profits for years to come. The company is also one of the nation's primary vendors of helicopters, missiles, and missile defense systems, and has sizable defense electronics and space portfolios as well.

It's a leader in hypersonics, the term used to describe missiles that travel five times the speed of sound or more. With the Pentagon concerned that the U.S. military lags behind China and Russia in next-generation missiles, hypersonics should be a reliable source of new contracts up ahead.

But defense programs tend to take years to mature, and even longer to turn profitable. Lockheed Martin stock has been a laggard for some time now as the company works through the costly and time-consuming early stages of new contracts.

Lockheed Martin shares have underperformed not just the S&P 500, but defense rivals including General Dynamics (GD -0.17%) and Northrop Grumman (NOC -1.56%) over the past three years. And unlike General Dynamics and Northrop, Lockheed has no major involvement in the refreshing of the nuclear triad, considered to be the top U.S. government priority for the foreseeable future.

GD Chart

Defense stock data by YCharts.

Lockheed Martin finished the third quarter with a backlog of $156 billion worth of future business, and returned nearly all of its $2.5 billion in reported free cash flow for the period to shareholders via share repurchases and dividends.

Management has reduced Lockheed Martin's share count by 11% in the last three years, and with a current repurchase authorization of $13 billion, it could buy back another 10% of the float at current prices.

When will the growth arrive?

The F-35 is a good example of how long it takes for defense programs to hit the bottom line.

Lockheed Martin won the bake-off to develop the aircraft back in 2001, and the plane flew for the first time in 2006. Nearly 1,000 have been built, and they are currently in operation for the U.S. and allies including the United Kingdom, Israel, and Australia, but the plane is still not yet ramped to full production, and Lockheed Martin is continuing to work out kinks and test redesigns.

Lockheed heads into 2024 building the jets at a rate of about 150 per year, which should help its aeronautics segment to post healthy revenue gains and improved profitability next year. In total, the U.S. government expects to buy 2,500 F-35s for about $400 billion, and a growing list of allies are also looking to acquire the plane.

Other catalysts heading into 2024 include the need for the U.S. and allied governments to replenish their missile stocks, and the potential sale of Lockheed's 50% stake in its United Launch Alliance joint venture. But investors should be warned that it will likely be 2025 before growth accelerates at Lockheed Martin.

Is Lockheed Martin stock a buy heading into 2024?

Defense stocks are the ultimate "set it and forget it" investment category, benefiting from predictable reoccurring revenue but held back by multiyear government procurement schedules that prevent any big surges in revenue regardless of current events. Lockheed Martin is a solid pick for those with long time horizons, though I do expect other defense stocks, including General Dynamics, to outperform it in 2024.

In addition to an expected lag in growth, Lockheed Martin heads into 2024 facing issues, including a big pension payment that's coming due. Further, a potential election-year government slowdown could put it at risk of coming up short of its quarterly earnings estimates.

There is still reason for investors, in particular income-focused investors, to take a hard look. That strong free cash flow allows Lockheed Martin to pay a dividend that, at the current share price, yields nearly 3%. By 2025, normalizing F-35 sales and the need for missile replenishment offer the opportunity for significant growth.

Defense is a gruesome business, but there is nothing to suggest demand for these products will subside any time soon. Lockheed Martin has one of the most well-rounded product portfolios in the industry, and numerous opportunities to grow from here.

For investors looking for a foundational stock able to provide reliable income and modest cyclical growth for years to come, Lockheed Martin is a solid choice to buy.