The aerospace sector remains in the late stages of the cycle, while the defense sector faces a degree of uncertainty, with President Donald Trump looking to cut Department of Defense spending by 5 percent. Yet opportunities still exist for investors in the two segments, according to Morgan Stanley.

The Analyst

Morgan Stanley's Rajeev Lalwani made the following rating and price target changes:

The Thesis

Commercial aerospace stocks are in the late stages of the business cycle, but the group could hold up due to steady airline profits and air traffic along with a decline in oil prices, Lalwani said in a Wednesday note.

Companies in the sector are also backed by strong earnings and free cash flow profiles that are likely to continue — at least in the near-term, the analyst said.

The defense end market faces some uncertainty after Trump reportedly demanded that every department, including defense, slash its budget by 5 percent, Lalwani said. More recent reports indicate Trump reversed his decision, and it appears the U.S. government's defense budget could grow by as much as 5 percent to $750 billion, he said.

Raytheon A Top Pick

Raytheon continues to be Morgan Stanley's "top pick" in the defense sector, as the company's 30-percent international exposure best positions it if defense spending is slashed in the coming year, the analyst said. The company also oversees one of the best product portfolios in the group, with diverse products ranging from defense and missiles to cyber, he said.

Boeing: Buy The Dip

Boeing shares are down around 15 percent from their highs and now account for a slowdown in the commercial aerospace sector "to an extent," Lalwani said. The company has improved its free cash flow per share by 20 percent annually over the past five years, and there is no reason to believe this trend can't continue for another five years, he said.

Lockheed Downgraded

Lockheed Martin's ramping production of the F-35 fighter jet and the re-establishment of the F-16 give the company a clear growth trajectory into 2020 and beyond, Lalwani said in the downgrade note. Yet the company faces the following headwinds relating to its pension program, the analyst said:

Increased contributions of $1.5 billion per year are set to begin.

The company receives $2.5 billion in recoveries from the U.S. government that will be reduced to hundreds of millions due to recouped contributions.

A downgrade of Lockheed Martin's stock is warranted, as it will likely be difficult for the company to fully offset these challenges, according to Morgan Stanley.

Price Action

Raytheon shares were down 0.23 percent at $157.56 at the time of publication Thursday, while Lockheed Martin was up 0.43 percent at $271.70. Boeing was trading 0.4 percent higher at $345.25.