(AP) -- Wall Street closed out a tumultuous year for stocks with more record highs Thursday, a fitting coda to the market's stunning comeback from its historic plunge in the early weeks of the coronavirus pandemic.
The benchmark S&P 500 index finished with a gain of 16.3% for the year, or a total return of about 18%, including dividends. The Nasdaq composite, powered by high-flying Big Tech stocks, soared 43.6%. The Dow Jones Industrial Average gained 7.2%, with Apple and Microsoft leading the way.
The market's milestone-setting finish follows a mostly upward grind for stocks in recent weeks, fueled by cautious optimism that the U.S. economy and corporate profits will bounce back in 2021 now that the distribution of COVID-19 vaccines is under way.
"We came into the year expecting slow growth and it turned out to be the fastest bear market recovery in history," said Sunitha Thomas, national portfolio advisor at Northern Trust Wealth Management.
The virus pandemic shocked markets early in the year. The S&P 500 fell 8.4% in February, then plunged 12.5% in March as the pandemic essentially froze the global economy. Businesses shut down in the face of the virus threat and tighter government restrictions. People shifted to working, shopping and doing pretty much everything else from home.
The dire economic situation weighed heavily on almost any company that relied on direct consumer spending or a physical presence, including airlines, restaurants, hotels and mall-based retailers.
Trading became volatile, especially in the early weeks of the pandemic, as investors scrambled amid an increasingly grim economic outlook. The Dow had several day-to-day swings of about 2,000 points. And the S&P 500 rose or fell by at least 1% on twice as many days in 2020 than it did, on average, since 1950.
The VIX, which measures how much volatility investors expect from the S&P 500, climbed to a record high 82.69 in March and remained above its historical average for much of the year.
The wave of selling accelerated as the economic fallout from the pandemic widened, leaving many long-term investors looking on as their gains after a blockbuster 2019 for stocks evaporated. Five months later, the market recouped all of its losses.
"It was probably very hard to imagine getting those back in such a short period of time," said Shawn Cruz, senior market strategist at TD Ameritrade.
Wall Street didn't stay down for long, thanks in large part to unprecedented actions from the Federal Reserve and Congress to support the economy. Investors flocked to big technology companies such as Apple and Amazon and smaller companies like Grubhub and Etsy that were poised to take advantage of the shift to working and shopping from home.
The S&P 500 jumped 12.7% in April. From there, markets disconnected from the rest of the still-reeling economy and pushed higher in fits and starts as vaccine development progressed and analysts and economists looked ahead to the eventual end of the pandemic.
Individual investors, sometimes referred to as retail investors on Wall Street, hopped onto the market rally via commission-free online trading platforms like Robinhood. Along the way, they helped power shares in companies like Tesla to new heights. The electric car maker jumped 743.4% in 2020 for the biggest gain in the S&P 500.
"Retail investors represented a larger portion of the market than they ever have," Cruz said. "It was retail and institutional investors all coming to the same conclusion about what was going to work and what wasn't going to work this year at the same time."
The market's turnaround was faster than anyone might have expected in March, when the S&P 500's nearly 11-year bull-market run ended. By August, the index had recovered all its losses and climbed to new highs. All told, the S&P 500 set 33 record highs in 2020.
"It was another reminder that unless you have a foolproof market timing technique the adage to remember is it's always better buy than bail," said Sam Stovall, chief investment strategist at CFRA.
The end of the virus and its pummeling of the economy seems even closer now that vaccine approval and distribution is ramping up. The U.S. and U.K. have both approved Pfizer's COVID-19 vaccine and Britain recently approved another vaccine from AstraZeneca and Oxford University. Meanwhile, the U.S. government has approved another round of aid for businesses and people dealing with another surge in the virus and tighter restrictions on businesses.
Thomas expects pent-up demand and high savings rates to help drive an economic recovery in 2021. Many of the more beaten-down stocks will benefit from a "vaccine-shaped" recovery as the number of vaccines on the market increases and distribution widens.
"We have more visibility that by midyear we start to be able to reopen the economy," she said.
The sharp run-up in stock prices relative to the outlook for earnings growth suggests stocks could be in for a correction, or drop of at least 10%, in 2021, Stovall said.
"There's a good possibility that we get a deep pullback -- pullbacks being 5%-10% -- or maybe a shallow correction," he said. "Enough to remind investors that share prices don't go up forever."
Markets were mostly quiet on the final day of trading for the year. Several overseas markets were closed for holidays, and U.S. markets will be closed for New Years Day on Friday.
The S&P 500 rose 24.03 points, or 0.6%, to 3,756.07, an all-time high. The Dow rose 196.92 points, or 0.7%, to 30,606.48, a record high. The Nasdaq rose 18.28 points, or 0.1%, to 12,888.28.
The Russell 2000 index of smaller companies fell 5.14 points, or 0.3%, to 1,974.86. Smaller companies notched strong gains in recent weeks after lagging in the early months of the broader market rebound. The Russell 2000 ended the year with a gain of 18.4%.
Trading was closed in Tokyo and South Korea as well as Germany. France's CAC 40 slipped 0.9% and Britain's FTSE 100 lost 1.5%.
The yield on the 10-year Treasury note rose to 0.92% from 0.91% late Wednesday.