DALLAS — American and Southwest are expecting their average prices to move higher the rest of this year, which would mark a shift from fare wars that have cut into profits and created turbulence for airline stock prices.

Both carriers said Thursday that they see a key measure of revenue per mile rising in the fourth quarter compared with a year earlier. They said demand for both business and leisure travel remains strong.

The comments signal an upbeat end to the third-quarter earnings season for airlines, which hit bottom last week when United executives gave a glum revenue forecast and failed to reassure investors that they had a plan for success.

It has been an up and down year for airline stocks, and that volatility continued Thursday. Despite the optimism over revenue, concern about rising costs helped push most airline shares lower.

American, for example, expects its costs to rise sharply in the fourth quarter before easing next year. On Wednesday, questions about Alaska Airlines’ ability to control costs after buying Virgin America contributed to a 13 percent drop in its stock. And last week, concern about rising costs was a key reason that United’s stock fell 12 percent in one day.

American, the world’s biggest airline, reported earning $624 million in the third quarter, down 15 percent from $737 million a year earlier largely because hurricanes Harvey, Irma and Maria caused it to cancel more than 8,000 flights, which cost the airline $75 million in pretax earnings.

The profit was slightly higher than analysts expected, and revenue rose 3 percent to $10.88 billion.

Southwest’s profit jumped 30 percent, to $503 million from $388 million a year earlier. Revenue rose 3 percent to $5.27 billion despite the loss of $100 million blamed on hurricanes — Southwest canceled 5,000 flights in Houston, Florida and the Caribbean.

“Despite all these challenges, it was a very strong quarter, and fourth quarter looks better,” Chairman and CEO Gary Kelly told analysts.

Like American, Dallas-based Southwest narrowly beat Wall Street’s profit forecast.

Airline investors intently watch an arcane figure: revenue for each seat flown one mile. It is a measure of pricing power in the airline business, and it goes up with rising average fares and full planes.

That figure rose 1.1 percent at American and fell 0.5 percent at Southwest in the third quarter, but both airlines see it climbing higher in the fourth quarter. Southwest predicted it will increase up to 1.5 percent, while American was more bullish, putting the likely rise at between 2.5 and 4.5 percent.

Cowen and Co. analyst Helane Becker noted that American executives have repeatedly said the pricing figure would improve from the third quarter into the fourth. The market doubted that forecast, she said, and so Thursday’s reassurance by American was a plus.

At much smaller Spirit Airlines Inc., profit fell 26 percent to $60 million because of hurricane-caused canceled flights and the effect of fare wars with United and American.

Spirit CEO Robert Fornaro demand was already firming up for peak travel days during the rest of the year.

“It’s going to be a strong fourth quarter, especially the holiday periods,” he said in an interview.

American Airlines Group Inc., which is based in Fort Worth, Texas, fell $2.41, or 4.7 percent, to close Thursday at $48.61. Southwest Airlines Co. dropped $2.05, or 3.6 percent, to $55.11. Miramar, Florida-based Spirit jumped $2.34, or 6.9 percent, to $36.08.