LONDON, July 31 (Reuters) - Traders cut their bets on a continuing rally in the pound by the most since mid-June ahead of a Bank of England rate decision on Thursday, after inflation slowed more than expected last month.

Sterling has surged 24% from a record low of $1.033 against the dollar in September after a disastrous budget, hitting a 15-month high of $1.314 in mid-July.

It is also the best-performing G10 currency against the dollar this year, having gained 6.2%, while the Swiss franc is a close second, with a gain of 5.8%..

However, that is down from the 8.6% year-to-date gain sterling was running just two weeks ago.

Stubborn inflation and an unexpectedly resilient economy have kept the Bank of England on a rate hike path, lifting sterling, while the dollar has sunk as U.S. price pressures cooled.

Yet data from the U.S. Commodity Futures Trading Commission late on Friday showed asset managers and institutional investors' net long positions on sterling in the futures market fell by 27% to 34,669 contracts in the week to July 25, from a record high of 47,747 the previous week.

While that still amounts to the second-biggest long position on record, worth $2.79 billion, it was the biggest fall since the middle of last month. A long bet is a wager that an asset is going to rise in price.

Overall, non-commercial investors dialled down their bullish bets on the pound to $4.76 billion from $5.19 billion a week earlier, which was the most valuable long position since 2014. It was also the biggest fall since the middle of June.

"You've got stretched positioning, valuation looking increasingly rich, both long term and short term, and you've got an economy, which, if anything, is starting to show some signs of softening again," Dominic Bunning, head of European FX research at HSBC.

"For sterling to push much beyond $1.30, either you'd need a much weaker dollar more broadly or you need some sort of idiosyncratic, absolute strength in the UK. And I don't see that at the moment."

The shift in positioning followed data on July 19 which showed inflation fell sharply in June to 7.9% year on year, from 8.7% in May. Economists had been expecting 8.2%.

Traders now forecast a roughly 65% chance the Bank of England raises rates by 25 basis points (bps) on Thursday, and a 35% chance of a 50-bp increase. They think rates are likely to peak just above 5.8% early next year.

At the start of July, traders reckoned a 50-bp hike was more likely and envisaged a peak rate well above 6%.

One of the main drivers for sterling this year has been the premium UK government bond yields command over those elsewhere.

The gap between two-year gilt yields and those on two-year U.S. Treasuries, for example, roared to a 12-year high of 52 bps in early July. That spread has since dropped to just 11 bps.

Kallum Pickering, senior economist at Berenberg, said he thinks the outlook for the pound is relatively bright.

"Political uncertainty, COVID and the war shock are all easing," he said. "And as a result, the supply side of the economy should start to improve."

(Reporting by Harry Robertson and Amanda Cooper; Editing by Alexander Smith)