Stocks higher in anticipation of a trade deal

Shares of technology companies lifted the U.S. stock market Wednesday as the tech-heavy Nasdaq Composite and broader S&P 500 index closed at record highs -- for the fourth day in a row.

The day’s gains reflected optimism that Canada will join the U.S. and Mexico in a trade deal. Talks were underway in Washington, D.C.

Shares also rose on unexpectedly robust economic news: The government said that second-quarter GDP was revised to 4.2 percent versus the initial 4.1 percent. Analysts had expected no change. June pending home sales index increased 0.9 percent, versus expectations for an unchanged reading. Of note, June 2018 pending home sales were down 2.5 percent year-over-year.

The Nasdaq surged nearly 1 percent to a record 8,109.69, while the S&P 500 index of large capitalization companies jumped to a record 2,914.04.

Ticker Security Last Change Change %
I:DJI DOW JONES AVERAGES 37986.4 +211.02 +0.56%
SP500 S&P 500 4967.23 -43.89 -0.88%
I:COMP NASDAQ COMPOSITE INDEX 15282.009722 -319.49 -2.05%

In commodities, oil jumped to $69.72, a three-week high, as the Energy Information Administration reported that the nation’s crude oil inventories fell by 2.6 million barrels for the week ended Friday.

On Tuesday, the S&P 500 and Nasdaq edged higher to new record highs on Tuesday, with the Nasdaq posting an all-time closing high for the third-straight session. The S&P 500 also briefly hit 2,900 for the first time during intraday trading. The Dow also finished fractionally higher.

FOX Business’ Ken Martin and Leia Klingel contributed to this article.