Boeing (NYSE:BA) and Raytheon (NYSE:RTN) have dominated aerospace headlines in 2019, but for very different reasons. Boeing has been scrambling to repair its reputation and get its 737 MAX jet flying again following a pair of crashes that led to more than 300 fatalities. Meanwhile, in June, Raytheon announced plans to combine with the aerospace arm of United Technologies (NYSE:UTX), creating a $75 billion-sales aerospace and defense giant.

The details are different, but both Boeing and Raytheon are going through a period of uncertainty as the 737 MAX investigation continues and Raytheon's megadeal is scrutinized by regulators and investors.

Boeing's 737 MAX soaring above clouds.

Boeing's 737 MAX in flight. Image source: Boeing.

The aerospace and defense markets both companies serve remain healthy and vibrant, making investment in the industry intriguing. Here's a look at where things stand with both Boeing and Raytheon to determine which, if either, is the better buy today.

Boeing: Trying to get airborne again

Boeing is a difficult company to get a read on at this moment. On one hand, the company is a $100 billion-sales aerospace giant with a massive and profitable commercial airline franchise with a multiyear order backlog and a defense business that can boast a series of significant contract wins. On the other hand, the 737 MAX tragedy has lingered much longer than past modern aviation disasters and is but one of a series of missteps that have led to real questions about how the company is managed.

Airline customers have revised schedules to assume the 737 MAX will not be flying for them until at least late in the first quarter of 2020, meaning the grounding will last about a year at the minimum. Boeing has continued to manufacture airplanes during the investigation, in part to keep its supply chain healthy, and is likely to face billions in losses as it compensates customers for the delays and expenses related to getting the growing backlog of jets ready for flight.

The investigation into what happened to the 737 MAX has at times revealed embarrassing details about how the company handled the certification process. In September, Boeing was dealt a fresh blow when its planned 777X jet had a testing setback, forcing delays. The defense arm has come under fire from Pentagon officials in recent years, including a rare public rebuke that led to an overhaul of the defense unit. And its long-delayed refueling tanker has been grounded multiple times by the Air Force due to manufacturing mistakes and system malfunctions.

But for all its troubles, Boeing still has a lot going for it. The 737 MAX will eventually get airborne, and despite its issues, it is still likely to be a best-seller. And over the past year, the defense arm has won a number of high-profile awards, including a $9.2 billion contract to build the Air Force's trainer jet, a $2 billion-plus deal to replace the UH-1N Huey helicopters, an $805 million contract to design and build a new Navy refueling drone, and a contract to design and build an autonomous submarine for the Navy.

Raytheon: Charting a new course

Raytheon has always been an exception to the rule among large defense contractors, focused not on building warships, bombers, and tanks but rather on the electronics, sensors, and precision weapons that go on those platforms. The company makes the MIM-104 Patriot surface-to-air missile system as well as missiles, including the Tomahawk, Sidewinder, and Maverick, and the radar and electronics that power the THAAD ballistic missile interceptor being deployed to keep the U.S. and its allies safe from North Korean threats.

The company doesn't get the same spotlight that Lockheed Martin gets as manufacturer of the F-35 or General Dynamics gets as manufacturer of nuclear submarines, but the business is lucrative, and its end markets are growing. Raytheon's EBITDA margins tend to be among the best of all major contractors. And as the world becomes ever more digital, expect companies like Raytheon that supply the brains that power large weapons systems to do better than the actual metal benders that build the equipment.

Artist's rendering of a missile interceptor firing up from a warship.

An illustration of Raytheon's SM-3 interceptor in action. Image source: Raytheon.

Raytheon also boasts better revenue diversity than most of its peers, with foreign customers accounting for about one-third of total revenue and half of its backlog. Missile defense systems like the Patriot are an important part of that total, with the U.S. often more willing to green-light foreign sales of defensive weapons to allies than to sign off on selling offensive platforms like fighters and warships overseas.

The company would further diversify, assuming its deal with United Technologies Corporation (UTC) is completed as planned in 2020. The two businesses have very little overlap, with UTC aerospace focused on defense and commercial aviation engines and aviation interiors and components. Nondefense business accounts for about three-fourths of UTC's total aerospace sales, giving the combination new sources of growth during periods like the early part of this decade, when the Pentagon budget was frozen due to partisan budget battles.

United Technologies still has to complete planned spinoffs of its Carrier HVAC and Otis elevator businesses prior to combining with Raytheon, and the companies face some criticism from hedge funds that would rather see them continue as independents, but over the long haul, I believe the merger will benefit both sides and create a new aerospace powerhouse.

And the better buy is...

I've been saying for a while now that until Boeing management can demonstrate it is in firm control of the company and has cleaned up the sloppy internal processes that have gotten it in trouble, I can't recommend buying the shares, even if I do admire the portfolio. I've not yet seen anything to change this view. Raytheon, meanwhile, has a portfolio well positioned to capitalize on Pentagon priorities and makes a strong case as the better buy even without Boeing's drama.

A word of caution, though: Raytheon shares are not cheap, trading at 18.7 times earnings, above the multiples assigned to Lockheed Martin (18.6) and General Dynamics (16.2). The company's shares are also likely tied to shares of United Technologies ahead of their all-stock merger, which means weakness in elevators or HVAC in the coming quarters could put pressure on Raytheon shares.

Of the two, I'd rather buy Raytheon than Boeing shares today. But I see better buys in the defense sector than either company right now.