Investors in the US have started to dial back their use of leverage for the first time since financial markets were rattled by the coronavirus crisis last year, removing some of the borrowed money that has since fuelled a rally in stocks.

Investors had borrowed $844bn against their portfolios in July, down from a record $882bn a month earlier and the lowest level since March, according to data collected by Wall Street’s self-regulatory body, the Financial Industry Regulatory Authority.

Separate data from Goldman Sachs, which runs one of the largest prime brokerages in the world, showed that the investment bank’s hedge fund clients had cut both net and gross leverage in recent weeks. Morgan Stanley has also reported long-short equity hedge funds that trade through it reduce their leverage, while bankers at other large New York-based prime brokers said a similar trend was under way.

Finra does not publicly disclose who is driving the shifts in leverage each month, and it was unclear if the many retail investors who began day trading during the pandemic have also curtailed their use of margin loans. More comprehensive data from the Federal Reserve on hedge fund leverage is not yet available.

Interactive Brokers, which serves 1.5m customers, disclosed this month that margin loan balances among its clients had declined 2 per cent in July from the month before to $47.9bn. At Charles Schwab, margin balances in July rose by the smallest pace since the retail broker began disclosing the figure on a monthly basis this year, although it still hit a record of $79.9bn.

Mark Aldoroty, who runs prime services for Pershing, a division of Bank of New York Mellon, said fund managers had less faith in how the market might trade in the months ahead.

He pointed to the unexpected move by Chinese regulators to tighten their grip over both the technology and education sectors, which wrongfooted funds that owned Chinese stocks. The swings in US stocks in recent weeks, as economic data has broadly fallen short of expectations, has also shaken investor confidence in the rally.

“You have to start thinking, ‘My conviction might be right, but does it matter?’” Aldoroty added. “Because of the way the market has traded, it’s not necessarily that pure fundamental research drives decisions any more.”

The losses on Chinese tech stocks have been particularly painful for large hedge funds. The Nasdaq Golden Dragon China index has fallen just over 46 per cent from an all-time high set in February.

In an analysis of 813 hedge funds with nearly $3tn of gross equity positions, Goldman Sachs noted that a third held Chinese stocks at the start of the third quarter, with many making large bets on one: Alibaba. The company was among the 10 largest holdings at Bridgewater, the world’s largest hedge fund, and was also a sizeable stake at Tiger Global Management and David Tepper’s Appaloosa Management at the end of June, according to filings with the Securities and Exchange Commission.

Many large hedge funds cut their stakes in Chinese securities during the second quarter, given the share price declines.

In the US, the economic picture has also grown hazier, as coronavirus cases have surged and economic indicators such as consumer sentiment and manufacturing indices have showed a cooling trend.

The reduction in borrowing follows a stellar run for US stocks, with the benchmark S&P 500 index up 19.7 per cent so far this year. The rise has been supercharged by economic stimulus out of Washington. But the fact that many investors have bought into the market with borrowed money has raised red flags for regulators, particularly given the limitations of data that do not capture some trades involving swap derivatives.

It was a point crystallised by the implosion of Archegos Capital Management in March. The investment group’s soured bets resulted in more than $10bn in losses for its trading counterparties including Credit Suisse and Morgan Stanley. And the fact the investment group used total return swaps, instead of buying the stocks outright, meant regulators had little insight into brewing troubles.

The Federal Reserve warned in May that the tools it and other regulators had to gauge hedge fund leverage “may not be capturing important risks”. Many hedge funds also use options to magnify returns.

Banks have tightened the terms of margin lending with some clients after the Archegos affair, requiring some hedge funds to post additional collateral, according to bankers at several large dealers. But the bankers said those reviews were mostly undertaken months ago and were not driving the recent decline in leverage.

Trading activity has also moderated in the months since Archegos captivated Wall Street, including in many of the stocks that had been propelled by new retail traders who had taken to free apps such as Robinhood to try their hand in markets for the first time.

“There was a certain level of aggressiveness in the trading early this year that made people more willing to make levered bets,” said Steve Sosnick, chief strategist at Interactive Brokers. “Now the levels of margin we are seeing seem to be less about speculating via margin, and more about investing via margin.”

He added: “The levels of participation we were seeing at the start of the year were unprecedented, and probably unsustainable.”