In this Feb. 3, 2014 file photo, a Southwest Airlines jet plane lines up for a landing at Love Field in Dallas. © AP Photo, LM Otero, File

There's an old Wall Street joke about how to end up with $1 million worth of airline stocks: Start with $10 million. But over the past two years, the joke has been on investors who have stayed away from this perennially troubled industry.

So far this year alone, the Dow Jones U.S. Airline index has climbed 34 percent. The stock of American Airlines Group (AAL) has soared 54 percent, Southwest Airlines (LUV) has gained 51 percent, and Spirit Airlines (SAVE) has risen 44 percent.

The industry's sudden appeal is a direct result of its long stretch of misery. A wave of bankruptcies and mergers over the past few decades has left the domestic market with a handful of big players. Reduced competition amid rising demand for seats has given the survivors a greater ability to raise fares -- and to impose an array of annoying fees.

In 2000, nine airlines controlled about 80 percent of the U.S. market. Today, just four companies control about the same percentage: American, Delta Air Lines (DAL), Southwest and United Continental (UAL).

The industry's improving fortunes were evident in second-quarter results. For example, Southwest's earnings rocketed 108 percent from the same period a year earlier as revenue rose 8 percent. United's earnings jumped 68 percent on a 3 percent rise in revenue.

But can the profit rebound, and stock rally, keep going? A key issue is how well airlines can keep seat availability in line with demand -- and by doing so, avoid ruinous fare wars. Raymond James analyst Savanthi Syth predicts that domestic seat capacity will rise less than 3 percent a year through 2016, a level that is below anticipated U.S. economic growth. "We expect capacity discipline to be used to push through fare increases," she says.

Airlines have another good reason to restrain spending, Syth says: They've promised to return more capital to investors. American and United both surprised Wall Street in July by committing to big stock buybacks.

A trio of enticing airline stocks

But even if airlines can avoid the urge to overexpand, they remain subject to a host of risks beyond their control. These include fuel prices, consumer and business spending, and terrorist attacks. The industry's history of enormous losses explains why shares typically trade at low price-to-earnings (P/E) ratios. But bulls say P/Es will rise if investors believe the industry's turnaround has staying power.

Which stocks look most attractive? UBS analyst Darryl Genovesi calls Atlanta-based Delta "the purest play on overall industry improvement." He thinks Delta could earn close to $5 a share in 2015, up from an estimated $3.24 this year. What's more, Delta has "the most flexibility to take out capacity if demand disappoints or fuel spikes higher," he says. At $37, the stock sells for 10 times estimated year-ahead earnings (all prices are through July 31).

Dallas-based Southwest is the top pick of analyst Helane Becker, of Cowen & Co. "The outlook remains quite strong, especially on the cost side," she says. The carrier is also expanding in select markets: It's now flying to the Caribbean, its first international flights.

At $28, the stock sells for 15 times estimated year-ahead earnings. With profits expected to rise 55 percent this year and 16 percent in 2015, the shares look reasonably priced. One note of caution: The company faces tough contract talks with its unions.

Alaska Air Group (ALK) faces increasing competitive pressures in its Seattle hub from Delta's expansion there. But Raymond James's Syth thinks Alaska is a relative bargain with the stock trading at $44, or 11 times estimated year-ahead earnings. Alaska has "a history of using its strong balance sheet and market position to successfully compete against larger, well-funded competitors," Syth says.

Click here to become a fan of MSN Money on Facebook

More from Kiplinger