After a long run of consistent strong performance, shares of Spirit Airlines (SAVE -1.95%) and Allegiant Travel (ALGT 0.83%) have faltered in the past two years. The budget carriers -- once thought to be relatively immune to industry pricing trends -- were hit hard by the recent airline industry fare wars.

However, both stocks bounced back in a big way during November, according to data from S&P Global Market Intelligence. Spirit Airlines stock gained 16% during the month, while Allegiant Travel shares soared 18.5%.

SAVE Chart

Spirit Airlines and Allegiant Travel November Stock Performance data by YCharts.

Thanks, Mr. Trump!

Spirit Airlines and Allegiant Travel can trace most of their November stock gains to Donald Trump's unexpected victory in the U.S. presidential election last month. Indeed, both stocks rallied about 10% in the week after the election.

As ultra-low cost carriers, Spirit Airlines and Allegiant Travel target the most price-sensitive travelers. They lure people who can't easily afford to fly on major carriers by offering extremely low base fares while charging extra for optional services like advance seat selection, carry-on and checked baggage, and drinks.

Trump campaigned on a platform of keeping blue-collar jobs in America and driving faster economic growth. Spirit and Allegiant are uniquely positioned to benefit if Trump delivers on these promises, as their core customers would be able to travel more often.

Additionally, Trump has vowed to reduce the corporate tax rate from 35% to as little as 15%. Since Spirit and Allegiant both pay corporate taxes at around the statutory rate -- unlike most companies, which use various tax avoidance strategies to reduce their tax burdens -- they would be big beneficiaries of a permanent reduction in the corporate tax rate.

Getting votes of confidence

While the election was a major catalyst for shares of Spirit and Allegiant, they also benefited from some positive commentary by analysts and pundits.

First, Warren Buffett's Berkshire Hathaway revealed that it had invested in several airlines over the past few months. Neither Spirit nor Allegiant was on Buffett's shopping list, but the Oracle of Omaha's surprising reversal of his long-standing distaste for airline stocks bolstered investor sentiment about the airline sector more broadly.

Second, in mid-November, prominent financial publication Barron's reiterated its bullish case for Spirit Airlines stock, arguing that it could soon reach $64.

Spirit Airlines benefited from upbeat analyst commentary last month. Image source: Spirit Airlines.

A few days later, analysts at Imperial Capital named both Spirit Airlines and Allegiant Travel "top picks" within the airline sector. The analysts raised their price target for Spirit from $58 to $68 and their price target for Allegiant from $160 to $196.

Demand seems to be improving

Unit revenue is still declining at most airlines, but signs are starting to point toward a rebound in fares. Earlier this week, Allegiant lifted its fourth quarter unit revenue guidance range by more than 1 percentage point at the midpoint.

Spirit Airlines typically doesn't update its guidance during the quarter. However, in the past week, several other airlines have also reported strengthening demand. Close-in bookings have improved dramatically since the election, buoyed by rising consumer confidence.

Spirit Airlines and Allegiant Travel have enormous long-term growth opportunities, as their low cost structures allow them to undercut rivals' fares while still earning high margins. If air travel demand continues to rebound in the coming months and years, shares of both ultra-low cost carriers could continue to rise.