Of all the large prime defense contractors -- companies that make the planes, ships, and tanks for the U.S. military -- Huntington Ingalls Industries stands out for all the wrong reasons these days.

The company's stock has underperformed both the markets and other defense contractors, trailing the S&P 500 by more than 65 percentage points over the past three years. And its valuation is well below that of other defense primes.

Company

Price/Earnings Ratio

Northrop Grumman

21.38

Lockheed Martin

16.05

General Dynamics (GD -0.29%)

13.69

Raytheon Technologies

13.04

Huntington Ingalls (HII -1.01%)

11.14

Data source: YCharts. Data as of Nov. 10.

Huntington Ingalls, one of the Navy's two primary shipbuilders, is certainly more affordable than some of its rivals. But does that make the stock a good buy? Here's a look at what has gone wrong for Huntington Ingalls, and what the company might do to reverse the momentum.

Huntington Ingalls has been treading water

Huntington Ingalls' recently released third-quarter earnings report followed a familiar pattern. The company earned $5.45 per share, easily beating the $4.13-per-share consensus, but that beat was aided by more than $1 per share in benefit from a lower-than-expected tax rate.

Shipbuilding margin came in below expectations, and management left full-year margin guidance at 5.5% to 6.5% despite boosting expectations for total shipbuilding revenue. Huntington Ingalls also implied that it expects about $400 million in free cash flow in 2021, well below the $550 million suggested earlier in the year, because of program expense delays.

Huntington Ingalls boasts one of the world's most advanced shipbuilding facilities, the massive Newport News yard in Virginia where the nation's nuclear carriers and many of its submarines and other ships are built. But earnings in recent years have been plagued by unexpected expenses and a series of flaws in its new flagship aircraft carrier, the company's most important program.

It's all added up to a stock stuck in neutral during a time when the Navy has been talking up aggressive expansion plans.

The Navy's growth presents new risks along with opportunities

Although most of the noise surrounding Naval expansion has come from the now-outgoing White House, the push to buy more ships is unlikely to peter out in a new administration. The U.S. Navy has been working on a "Battle Force 2045" long-term plan, which, though not yet publicly revealed, is believed to advocate for a 355-ship fleet by 2035 and a 500-ship fleet 10 years later.

The Navy had about 290 deployable combat vessels as of last year.

That, in theory, should be good news for Huntington Ingalls, which, along with General Dynamics, soaks up the vast majority of Navy procurement spending. But the details in how the U.S. Navy hopes to reach those lofty numbers is likely to cause some concern.

The USS Delaware rolls off the Newport News assembly line.

Image source: Huntington Ingalls.

Every new ship put in the water today requires millions in added personnel spending. Given the pressure expected to be applied to Pentagon spending after years of budget growth, a lot of whatever expansion happens in the years to come is likely to be focused on autonomous. It could also mean fewer carriers and support ships as the Navy tries to spread its resources thinner instead of lumping them in large carrier groups.

Shipbuilders today are somewhat immune from new competition because building new shipyards is costly and creates a high barrier to entry. The risk for Huntington Ingalls is that as more of the value in ship procurement shifts to electronics and automation, and the actual metal bending becomes more commoditized, it could open the door to new entrants funneling Navy procurement spending away from the incumbents.

The Navy is already dabbling in autonomous, and it's bringing in new contractors to assist in the effort. Boeing in 2019 won a contract to construct four large unmanned submarines, while Leidos Holdings was responsible for a surface ship that sailed autonomously from San Diego to Hawaii in a demonstration.

Huntington Ingalls needs to diversify

Huntington Ingalls today has a solid $45 billion backlog and a reasonable valuation, but given the execution issues it has experienced in recent years and the risks to the business up ahead, I don't blame investors for not buying in.

General Dynamics, the other major shipbuilder, has a number of other business units it can fall back on to cushion the ebbs and flows of shipbuilding. Huntington Ingalls is more of a pure play. For the stock to take off, the company needs to change that.

Huntington Ingalls has dabbled in M&A in the past, in 2019 buying marine robotics developer Hydroid for $350 million. CEO Mike Petters on the company's post-earnings call said more deals to build out its autonomous capabilities could follow, but I'd like to see the company explore using acquisitions to spread itself further.

Dynetics, a defense R&D shop that sold to Leidos late last year for $1.7 billion, would have been an ideal, though costly, target for Huntington Ingalls. There are also a handful of midsize government services companies that would add IT and tech capabilities and help lessen Huntington Ingalls' reliance on shipbuilding.

Huntington Ingalls is a company adrift. Until it charts a clear course out of the doldrums, be it through M&A or some other way, I'd avoid buying into the stock.