NEW YORK - Technology stocks led the S&P 500 and the Nasdaq higher on Tuesday, with U.S. stocks reclaiming ground lost to Monday's steep sell-off as investors took heart from a tonal shift in ongoing U.S. trade negotiations with China.

All three major U.S. indexes were in the black, recovering some ground from their worst one-day percentage losses in months. The bellwether S&P 500 was hovering more than 3% below its most recent all-time high reached two weeks ago.

Investors' nerves were calmed after U.S. President Donald Trump referred to the escalating trade war with China as 'a little squabble,' adding that 'we have a good dialogue going.'

Beijing echoed that sentiment, with a Chinese Foreign Ministry spokesman telling reporters: 'My understanding is that China and the United States have agreed to continue pursuing relevant discussions.'

'Either this is a bargain-hunting rally or a dead cat bounce, or there is some consensus that something meaningful is going to come out of the trade talks in the next four to six weeks,' said Bucky Hellwig, senior vice president at BB&T Wealth Management in Birmingham, Alabama.

But Hellwig also feels the rollercoaster of the escalating trade war has had an effect on investor psychology.

'I'm starting to see some investors becoming anesthetized on the negotiations and focusing on what the market's going to look like a year from now,' Hellwig added.

First quarter earnings season is winding down, with 453 of S&P 500 companies having reported, 75.3% of which beat analyst expectations, slightly below the 76% beat rate for the last four quarters.

Advancing issues outnumbered declining ones on the NYSE by a 3.70-to-1 ratio; on Nasdaq, a 2.74-to-1 ratio favored advancers. The S&P 500 posted 23 new 52-week highs and 6 new lows; the Nasdaq Composite recorded 41 new highs and 79 new lows.