What happened

Shares of Lockheed Martin (NYSE:LMT) gained 48.7% last year, according to data provided by S&P Global Market Intelligence. That well outperformed the broader market, as represented by the S&P 500 index's 30.4% rise in 2019.

The stock rebounded strongly at the beginning of the year after a sharp decline in the fourth quarter of 2018. The company's operating results certainly gave investors much to cheer about, as Lockheed reported better-than-expected earnings in recent quarters. 

A Lockheed Martin F-35 fighter jet parked in a hanger.

Lockheed delivered 134 F-35s in 2019. Image source: Lockheed Martin.

So what

Lockheed is one of the largest contractors in the defense industry. It generates about 70% of its annual revenue from contracts awarded by the U.S. government, so the varying policies toward military spending of different administrations can have a big impact on growth. In that light, the Trump administration's position on military spending has been beneficial for Lockheed Martin. 

Through the first three quarters of 2019, its revenue increased by 11.6% year over year, driven by growth across every segment: aeronautics, missiles and fire control, rotary and mission systems, and space. Several projects underway are driving growth across these segments, but one of the highlights has been the F-35 program. 

Nations around the world have placed orders for this advanced aircraft. Lockheed was awarded two contracts worth over $30 billion combined from the U.S. Department of Defense in 2019. The anticipated economies of scale from those large orders are expected to help the company manufacture the F-35s at a reduced cost.

Now what

If you're going to buy shares of a defense contractor, it pays to keep track of what's happening on Capitol Hill -- Congress has a fair say about military spending too. When the Bipartisan Budget Act of 2019 was passed, it established increased spending levels for defense and national security for fiscal 2020 and fiscal 2021. That has provided some clarity about what kind of revenue growth Lockheed can anticipate, but it also has several initiatives coming into play for the long term.

One of its more interesting opportunities is the Artemis lunar exploration program, which NASA hopes will land the first woman and the next man on the moon by 2024. Beyond that, the Artemis program is intended to provide the capabilities to send astronauts to Mars in the 2030s. 

Given its opportunities in areas ranging from aeronautics to space exploration, Lockheed shares could still have upside from their current levels. The stock trades at a modest forward price-to-earnings ratio of 16.9 and pays a dividend that currently yields 2.13%. Analysts expect earnings to grow at an annualized rate of 13.5% over the next five years.