U.S. stocks ended sharply higher on Thursday as economic data showed cooling inflation and a loosening labour market, fueling optimism that the Federal Reserve could be nearing the end of its aggressive interest rate hike cycle.

All three major U.S. stock indexes surged more than 1%, with interest rate sensitive megacaps including Apple Inc, Microsoft Corp and Amazon.com providing the most upside muscle and pushing the tech-heavy Nasdaq up nearly 2% to its biggest one-day percentage jump in nearly a month.

The TSX was up more modestly but still gained for the fifth straight session, closing at its highest level in nearly six weeks, buoyed by strength in the shares of gold miners.

Data released before the bell showed a steeper-than-expected cooldown in U.S. producer prices and new claims for jobless benefits coming in above consensus. Both signal that the Fed’s hawkish barrage of rate hikes, which began over a year ago, is working as intended.

The data comes on the heels of Wednesday’s muted Consumer Price Index report, which cemented the likelihood of yet another 25 basis point rate hike at the conclusion of next month’s Federal Open Market Committee policy meeting.

“Markets rallied today following the lower inflation data this morning, as it’s still all about the Fed so it’s really all about inflation,” said David Carter, investment specialist at JPMorgan Private Bank in New York.

“Together with yesterday’s muted CPI data, PPI is also suggesting some slowdown in inflation which could mean a quick end to Fed tightening.”

Financial markets are pricing in a roughly one-in-three probability that the central bank will press the pause button and let the Fed funds target rate stand in the 4.75% to 5.00% range, according to CME’s FedWatch tool.

Investor focus now shifts to first-quarter earnings season, which jumps into full swing on Friday when a trio of big banks, Citigroup, JPMorgan Chase & Co, Wells Fargo & Co report.

“Tomorrow’s bank earnings could give insight into the strength of regional banks and future lending activity,” Carter added. “It will be interesting to see what banks say tomorrow about future economic growth.”

Analysts expect aggregate first-quarter S&P 500 earnings to come in 5.2% below the year-ago quarter, a stark reversal from the 1.4% year-on-year growth seen at the beginning of the quarter, according to Refinitiv.

The Dow Jones Industrial Average rose 383.19 points, or 1.14%, to 34,029.69; the S&P 500 gained 54.27 points, or 1.33%, at 4,146.22; and the Nasdaq Composite added 236.94 points, or 1.99%, at 12,166.27.

Among the 11 major sectors of the S&P 500, all but real estate ended the session higher, with communication services and consumer discretionary enjoying the largest gains, both jumping 2.3%.

In stock moves, Delta Air Lines Inc shares fell 1.1% following the company’s first-quarter profit miss.

Shares of Harley-Davidson Inc slid 1.7% after the motorcycle maker announced Chief Financial Officer Gina Goetter was leaving the company at the end of April.

Groupon Inc jumped 4.0% after the company appointed Jiri Ponrt to succeed Damien Schmitz as chief financial officer.

Netflix Inc rose 4.6% after Wedbush said the streaming platform’s revenue growth of new subscribers could drive up profitability.

The Toronto Stock Exchange’s S&P/TSX composite index ended up 110.17 points, or 0.5%, at 20,564.49.

The materials sector, which includes precious and base metals miners and fertilizer companies, advanced 1.6% on Thursday to its highest level since May 2022 as the price of gold rose to a one-year high. Spot gold was up 1.4% at US$2,042.50 per ounce in afternoon trading, about US$30 shy of its record high hit in 2020.

“Gold prices are surging here as cooling PPI data and rising jobless claims bolsters Fed rate cut bets,” Edward Moya, senior market analyst at OANDA, said in a note. A cut in U.S. interest rates would be bearish for the U.S. dollar, and gold benefits from a weaker greenback as it would become cheaper to buy in foreign currencies.

The rate-sensitive technology sector was also a standout in Toronto, rising 0.7%, while heavily-weighted financials advanced 0.5%.

The Canadian dollar was up sharply to a near two-month high against its U.S. counterpart, as the softer-than-expected U.S. inflation data put pressure on speculators that have raised their bearish bets on the currency to the most in four years.

Speculators have raised their bearish bets on the Canadian dollar to the highest since January 2019, data from the U.S. Commodity Futures Trading Commission showed last Friday.

By late afternoon, the Canadian dollar was trading 0.8% higher at 1.3335 to the greenback, or 74.99 U.S. cents, its strongest level since Feb. 15.

Reuters, Globe staff

Be smart with your money. Get the latest investing insights delivered right to your inbox three times a week, with the Globe Investor newsletter. Sign up today.

Follow related authors and topics

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

Interact with The Globe