(Bloomberg) -- Traders betting against megacap technology stocks are now winners after the September selloff unwound previous gains in the group. 

Short sellers netted $50 billion in paper profits last month as the S&P 500 Index shed 4.9%, according to data from S3 Partners LLC. It was the best month for contrarian traders so far this year. 

The rally in megacap tech led by hype around artificial intelligence started to fizzle in September as investors digested the Federal Reserve’s stance to keep interest rates higher for longer to tame inflation — a headwind for equities.

Apple Inc., Nvidia Corp., Amazon.com Inc. and Tesla Inc. topped the list of most profitable short trades for the month. The four companies combined netted short sellers a paper profit of nearly $5 billion. 

“The increased short selling in September coupled with long side selling drove down stock prices during the month, but if markets rebound in the fourth quarter, we may see a spurt of short covering in some of the most profitable names as short sellers look to realize mark-to-market profits,” Ihor Dusaniwsky, managing director of predictive analytics at S3, said in a note. 

Short sellers took advantage of the broader stock market slump and put less capital into unprofitable positions during the month. More than 80% of every dollar shorted in September produced a positive return, according to S3. 

Of course, not all short bets were profitable. The biggest losers included energy stocks such as Exxon Mobil Corp., Chevron Corp. and Valero Energy Corp. The energy sector gained in September, lifted by rising oil prices. 

Heading into the fourth quarter, short sellers may continue to cover their positions by buying back borrowed stock to take profits. Stocks with an uptick in short selling and large profits in September are most likely to see this kind of action if the broader market reverses direction, according to S3. That means the Magnificent 7 tech giants may be poised for more short covering in the near-term. 

©2023 Bloomberg L.P.