Bank of America Merrill Lynch changed ratings for some of the country's largest airlines, citing their ability to tackle slowing demand amid increasing domestic capacity.

Analyst Andrew Didora upgraded Southwest Airlines (LUV) - Get Southwest Airlines Co. Report to buy from neutral and increased his target price on the stock to $65 from $58. At the same time, he downgraded American Airlines (AAL) - Get American Airlines Group, Inc. Report to neutral from buy and lowered the target to $31 from $38. Spirit Airlines (SAVE) - Get Spirit Airlines, Inc. Report   also was downgraded to underperform from neutral and its target price dropped to $39 from $47.

"We are becoming increasingly selective on the airlines as many of our demand indicators are slowing at a time when domestic capacity is accelerating to nearly +6% in 2020 vs sub-4% in 2019 as the 737 MAX returns to service," the analyst said in a note. "As we do not expect unit revenues to accelerate in this environment, we prefer the airlines that have the cost structure to drive margin expansion, like Buy-rated UAL and LUV."

Shares of Southwest Airlines were up 5 cents to $54.54 on Monday.

TheStreet Recommends

"We believe LUV is the highest quality airline in the group with a very conservative balance sheet and low earnings volatility, which positions it well for later in the cycle," Didora wrote. "Further, we view LUV as the key beneficiary from the expected return of the 737 MAX, and we expect its earnings to normalize driven by a reversion in its costs. This should allow LUV to grow margins even in a decelerating unit revenue environment."

American Airlines shares were down about 1.5% to $27.53, while Spirit Airlines stock fell 2.5% to $37.10.

"While we believe AAL's unit revenues should continue to normalize and benefit from its hub capacity growth, leverage and labor issues keep us more cautious," the analyst wrote. "We expect cost pressures to mount in 2020 with the flight attendant and pilot contracts becoming amendable and a mechanics deal already in negotiations."

He said revenues at Spirit Airlines "are most at risk from the return of the 737 MAX given SAVE's significant network overlap with LUV (over 75% of its domestic capacity). This coupled with SAVE's outlook for unit costs to be flat to slightly up in 2020 makes it challenging to forecast margin expansion next year."