* TSX ends up 1.1% at 22,995.39

* Posts fourth straight record closing high

* Canadian inflation slows to 2.7% in June

* Tech leads gains, boosted by Shopify

July 16 (Reuters) - Canada's main stock index extended its record-setting advance on Tuesday, led by gains for Shopify and helped by domestic inflation data that added fuel to recent moves into stocks that could particularly benefit from lower interest rates.

The S&P/TSX composite index ended up 243.71 points, or 1.1%, at 22,995.39, its fifth straight day of gains and its fourth consecutive record closing high.

"It's a continuation of the sector rotation that we saw in earnest begin on Thursday after the U.S. CPI numbers," said Elvis Picardo, portfolio manager at Luft Financial, iA Private Wealth.

Investors are betting that a slowdown in U.S. inflation could allow the Federal Reserve to cut interest rates as soon as September.

The Bank of Canada has already begun an easing campaign. Canadian inflation slowed to an annual rate of 2.7% in June from 2.9% in May, bolstering expectations for further rate cuts.

Investors see a roughly 90% chance of a cut at next week's BoC policy announcement, up from 82% before the inflation report.

"In the Canadian market, the interesting thing is that you are seeing multiple sectors participate in this rally. The cyclical sectors as well, even the ones that are more sensitive to interest rates," Picardo said.

The financials sector, which accounts for 29% of the TSX's weighting, rose 0.7%, consumer discretionary climbed nearly 2% and real estate added 1.2%.

Technology was up 3.1%, helped by a gain of 8.5% for the shares of e-commerce company Shopify Inc> after BofA Global Research upgraded the stock to "buy" from "neutral".

Energy was a drag, falling 1.3%, as oil settled 1.4% lower at $80.76 a barrel, but the materials group ended 2% higher, led by gains for metal miners as gold prices climbed.

Barrick Gold Corp was up 4.8% after the company said second-quarter gold output rose. (Reporting by Fergal Smith in Toronto and Nikhil Sharma in Bengaluru; Editing by Shreya Biswas and Daniel Wallis)