Raytheon (RTN) and Huntington Ingalls (HII 0.50%) each dabble in areas primed for increased Pentagon spending: missiles and missile defense for Raytheon and shipbuilding for Huntington Ingalls. Both companies have enjoyed strong share price appreciation since the 2016 U.S. election in anticipation that President Trump and his Republican colleagues in charge of the Senate and House of Representatives would boost military spending.

Patriot missile

A Raytheon Patriot missile launch. Image source: Raytheon.

Huntington Ingalls is up 61.8% since Nov. 8, 2016, while Raytheon shares have climbed 52.2% during that time.

Investors currently with positions in either company would be wise to hold on despite the gains and enjoy the benefits of the coming Pentagon buildup. But which company is a better buy with new money today? Here's a case for each.

Company

Market Cap

Enterprise Value

Revenue

TTM Price-to-Earnings

TTM Price-to-Sales

TTM Dividend Yield

RTN

$60.13B

$62.82B

$25.3B

29.94

2.37

3.19%

HII

$11.03B

$11.99B

$7.07B

18.35

1.50

0.97%

Data source: Yahoo! Finance, as of Jan. 30. TTM = trailing-12-month.

Raytheon: Right place, right time

Raytheon is a $25.3 billion-sales maker of precision weapons, electronic warfare systems, sensors, and radars for U.S. and foreign governments. The company is at the forefront of some of the strongest trends in the industry: With about one-third of its sales coming from outside the U.S., it is among the most diversified U.S. weaponsmakers in terms of revenue sources. It also supplies much of the know-how behind the anti-missile systems being used to deter North Korea and Middle Eastern hostiles.

The company ended 2017 with a $38.2 billion backlog, an increase of about 4% compared to year-end 2016. It's missile business alone recorded 23% year-over-year growth in bookings in the fourth quarter, and CEO Tom Kennedy on the company's year-end earnings call said he sees continued strong demand going into 2018.

Raytheon's Patriot missile systems are a mainstay in the Middle East and gaining in popularity in Europe and Asia, and the company is also responsible for the radars used by Lockheed Martin's THAAD anti-ballistic missile defense system which is the first line of defense against a North Korean launch.

The company is also returning significant amounts of cash to shareholders. The board in November authorized a new $2 billion share buyback on top of the $900 million available under a 2015 program, and over the past decade has reduced its share count by about 30%. Raytheon is also widely expected to increase its dividend this spring, which would mark the fourteenth consecutive year the payout was increased.

Huntington Ingalls: Clear sailing ahead

Spun out of Northrop Grumman in 2011, Huntington Ingalls is a $7 billion-sales specialist who serves as one of the two major shipbuilders for the Pentagon.

The company owns a host of important assets, including the massive shipyard in Newport News, Va., just across the water from one of the largest naval bases in the world, and other facilities on the Gulf Coast. Huntington is the nation's sole builder and refueler of nuclear-powered aircraft carriers, the sole supplier of a handful of other vessels, and has contracts to construct a range of submarines, destroyers, and other ships.

USS George Washington

Aircraft carrier USS George Washington on the move at Huntington's busy Newport News shipyard. Image source: Huntington Ingalls.

Political momentum is building for increased investment in the Navy. Donald Trump ran for president pledging to increase the current 275-ship fleet to 350 vessels. A full build-up seems unlikely -- the Congressional Budget Office estimates that a 350-ship fleet would cost more than $20 billion a year over the next 30 years -- but some additional business for shipbuilders seems inevitable.

Huntington officials have warned not to expect revenue growth through at least 2020, but a budget deal with a firm commitment to expand the fleet could quickly change that. In the meantime, the company is taking advantage of one-off opportunities including the repair of the USS Fitzgerald, a job that could cost the Navy upwards of $500 million but was not baked in to Huntington estimates.

More maintenance work could follow. The Navy raised its operating and maintenance budget request to $51.3 billion for 2018, from $46.9 billion in 2016. Obviously not all of that money is going to flow to contractors, but there seem to be ample opportunities for unexpected top-line upside in the years to come.

Huntington, too, has been increasingly returning cash to shareholders, in November boosting its dividend by 20% and authorizing a $1 billion increase to the company's share repurchase plan to $2.2 billion.

So, who's the better buy?

These are two strong companies with bright prospects, but it is hard to get too excited about buying either given how far the stocks have run. Despite the White House and Congressional leaders both agreeing that defense spending needs to grow, the two sides, even after a year of trying, have not yet been able to push aside caps put in place in 2011, a reminder of the uncertainty that comes with government contracting.

Of the two, Raytheon is both the more highly valued, and the company that has a higher probability of unexpected upside in the next two to three years given the greater diversity of its product lines and its more international customer base. Huntington Ingalls, meanwhile, is almost a bargain compared to Raytheon and other more diverse defense primes, but its near-term growth prospects are more uncertain, and it too has seen investor excitement get ahead of results.

If forced to pick, I'd probably buy Raytheon right now, though I prefer rival General Dynamics to either of them. Investors in any of these companies can sleep well at night knowing the long-term prospects are strong, but tread carefully buying in today after such an extended run of enthusiasm.