By Will Horner and Paul Vigna

U.S. stocks finished mixed Wednesday as investors took a breather with major indexes at or near record highs.

The major stock indexes drifted in and out of positive territory all day. OIn the end, the Dow Jones Industrial Average set a new record high, while the S&P 500 and Nasdaq Composite slipped below their record levels.

The Dow Jones Industrial Average rose 61.97 points, or 0.2%, to 31437.80, eclipsing the record it set Monday. The S&P 500, which set a record high on Monday, slipped 1.35 points, less than 0.1%, to 3909.88, and the Nasdaq Composite lost 35.16 points, or 0.25%, to 13972.53. The Nasdaq set another record high, its 10th this year, on Tuesday.

The small-cap Russell 2000 fell 16.6 points, or 0.7%, to 2282.44. The index is still up almost 16% for the year, far outpacing the three main large-cap indexes.

Despite sitting in record territory, large-cap stocks don't appear to be overbought, said Frank Cappelleri, executive director at the brokerage Instinet, so he doesn't think a big selloff is likely. The market might, however, could be in for a period of range-bound trading. "We're due for some sort of pause," he said.

Still, investors are looking ahead, betting that President Biden's $1.9 trillion stimulus package will help bolster the economy while vaccinations help reduce Covid-19 fatalities. Investor sentiment has been buoyed by companies' quarterly results that have largely proved to be better than expected.

"As long as earnings estimates are going up, stocks are going up," said Andrew Slimmon, a managing director at Morgan Stanley Investment Management. "The magnitude of the earnings beats we have seen are so great because earnings have been way underestimated."

With nearly 70% of the S&P 500 already reporting fourth-quarter earnings, profits for the group are up 5.1%, better than an expected contraction of 9.2%, according to FactSet. That is also a vast improvement from the third quarter's 5.6% profit contraction. First-quarter earnings are expected to rise 21%.

Among big-name stocks, ride-hailing firm Lyft rose $2.57, or 4.8%, to $56.21 after posting a narrower annual loss, suggesting the company is moving toward profitability. Rival Uber Technologies slipped slightly in after-hours trading. The company said it posted a narrower annual loss on the back of its food-delivery business and aggressive cost cuts, even though the coronavirus pandemic crushed its core ride-hailing operations.

Twitter jumped $7.90, or 13%, to $67.77 after the social-media company said late Tuesday that it added users through the holiday period.

Coca-Cola slipped $0.10, or 0.2%, to $49.60 after the soda giant said early Wednesday that it expects its 2021 organic revenue to grow by a high-single-digit percentage.

Cisco Systems, considered a proxy for corporate high-tech hardware demand, fell $1.26, or 2.6%, to $47.24 after its fiscal second-quarter revenue and profit declined.

Shares of Oracle slipped $0.40, or 0.6%, to $63.27, and Walmart fell $1.70, or 1.2%, to $144.13. The Wall Street Journal reported that a U.S. plan to force the sale of TikTok's American operations to a group including the two companies had been shelved indefinitely by the Biden administration.

The equities market has been on a historic tear since the fall, and some kind of correction soon should be expected, said Katerina Simonetti, senior vice president at Morgan Stanley Private Wealth Management.

A correction would be a good thing overall, she said, by working off some of the speculative excesses the market has seen lately. "If it doesn't happen, if we continue to see growth, the type of correction from that will be more extensive," she said.

U.S. inflation data, an important indicator of the health of the economy, showed consumer prices posted slow and steady gains for January.

Still, rebounding consumer demand and another sizable stimulus package could make inflation rise steeply, or push the fiscal deficit too high, said Altaf Kassam, head of investment strategy for State Street Global Advisors in Europe.

Investors would like to see a big relief package, Mr. Kassam said. The challenge, he said, is "whether you can have too much of a good thing."

The Federal Reserve, however, isn't likely to raise interest rates any time soon. Chairman Jerome Powell on Wednesday stressed that the labor market remains stunted by the pandemic and said that the U.S. central bank will continue supporting the economy through low interest rates and hefty asset purchases.

U.S. Treasury yields, which move inversely to the price, ticked down to 1.133% after settling at 1.156% on Tuesday.

Overseas, the Stoxx Europe 600 fell 0.2% to 409.47.

In China, the Shanghai Composite advanced 1.4% to 3655.09 to close at its highest level since August 2015. This was its last trading day before the Lunar New Year holidays. Distiller Kweichow Moutai, the biggest stock in the index, leapt 5.9% to a record closing high.

Optimism about China's economy, rising corporate earnings, and global vaccine rollouts have helped lift market sentiment recently, said Wei Wei Chua, a portfolio manager at Mirae Asset Global Investments.

A rush of new mutual-fund launches, plus an increase in individual investors buying stocks through mobile apps, had also injected fresh money into the market, Mr. Chua added. "It is a positive feedback loop and people don't really want to miss out when the markets are doing well, " he said.

Hong Kong's Hang Seng Index rose 1.9% to 30038.72 by the close of trading, while Japan's Nikkei 225 gained 0.2% to 29562.93.

--Joanne Chiu contributed to this article.

Write to Will Horner at William.Horner@wsj.com and Paul Vigna at paul.vigna@wsj.com

(END) Dow Jones Newswires

02-10-21 1731ET