The Dow Jones Industrial Average index ended above 29,000 for the first time on Wednesday and the S&P 500 also closed at a record high after the US and China signed a Phase 1 trade agreement and pledged to resolve a tariff dispute that has roiled Wall Street for over a year.
The centrepiece of the truce is a pledge by China to purchase at least an additional $200 billion worth of US farm products and other goods and services over two years, over a baseline of $186 billion in purchases in 2017.
The trade agreement clears the way for investors to focus on upcoming quarterly earnings reports, including the outlooks companies provide in light of the deal.
"There's no question from a psychological viewpoint it's a big relief for the market," said Peter Cardillo, chief market economist at Spartan Capital Securities in New York.
"There are still CEOs that are dubious, but this might help capital investments, and that was the biggest missing link to the economy over the last few years."
US President Donald Trump said he would remove all US tariffs on Chinese imports as soon as the two countries complete a Phase 2 trade agreement, on which negotiations will start soon.
"I am sure as people dissect (the agreement), there is going to be criticism of it - it's not doing enough, or it's not doing this, or whatever But the market, had it not gotten signed... would have reacted negatively," said Chuck Carlson, chief executive of Horizon Investment Services in Hammond, Indiana.
The three main stock indices gave up earlier intraday record highs, with disappointing earnings reports from Bank of America pushing the S&P financial index down 0.55 per cent.
Bank of America Corp reported a better-than-expected quarterly profit, but warned of weak net interest income in the first half of 2020, knocking its shares down 1.8 per cent.
Goldman Sachs Group Inc slipped 0.2 per cent after reporting a bigger-than-expected fall in profit as it set aside more money to cover legal costs.
The Dow Jones Industrial Average rose 0.31 per cent to 29,030.22 points, ending above 29,000 for the first time.
The S&P 500 gained 0.19 per cent to 3,289.3, its highest close ever. The Nasdaq Composite added 0.08 per cent to 9,258.70, just short of its record high close set on Monday.
UnitedHealth Group Inc , the largest US health insurer, rose 2.8 per cent as it affirmed its full-year outlook for 2020 adjusted earnings.
The S&P healthcare index climbed 1.0 per cent.
Retailer Target Corp slumped 6.6 per cent after it missed its own expectations for 2019 holiday season sales following a drop in online growth and demand for toys and electronics.
Toymakers Mattel Inc and Hasbro Inc fell 4.6 per cent and 2.1 per cent, respectively, while electronics seller Best Buy dropped 1.7 per cent.
Advancing issues outnumbered declining ones on the NYSE by a 1.35-to-1 ratio. On Nasdaq, a 1.31-to-1 ratio favoured advancers. The S&P 500 posted 74 new 52-week highs and no new lows; the Nasdaq Composite recorded 151 new highs and 20 new lows Volume on US exchanges was 7.3 billion shares, compared with an average of 7.0 billion shares over the last 20 trading days.