Hedge funds had a torrid second quarter, but their faith in the dollar paid off spectacularly.

Industry data provider HFR's Currency Index, part of the broader Macro (Total) Index, rose 1.76% in June, the biggest monthly rise since March 2020, which brought the April-June increase up to 5.70%.

That was the best quarter since a 5.72% surge in the same period in 2017.

Or put another way, currency strategies tracked by HFR essentially just had their joint-best quarter since the index was launched in 2008. Central to that was funds' consistent and sizeable long dollar position.

According to Commodity Futures Trading Commission data, hedge funds have been long of dollars against a basket of G10 currencies every week for 51 weeks. The average net long dollar position in the second quarter was worth around $15 billion.

Thanks to a widespread belief that the Federal Reserve will raise U.S. interest rates to combat inflation more than other central banks, the dollar went on a tear in Q2.

It is now at its strongest level in 20 years against the euro and a basket of major currencies, and its 6.5% rise on an index basis in April-June was its best quarter since 2016.

The latest CFTC data showed that funds increased their net long dollar position against G10 currencies by $2 billion to $16 billion in the week through July 4, simply reversing the $2 billion reduction from the week before.

This suggests that despite the dollar's strong gains, lofty position, and a general softening of investors' expectations for the Fed's tightening cycle, funds are confident the greenback can climb even higher.

MUFG's Lee Hardman notes that the stronger-than-expected U.S. employment report for June on Friday and the latest public comments from Fed officials point to another 75 basis point rate hike later this month.

"The dollar strongly regained upward momentum over the past week and we expect this to extend further in the near term," Hardman wrote in a note on Friday.

The relative weakness of the dollar's major counterparts, particularly the euro, cannot be ignored though.

CFTC funds increased their net short euro position to 16,852 contracts from 10,596 a week earlier. That is the biggest net short this year and marks the fourth week in a row funds have been net short the euro.

A short position is essentially a bet that an asset will fall in value, and a long position is a bet that it will rise. Funds are now holding a $2.16 billion bet on the euro weakening. A month ago, they had a $6.8 billion bet on it strengthening.

The flip is paying off.

The euro slumped to a 20-year low of $1.0070 last week, close to parity, on fears that the energy crisis will tip the euro zone economy into recession, and that the European Central Bank will struggle to support growth while trying to tame record inflation and rein in widening sovereign bond yield spreads.

Hardman recommends selling the euro at $1.0160, targeting a break through parity down to $0.9760 soon. It looks like a growing number of hedge funds would be on board with that.

(The opinions expressed here are those of the author, a columnist for Reuters.)

(By Jamie McGeeverGraphics by Jamie McGeever, Saikat Chatterjee, Marc Jones; Editing by Sam Holmes)