Virgin America's (VA) debut as a public company last fall was met with huge enthusiasm. The chic airline completed its IPO at $23 in mid-November. By the end of the year, the stock had nearly doubled, to $45. It then proceeded to give back most of its gains during the following six months, bottoming around $27 in early July.

VA Chart

Virgin America Stock Chart, data by YCharts.

Since then, Virgin America has gotten back on track, rallying a stunning 35% in the past month. Investors can thank a strong Q2 earnings report for much of those gains. Most importantly, the outlook for the rest of the year and 2016 looks quite good.

Solid unit revenue performance
In late April, Virgin America had projected that passenger unit revenue, or PRASM, would decline by 0%-2% in Q2. Instead, PRASM ultimately rose 0.5% year over year last quarter. This helped Virgin America record adjusted EPS of $1.46, well ahead of the average analyst estimate of $1.25.

Virgin America did receive an unexpected 0.9 percentage point unit revenue benefit from an adjustment in frequent-flier revenue. Without that, PRASM would have fallen 0.4%. Even so, this was a solid performance. Most of Virgin America's peers offered much weaker revenue guidance in April -- and many of them then fell short of those weak forecasts.

Virgin America's solid PRASM performance was particularly notable because it faced rapid industry capacity growth in two key markets: Dallas and New York.

For example, industry capacity was up more than 30% year over year in the markets Virgin America serves from Dallas. This drove a 17% year-over-year decline in unit revenue. Industry capacity growth was more moderate at New York's JFK Airport, but still enough to cause an 8% unit revenue decline for Virgin America there.

Virgin America has had to contend with rapid industry capacity growth in Dallas and New York this year. Photo: Virgin America.

To offset these two pockets of weakness, Virgin America posted a 5% PRASM gain across the rest of its network. That speaks to the fundamental strength of Virgin America's business model and route network.

Dallas and New York will turn the corner soon
In its Q2 earnings release, Virgin America projected that PRASM will decline 2%-4% in Q3. The company appears to expect the tough trends in Dallas and New York to continue, while the 5% unit revenue growth across the rest of Virgin America's network is unsustainable in the current market environment.

However, Virgin America is likely to turn the corner in Q4. First, during that period, Virgin America will lap the introduction of new service in Dallas during 2014. Given how steep the unit revenue declines have been in the Dallas market, Virgin America will face much easier comparisons in Q4 and throughout 2016.

Second, results in New York are likely to get much better beginning in Q4 thanks to United Continental's decision to stop flying to JFK Airport in October. This will remove one of Virgin America's top rivals on the highly competitive routes from JFK to Los Angeles and San Francisco. It will also reverse some of the recent industry capacity growth on those routes.

Improving revenue trends will drive solid earnings
Wall Street airline analysts were surprised that Virgin America expects its unit revenue trends to improve in Q4 because the company's growth starts to ramp up again at that time. Normally, capacity growth is assumed to have a dampening effect on unit revenue.

However, Virgin America believes it will post strong performance out of the gate on its new routes from San Francisco to Hawaii, especially during the holiday peak. Meanwhile, the rest of the new planes coming in 2015 will be used to replace flights that were cut last fall to free up planes for Virgin America's new Dallas service, and for which there is proven demand.

Furthermore, Virgin America is just starting to roll out some new IT tools that will allow it to hone pricing and increase the distribution of various ancillary products. This should help it drive non-ticket revenue growth, primarily in Q4 and beyond.

If Virgin America can just hold the line on unit revenue in Q4 and in 2016, it will be poised for strong profit growth as capacity growth accelerates, and unit costs start to decline. Based on Virgin America's strong Q2 performance, easing competitive pressure in Dallas and New York, and the new tools for boosting ancillary revenue, this goal seems well within reach.