Canada’s ⁠main ​stock index rose to a record high on Wednesday as higher commodity prices boosted energy and metal mining shares. Wall Street edged lower, with investors awaiting key earnings reports to gauge the health of a market rally fed by enthusiasm for artificial intelligence.

After months of gains that lifted the major U.S. indexes from their March lows, momentum has been wobbling with uneven trading in heavyweight semiconductor stocks and weakness in software companies. The Philadelphia SE Semiconductor index ended up 0.4%, recovering from early losses for its third straight session of gains after three days of losses that ​had confirmed it was in a bear market late last week.

Second-quarter results arrived after the closing bell from Alphabet and Tesla, the first of the so-called “Magnificent Seven” megacap companies to report. Investors were hoping for fresh evidence that these companies’ multibillion-dollar investments in AI are paying off.

“Investors have become a lot more discerning and specific as to where they’re choosing to invest in the AI trade,” said Kevin Gordon, head of macro research and strategy at Charles Schwab, noting the stark difference in performance between software and chip stocks on the day.

The Dow Jones Industrial Average fell 6.06 ‌points, or 0.01%, to ​52,218.58, the S&P 500 lost 10.24 points, ‌or 0.14%, to 7,498.96 and the Nasdaq Composite lost 146.30 points, or 0.57%, to 25,690.90.

Trading was choppy in the post market in Alphabet, which closed down 1.5%. It will be ​under scrutiny after a delay in the launch of a model central to its ⁠AI ambitions.

Texas Instruments lost ground in extended trading after finishing the regular session up 1% before it issued its results ⁠and forecast current quarter revenue above expectations.

After closing the regular session down 1.3%, Tesla added to losses in late trade, falling 3% after it reported negative free cash flow in the ​second quarter for the first time in more than two years.

The crowded earnings calendar leaves markets vulnerable to sharper swings this week, while geopolitical tensions added another layer of caution.

Crude oil futures recorded their highest settlement since June 11, up around 3% on the day as Yemen’s Iran-backed Houthi militia threatened shipping in the Red Sea, one of the world’s most important energy chokepoints along with the Strait of Hormuz. U.S. President Donald Trump vowed on Wednesday to destroy an Iranian bridge or power plant every time ⁠Iran shoots at a ship in the strait.

“Excluding the megacap AI trade, there’s an element of what’s going on with oil that’s driving the market,” said Schwab’s Gordon, noting that high oil prices are fanning inflation worries. “People are being defensive with utilities, but with energy and materials being higher, that’s the inflation component.”

The S&P/TSX Composite Index ended ‌up 116.03 points, or 0.3%, at 35,485.11, moving past the July 15 record closing high.

The materials group, which includes ​metal mining shares, advanced 2.4%. Gold rose 1.3%, buoyed by a softer U.S. dollar and technical buying.

NovaGold Resources Inc said it would acquire the shares it does not already own in Donlin Gold from Paulson Advisors in an all-stock ⁠deal that would create a gold producer worth $4.2 billion. Shares of the precious metals company were up 10.1%.

Panama is considering creating a state-owned mining firm to partner with First Quantum Minerals Ltd on the re-opening of the shuttered flagship Cobre Panama copper ⁠mine, two people familiar with the development told ​Reuters. First Quantum’s shares were down 1%.

Energy stocks added 1.3% in Toronto.

Six of the ​TSX’s 10 major sectors ended lower, including technology. It lost 2.5% ahead of earnings from U.S. big technology companies after the closing bell, with shares of Descartes Systems Group down ​4%.

The Federal Reserve is expected to keep interest rates steady for the rest of 2026, according to the median forecast in a Reuters poll of economists. Still, respondents said the risk of a rate hike remained elevated. Traders are pricing in a roughly 66% chance the Fed leaves rates unchanged ⁠at next week’s meeting, CME Group’s FedWatch tool showed.

Shares in Super Micro Computer rallied ​19.8%, making it the S&P 500’s biggest percentage gainer on the day, after the server maker said it had secured more than $60 billion in new orders in ⁠the fourth quarter.

Among its peers, Dell Technologies finished up 9.3% while Hewlett Packard Enterprise added 3% after Super Micro reported upbeat preliminary results.

Among other movers, AT&T advanced 3.5% after the telecom firm added more ‌wireless subscribers than expected in the second quarter.

Philip Morris International shares rose 3.3% after stronger cigarette demand helped the company beat quarterly results estimates.

Declining issues outnumbered ​advancers by a 1.26-to-1 ratio on the NYSE where there were 142 new highs and 161 new lows. On the Nasdaq, 1,665 stocks rose and 3,103 fell as declining issues outnumbered advancers by a 1.86-to-1 ratio. The S&P 500 posted 14 new 52-week highs and 2 new lows while the Nasdaq Composite recorded 45 new highs and 104 new lows. On U.S. exchanges, trading volume was relatively light ​with 15.16 billion shares changing hands compared with the 19.05 billion moving average for the last 20 sessions.

Reuters, Globe staff

Follow related authors and topics

Authors and topics you follow will be added to your personal news feed in Following.

Interact with The Globe