(AP) -- Stocks eked out modest gains Wednesday, keeping the major stock indexes on Wall Street at or near record highs.
The S&P 500 inched up 0.1%, recovering some of its losses from a day earlier. It's hovering within 0.1% of the record high it set on Monday. The Dow Jones Industrial Average closed just above its own all-time high from Monday.
Energy and materials companies led the gains. Industrial and financial stocks also had a strong showing. Communication services stocks fell the most. Roughly 73% of stocks in the S&P 500 rose. Treasury yields mostly fell.
Small-company stocks again outpaced their larger rivals, a sign that investors are feeling more optimistic about the economy.
Stocks have been mostly grinding higher in recent weeks, with indexes setting new highs, amid optimism that coronavirus vaccinations will pave the way in coming months for the economy to escape from the pandemic's grip.
"This is overall a market that's setting the stage for 2021 and looking at an economy that is going to normalize, albeit at a probably slower pace than initially projected," said Quincy Krosby, chief market strategist at Prudential Financial.
The S&P 500 index rose 5 points to 3,732.04. The Dow gained 73.89 points, or 0.2%, to 30,409.56. The Nasdaq composite picked up 19.78 points, or 0.2%, to 12,870. The Russell 2000 index of smaller companies climbed 20.63 points, or 1.1%, to 1,979.99.
Ahead of the final day of trading in 2020, the S&P 500 is up 15.5% this year, while the Nasdaq is up 43.4%.
The modest gains came as the effort to develop and distribute vaccines to fight the virus pandemic intensifies. Britain has authorized the use of a COVID-19 vaccine developed by AstraZeneca and Oxford University. The vaccine is considered easier to store and handle than others hitting the market. Earlier in December, both the U.K. and U.S. approved a vaccine made by Pfizer.
Meanwhile, vaccine development continues around the globe, with China's Sinopharm becoming the latest to release encouraging study results.
Investors are optimistic about more vaccines gaining approval and reaching the market in coming weeks, though the potential for problems with their distribution remains a concern, said Ryan Detrick, chief market strategist for LPL Financial.
"The hiccups are the actual rollout," he said. "Approving them is one thing, but getting them out and into people's arms is another thing."
Treasury yields were mostly lower. The yield on the 10-year Treasury slipped to 0.92% from 0.93% late Tuesday.
Stock markets in Europe closed lower after European Union officials and British lawmakers approved a separation deal that will govern trade and other relations after the year ends. The U.K. left the EU almost a year ago, but remained within the bloc's economic embrace during a transition period that ends this year.
Britain's FTSE 100 fell 0.7% and Germany's DAX slipped 0.3%. The CAC 40 in Paris dropped 0.2%.
Markets in Asia closed mostly higher, though Japan's Nikkei fell 0.5% as the Tokyo exchange marked the end of trading for the year.
Traders in cryptocurrencies continued to push up the price of bitcoin, which has more than doubled the past three months. It rose 5.4% to $28,635, according to the tracking site CoinDesk. Bitcoin futures on the Chicago Mercantile Exchange climbed 6.5% to $28,970. The futures allow investors to make bets on the future price of the digital currency.
Trading volume on Wall Street has been thin in the final week of 2020. The market will be closed for New Year's Day Friday.