Even if two stocks don't operate in the same industry, comparing the investment propositions for both -- and how they might work in your portfolio -- is a very useful exercise for investors. Simply put, Boeing's (NYSE:BA) big earnings driver in the next year (the return to service of the 737 MAX) isn't dependent on the cyclicality of the economy, while Caterpillar (NYSE:CAT) faces significant question marks around a number of end markets in the near future. With this stark contrast in mind, let's look at which stock might be the better buy for your portfolio.

Boeing's priority is the 737 MAX

As CEO Dennis Muilenburg clearly states in every company presentation, the company's first concern is getting the 737 MAX back into service. Muilenburg believes the aircraft will be back flying in October, and investors hope he's right. After all, as discussed on Boeing's second-quarter earnings call, failing to get the 737 MAX back in service could lead to a production shutdown -- a costly and disruptive exercise. But a successful return would see Boeing on the path to ramping up production from the current rate of 42 a month to 57 a month in 2020.

A Boeing 737 MAX.

A Boeing 737 MAX. Image source: Getty Images.

There's no guarantee that Boeing will achieve its aim, but if it does, then history and logic suggest that confidence in the airplane will return soon enough. Airbus aircraft have previously had incidents with faulty information from angle of attack (AOA) sensors, including a crash near Perpignan, France, in 2008. But this attracts little media attention, and very few people refuse to fly Airbus aircraft as a consequence.

The 737 MAX is likely to return to service

Aircraft, like all engineered equipment, are subject to mechanical failure and, although highly uncommon, AOA sensors and their data can be faulty -- for example, ground crews could accidentally damage the sensors or birds might hit them. 

Boeing's immediate task is to update the maneuvering characteristics augmentation software (MCAS) to add additional layers of protection against faulty AOA data that tells MCAS to lower the nose of the plane, causing a crash. If Boeing can do this, and get the update certified, then the plane is highly likely to get back in service.

It looks like a question of when, not if, the 737 MAX returns to service -- something highly likely to be beneficial to the stock. Putting the 737 MAX aside for the moment, Boeing's execution has been pretty good this year. Boeing Global Services continues to grow at a mid-teens rate, production costs are coming down dramatically on the 787, and the company's long-term outlook remains positive

Buying Boeing stock is an opportunity to benefit from a resolution to the uncertainty around the 737 MAX -- an event that doesn't depend on the economy.

5 warning signs with Caterpillar

On the other hand, Caterpillar appears to be facing some significant headwinds that could hurt its near- and mid-term outlook, and investors who are preparing for a recession will want to avoid the stock for five reasons. 

First, although management maintained its full-year outlook for profit per share in a range of $12.06 to $13.06 in its second-quarter report, it prepared investors to expect a figure "at the lower end of this outlook range." This sort of thing often precedes a lowering of guidance later on.

Second, as you can see in the chart below, Caterpillar's construction industries and energy & transportation retail sales growth has slowed, and the company is increasingly reliant on the ongoing recovery in mining capital spending in order to meet expectations. But the recent commentary from another industrial company with exposure to resource spending, namely Cummins (NYSE:CMI), raises some doubts over the strength and length of the cyclical recovery in mining spending.

Caterpillar retail sales growth

Data source: Caterpillar presentations. 

Third, Cummins also lowered expectations for its sales to the oil & gas industry, citing lower demand for new equipment in the Permian Basin. Unfortunately, Caterpillar is expecting a bounce in demand from the Permian Basin in the fourth quarter -- note that management previously expected it to be a second-half story. In addition, process automation company Emerson Electric (NYSE:EMR) has also lowered investor expectations for oil & gas capital spending. 

Fourth, nearly all of the biggest railroad companies in North America are adopting a management methodology called precision scheduled railroading (PSR). This is seen as producing efficiency gains that lead to lower demand for railway equipment -- something that could hurt locomotive sales in the energy & transportation segment in the years to come.

Fifth, as you can see in the chart above, three-month rolling retail sales growth in the construction industries turned negative in July, and management has openly talked of intense pricing competition in China.

Boeing or Caterpillar?

Putting it all together, it's clear that both companies face uncertainty. But based on current evidence, Boeing looks more likely to get the 737 MAX back into service than Caterpillar is to avoid some chilly cyclical headwinds in the next year or so. On that basis, Boeing is a better buy.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.