When the COVID-19 pandemic hit the U.S. early last year, investors didn't know what to do. The major stock indices swung wildly for a while, with nearly 10% moves in either direction briefly becoming the norm.

It didn't take long for the stock market to bottom out and turn into a veritable bonanza. The S&P 500 has soared about 75% since then,  and there are plenty of stocks that have doubled, tripled, or quadrupled.

Pricey growth stocks, particularly those with narratives that meshed well with the changes the pandemic brought, have done very well over the past year. Videoconferencing software company Zoom and exercise equipment company Peloton were a couple big winners, although the massive gains for those stocks are now starting to come under some pressure.

An airplane.

Image source: Getty Images.

Value investing worked during the pandemic

Paying through the nose for growth stocks wasn't the only way to beat the market during the pandemic. About a year ago, I wrote about my decision to invest in Spirit Airlines (SAVE -2.90%) after the stock crashed over pandemic fears. That crash was certainly warranted -- airline passenger traffic had already dropped, and there was a huge amount of uncertainty about how long a recovery would take and about whether airlines would be able to remain solvent.

Things got much worse for the airline industry than I expected. I said that "the potential for a 70% decline in domestic demand in the coming months is within the realm of possibility." In reality, passenger traffic going through TSA checkpoints was down around 95% by early April last year, and it's still down about 40% from 2019 levels today.

Despite the complete collapse in demand and a slow recovery, shares of Spirit have trounced the S&P 500. The stock has soared more than 300% from its pandemic low, and it's still down substantially from its pre-pandemic level.

Spirit has also greatly outperformed other airline stocks. Shares of United Airlines are up about 170% since March 18 of last year, and shares of Southwest Airlines are up just 76% since that date.

Of course, I didn't know for sure that my Spirit investment would work out well. I figured that airlines would eventually recover, and that Spirit's minimal international exposure and decent balance sheet would see it through the pandemic. I passed on other airlines with heavier debt loads because I wasn't sure they'd survive.

The pandemic isn't over, and Spirit's revenue is still deeply depressed. A slower-than-expected post-pandemic recovery could certainly undo the stock's gains. But I think the stock is still a reasonable idea even after its massive gain, so I'm holding on for now.

Many ways to invest

Investors who bought growth stocks like Zoom last year did so because they expected the company to do well; I bought Spirit knowing full well that the company's results would be a disaster. Both strategies worked.

In normal times, I would have probably never even considered investing in an airline. As I said last year, "I've never invested in an airline before, and I don't particularly like the industry." But Spirit stock was so beaten down that the company only really needed to survive for the investment to work out. The market overshot to the downside, and the result was a market-beating gain.

Growth stocks are now coming under pressure as interest rates rise and the economy recovers from the pandemic. My guess is that buying shares of companies that are growing fast without regard for the price you're paying won't continue to work like it did last year. While careful value investing paid off during the pandemic, it could work out even better in the post-pandemic world as pricey growth stocks fall out of favor.