Canada’s main stock index slightly added to its quarterly gain on Tuesday, ⁠as ​financial and technology shares rose and after domestic data showed the economy expanding faster than expected in April.

The S&P/TSX Composite Index ended up 33.17 points, or 0.1%, at 34,856.99. Major U.S. indexes also added to recent gains.

For the second ​quarter, the Canadian index was up 6.4%, marking ‌its eighth straight quarterly advance, the longest such stretch since 1996. Still, it lagged the 14.9% gain for the S&P 500, the U.S. benchmark.

“The Canadian market, for the most part, has been largely earnings driven,” said Angelo Kourkafas, ‌senior global investment ​strategist at Edward Jones ‌Investments. “It has lagged U.S. and some other indices because of ​its commodities tilt. But markets are ready to ⁠enter a new quarter from a solid footing.”

Financials, health ⁠care and technology led the TSX’s quarterly advance, while the materials group and energy posted declines.

Canada’s gross domestic product increased 0.5% in April from March, marking the largest monthly expansion in nine months and allaying concerns that a tariff-led slowdown in the economy was getting more entrenched.

The U.S. was expected ⁠to formally declare on Wednesday that it will not extend the U.S.-Mexico-Canada Agreement on trade, starting a decade-long clock to wind down the 32-year-old North American free trade zone as the three countries haggle over proposed changes.

Technology in Toronto rose 0.9% on Tuesday, led by a gain ⁠of 6.2% for the shares of electronic equipment ​company Celestica Inc. Heavily weighted financials added 0.8%, while the materials group ⁠was up 0.6% as copper prices rose.

The price of oil settled 1.8% lower at US$69.50 ‌a barrel and has given up nearly all of its advance since the start ​of the U.S.-Iran war at the end of February. The energy sector in Toronto dipped 0.2% and consumer staples ended 1.1% lower.

The TSX is set to be closed on Wednesday for Canada Day but U.S markets will be open.

The S&P 500 and Nasdaq finished June with their biggest quarterly gains since 2020 as investors remained upbeat about economic and earnings growth even amid ⁠the Middle ​East conflict. The Dow had its biggest quarterly jump since 2022.

The indexes ended higher for the day as well, with the Dow registering a record closing high for the second straight day. Technology led gains among S&P 500 sectors, and an index of semiconductor stocks finished 3.9% higher on the day. Optimism over ​signs of progress in efforts to bring the Iran war to ‌a lasting halt has helped stocks recently despite continued military tensions.

Iran and the U.S. on June 17 signed a memorandum of understanding aimed at ending the four-month-old conflict. But exchanges of fire over the weekend have tested that agreement, and a Qatari official said on Tuesday that top U.S. envoys who have arrived in Doha will not hold a high-level ‌meeting with Iran.

“We’ve had ​a great first half of ‌the year, certainly better than most expected,” said Oliver Pursche, senior vice president and advisor for Wealthspire Advisors ​in Westport, Connecticut.

“In spite of all the geopolitical stuff, the ⁠U.S. economy is performing well and corporate earnings are strong.”

After a strong first-quarter earnings season ⁠for S&P 500 companies, investors are looking forward to second-quarter results in the coming weeks.

A sharp rise in oil prices at the ​start of the war ramped up concerns about inflation and interest rate hikes. Traders are pricing in at least one rate hike by the Federal Reserve by the end of 2026, according to data compiled by LSEG.

The Dow Jones Industrial Average rose 136.46 points, or 0.26%, to 52,319.20, the S&P 500 gained 58.93 points, or 0.79%, to 7,499.36 and the Nasdaq Composite ⁠gained 393.58 points, or 1.52%, to 26,213.72.

Weakness in heavyweight technology shares has weighed on the market in recent weeks, and the S&P 500 and Nasdaq both registered losses for the month of June.

Investors have been concerned about lofty valuations in the tech sector and continued massive spending on AI by tech companies.

For the quarter, the Dow was up about 13%, the S&P 500 gained 14.9% and the Nasdaq rose 21.4%. Strategists at ⁠BofA said cyclical, value-oriented sectors such as energy and financials could ​be the better bet heading into the second half.

After the closing bell, shares of Nike were down about 2% ⁠following the company’s release of quarterly results.

Advancing issues outnumbered decliners by a 1.06-to-1 ratio on the New York Stock Exchange. There were 349 ‌new highs and 154 new lows on the NYSE. On the Nasdaq, 2,651 stocks rose and 2,318 fell as advancing issues ​outnumbered decliners by a 1.14-to-1 ratio. The S&P 500 posted no new 52-week highs and no new lows while the Nasdaq Composite recorded no new highs and no new lows.

Volume on U.S. exchanges was 19.97 billion shares, compared with the 23.40 billion average for the full session over ​the last 20 trading days.

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