Traders work on the floor of the New York Stock Exchange (NYSE) in New York City, U.S., January 26, 2022.
Traders work on the floor of the New York Stock Exchange (NYSE) in New York City, U.S., January 26, 2022. Reuters / BRENDAN MCDERMID

U.S. stocks rallied in afternoon trading Tuesday, led by a more than 2% jump in the Nasdaq and gains in big growth shares after the previous day's sharp selloff.

But the day's trading was choppy, with major indexes moving between gains and losses as investors were nervous ahead of U.S. consumer price index data due Wednesday.

Worries that the Federal Reserve may have to move more aggressively to curb inflation have driven the recent selloff in the market. A host of other concerns have added to the pressure.

"At this point, it's just fear-based selling," said Jake Dollarhide, chief executive officer of Longbow Asset Management in Tulsa, Oklahoma.

"It can't just be the Fed's going to raise rates to stave off inflation, because we've seen that before," he said. Instead, investors are worried about everything from rates and inflation to the war in Ukraine, supply chain problems and China's COVID-19 lockdowns, Dollarhide said.

Shares of Apple Inc were up about 3% in afternoon trading, giving the biggest boost to the S&P 500 and Nasdaq. S&P 500 technology led gains among sectors in the S&P 500.

The Dow Jones Industrial Average rose 151.68 points, or 0.47%, to 32,397.38, the S&P 500 gained 45.51 points, or 1.14%, to 4,036.75 and the Nasdaq Composite added 251.01 points, or 2.16%, to 11,874.26.

Investors also digested comments from Cleveland Fed President Loretta Mester, who said the U.S. economy will experience turbulence from the Fed's efforts to bring down inflation running at more than three times above its goal and recent volatility in the stock market would not deter policymakers.

U.S. President Joe Biden said on Tuesday that he understands what they are grappling with and that he and the U.S. Federal Reserve are working to solve the top issue weighing on his administration.

Peloton Interactive Inc tumbled about 6% as the fitness equipment maker warned the business was "thinly capitalized" after it posted a 23.6% slide in quarterly revenue.

Declining issues outnumbered advancing ones on the NYSE by a 1.11-to-1 ratio; on Nasdaq, a 1.01-to-1 ratio favored advancers.

The S&P 500 posted 1 new 52-week highs and 63 new lows; the Nasdaq Composite recorded 18 new highs and 1,026 new lows.