Shares of almost every Pentagon contractor has enjoyed a steady rise over the last year on anticipation of higher military spending. The $1.3 trillion congressional budget deal signed on March 23 showed that optimism was well-placed, with more than $700 billion allocated for defense.

Given the huge amount of funding flowing into the sector, expect all contractors to be beneficiaries. But with the budget increase well-telegraphed, it has arguably been priced into the shares for some time now, meaning investors should be cautious when considering how to put new money to work.

F-35s on board the USS America

Seven Lockheed Martin F-35Bs on board Huntington Ingalls-built amphibious assault ship USS America. Image source: Lockheed Martin.

Huntington Ingalls Industries (NYSE:HII) and Lockheed Martin (NYSE:LMT)are each up about 25% over the past year, though Lockheed is significantly higher valued on both a price-to-earnings and price-to-sales basis. Let's take a look at the prospects for both companies with an eye toward determining which is a better buy right now.

 

Market Cap

2017 Sales

TTM Price-to-Sales Ratio

TTM Price-to-Earnings Ratio

TTM Dividend Yield

Huntington Ingalls

$11.45B

$7.44B

1.45

24.36

0.99%

Lockheed Martin

$97.93B

$51.05B

1.92

49.72

2.20%

Data source: Yahoo! Finance. Data as of April 11, 2018. TTM = Trailing 12-month.

The shipbuilding specialist

Barely six months removed from the company warning investors that revenue could be flat for the next few years, the outlook for Huntington Ingalls is seemingly improving by the day.

The company, a shipbuilding specialist and the nation's sole builder of aircraft carriers, late last month received word that the Navy is willing to explore committing to two carriers at once in future orders. That's a long-term goal of Huntington CEO Mike Petters, who believes the labor and material savings from doubling up on orders would both save the government money and help Huntington to run more efficiently.

There are significant funds in the congressional budget deal earmarked for new ships. Huntington received more than $4 billion to continue work on the USS John F. Kennedy, the second in the new Ford-class carrier series, $1.8 billion for the first LX(R)-class amphibious warship, and funding for additional guided-missile destroyer and Virginia-class submarine work.

Huntington's massive shipyard capacity is also being put to work. The Navy earlier this month added an additional $57 million to what it is paying Ingalls Shipbuilding in Mississippi to repair the USS Fitzgerald destroyer, which was damaged in a June collision. Overall, the Pentagon said it might have to spend $600 million to repair the Fitzgerald and the USS John S. McCain, another destroyer that was damaged last year now with Ingalls for repairs.

The added work has Petters now telling investors that he could envision top-line growth of about 3% over the next five years.

Huntington's long-term goal is to generate margins of between 9% and 10% on its shipbuilding activities. Any upside should find its way to shareholders: The company said it plans to return substantially all free cash flow to investors through annual dividend increases and "opportunistic" share repurchases.

The F-35, and more

Lockheed Martin's signature program is the F-35 Joint Strike Fighter, which is expected to generate more than $1 trillion for the contractor and suppliers over its lifetime. But there are signs the jet might not be as profitable for Lockheed as once hoped. The Pentagon earlier this month warned that it could cut its total F-35 by as much as one-third, or about 590 jets, due to the high costs of operating and maintaining the aircraft.

The government is looking to reduce its costs by as much as 38% over the next decade, an ambitious target for a weapons program this late in the production cycle.

Lockheed and the government have also been locked in more difficult than expected negotiations over terms for the next batch of F-35s. Since each order tends to come in at a lower price, Lockheed needs to hold the line the best it can on pricing for the current 130 fighters now under negotiation, or risk diminished returns on the larger lots still to be ordered.

There are areas of upside for Lockheed Martin. Missile defense is increasingly a priority not just for the United States but also for allies in Asia, the Middle East, and Europe -- and Lockheed is either the prime contractor or a major subcontractor on the THAAD anti-ballistic missile defense system, Patriot surface-to-air missile defender, and Aegis sea- and land-based systems. The company is also hopeful its Sikorsky unit, acquired for $9 billion in 2015, will be able to secure new helicopter work in the U.S. and abroad.

Lockheed in the recently completed budgeting process scored about a dozen more C-130 transport orders than anticipated, on top of 90 F-35s and funding for three Littoral Combat Ships. It also has a number of large foreign arms deals pending, including a $15 billion deal with Saudi Arabia for THAAD systems and a $6.5 billion order from Belgium for F-35A fighters.

Which is the better buy?

Both of these companies can be stable parts of any portfolio, but given the share appreciation experienced in recent years, the only way to beat the market with defense stocks is to discern which, if any, has a better chance for an upside surprise.

In this case, the answer is Huntington. Lockheed should do well on missile defense, but that work is largely priced in, and the F-35 could provide some unanticipated turbulence in the quarters to come. Huntington Ingalls, meanwhile, has unbudgeted repair work to help pad results in 2018, and the prospects of an all-important two-carrier order on the horizon.

Huntington Ingalls is my bet as more likely to produce a spark.