Wall Street extended its rally on Wednesday, with the S&P 500 and the Nasdaq hitting record highs for the fourth straight session as technology companies pushed indexes higher and promising trade negotiations stoked investor sentiment.
Apple Inc led the technology sector's advance, and the iPhone maker's shares hit an all-time closing high at $222.98.
The FAANG stocks, Facebook, Apple, Amazon, Netflix and Alphabet’s Google, also got a boost from Morgan Stanley's price target increases for Amazon.com and Alphabet Inc.
Amazon's stock gained 3.4 percent, leading the consumer discretionary sector's advance, as the company edged closer to becoming the second US company, after Apple, to reach $1 trillion in market value.
The remaining FAANG stocks, Facebook Inc and Netflix Inc, closed slightly lower.
Canada appeared to be taking a more conciliatory approach to its ongoing talks with the United States aimed at salvaging the trilateral North American Free Trade Agreement (NAFTA), days after Washington said it had struck a deal with Mexico.
"The trade situation is adding to the rally as opposed to being a headwind as it's been for the past couple of months," said Bucky Hellwig, senior vice president at BB&T Wealth Management in Birmingham, Alabama.
As the summer nears its end, light trading volume that sometimes plagues the market seems to have worked in its favour.
"Historically, light volume in August has generally contributed to a weak month in terms of performance," Hellwig said. "But favourable fundamentals in the last couple of weeks have reversed that pattern."
Among the economic fundamentals, the Commerce Department released its second reading of second-quarter GDP, showing the US economy grew at an upwardly-revised annual rate of 4.2 percent in the quarter, its best performance in nearly four years.
The Dow Jones Industrial Average rose 60.55 points, or 0.23 percent, to 26,124.57, the S&P 500 gained 16.52 points, or 0.57 percent, to 2,914.04 and the Nasdaq Composite added 79.65 points, or 0.99 percent, to 8,109.69.
Eight of the 11 major sectors of the S&P 500 ended the session in positive territory, with the largest percentage gains coming from the consumer discretionary and technology sectors.
Restaurant operator Yum China Holdings Inc extended its rally, and was up 5.5 percent after rejecting a $17.6 billion buy-out bid from a Chinese consortium.
Among losers, Dick's Sporting Goods Inc fell 2.2 percent following an underwhelming earnings report, a drop in same-store sales driven by tighter gun controls and a decline in Under Armour sales.
Shares of American Eagle Outfitters Inc dropped 6.5 percent after posting disappointing second quarter results and providing a lacklustre forecast.
Advancing issues outnumbered declining ones on the NYSE by a 1.60-to-1 ratio; on Nasdaq, a 1.55-to-1 ratio favoured advancers.
The S&P 500 posted 61 new 52-week highs and 1 new low; the Nasdaq Composite recorded 112 new highs and 24 new lows.Volume on US exchanges was 5.63 billion shares, compared to the 6.12 billion average over the last 20 trading days.