(Bloomberg) -- Stocks failed to hold onto gains, with a gloomy forecast from Nvidia Corp. weighing on technology shares and traders awaiting inflation data for clues on the pace of Federal Reserve rate hikes.

The S&P 500 erased a rally that reached 1% earlier in the day, while the Nasdaq 100 underperformed after an advance that briefly drove the tech-heavy gauge 20% above its June low. Nvidia tumbled almost 6.5%, dragging down chipmakers. Treasuries climbed.

Mounting risks to growth have sparked earnings downgrades, with prominent Wall Street voices warning that cuts are only set to ramp up after gross domestic product shrank for a second straight quarter. Meantime, Friday’s blowout jobs report spurred JPMorgan Chase & Co. and Evercore ISI to say bigger rate hikes are in store this year while Citigroup Inc. sees a risk of a 1 percentage-point boost in September.

“The economy still has to digest all this tightening, and that will materially slow things,” wrote Tom Essaye, a former Merrill Lynch trader who founded The Sevens Report newsletter. “That hasn’t even really started to occur yet, so celebrating the resilience of earnings and economic data when we’re still in an expanding economy (regardless of the GDP prints) seems to be the equivalent of a coach declaring victory because the game plan should work.”

Investors should modestly trim stock holdings and shift the money to commodities after equities outpaced other assets amid receding recession fears, according to JPMorgan strategists led by Marko Kolanovic. That doesn’t mean they expect stocks will fall. In fact, they see equities rising through year-end, bolstered by robust corporate earnings.

Morgan Stanley’s Mike Wilson, who correctly predicted this year’s equity selloff, called the recent rebound a “bear-market rally” amid growing fears of a recession. While he believes inflation has peaked and “will probably fall faster than the market currently expects,” that still doesn’t bode well for stocks as it’ll reduce operating leverage and weigh on earnings, he said.

As equities climbed last week, global hedge funds unwound risky bets -- highlighting a sentiment gap between professional speculators displaying a risk-off mood and price action in the stock market.

“Countertrend rallies are characteristic of secular bear-market downtrends, and from that perspective, 2022 has been remarkably similar to previous bear markets in history,” said Seema Shah, chief global strategist at Principal Global Investors. “Until inflation abates and the Federal Reserve rebalances its priorities away from inflation and toward growth, tempting rallies are likely to remain unsustainable.”

Consumer expectations for US inflation over the coming years declined sharply in the latest survey by the Fed Bank of New York, with a recent drop in gasoline prices playing a big part in those results and likely contributing to a lower headline rate of inflation for July when the Labor Department releases the data on Wednesday. Still, almost all inflation measures are running well above the Fed’s 2% target.

In other corporate news, Tesla Inc. joined gains in electric-vehicle firms after the US Senate passed a key tax, climate and health-care bill. Retail traders who lurk in forums like Reddit’s WallStreetBets are back to betting against Wall Street pros as rallies for meme stocks like Bed Bath & Beyond Inc. and AMC Entertainment Holdings Inc. show shades of last year’s mania.

What to watch this week:

  • US CPI data, Wednesday
  • Chicago Fed President Charles Evans and his Minneapolis counterpart Neel Kashkari due to speak, Wednesday
  • US PPI, initial jobless claims, Thursday
  • San Francisco Fed President Mary Daly is interviewed on Bloomberg Television, Thursday
  • Euro-area industrial production, Friday
  • US University of Michigan consumer sentiment, Friday

Some of the main moves in markets:

Stocks

  • The S&P 500 fell 0.1% as of 4 p.m. New York time
  • The Nasdaq 100 fell 0.4%
  • The Dow Jones Industrial Average was little changed
  • The MSCI World index rose 0.1%

Currencies

  • The Bloomberg Dollar Spot Index fell 0.2%
  • The euro rose 0.1% to $1.0194
  • The British pound was little changed at $1.2081
  • The Japanese yen was little changed at 135.06 per dollar

Bonds

  • The yield on 10-year Treasuries declined seven basis points to 2.76%
  • Germany’s 10-year yield declined six basis points to 0.90%
  • Britain’s 10-year yield declined 10 basis points to 1.95%

Commodities

  • West Texas Intermediate crude rose 1.7% to $90.54 a barrel
  • Gold futures rose 0.8% to $1,805.40 an ounce

©2022 Bloomberg L.P.