Short sellers - investors who bet on declines in a company's share price - are sitting on $303.7 billion in realized and unrealized gains, a fourfold increase compared with 2018, their last profitable year, data from analytics firm S3 Partners showed. That works out to a 31.2% return on total average short interest of $973.6 billion throughout the year, according to S3 Partners.

Bets against electric-vehicle maker Tesla Inc lead the pack in terms of dollar gains, with investors seeing $15 billion in realized and unrealized profits on some $19.3 billion of shares sold short. Shares of the electric carmaker, whose meteoric rally over the last few years has burned many bearish investors, are down roughly 60% year-to-date.

Other top winners for shorts include Amazon, Meta Platforms, Apple Inc and used car seller Carvana Co, S3 data showed. The S&P 500 is down almost 19% this year and on track for its biggest yearly percentage loss since 2008 after the Federal Reserve's most aggressive rate increases in decades dried up risk appetite.

This year "was easier for shorting because the economic environment felt like a headwind to the whole market, instead of the tailwind seen in previous years," said Moez Kassam, portfolio manager at long-short hedge fund firm Anson Funds, which oversees around $1.7 billion and posted a 4.9% gain through November. "Shorts have been impossible for years," he said.

Among the fund's top positions were bets against biotech company Novavax Inc, which fell over 90% year-to-date, and electric-vehicle maker Rivian Automotive Inc, down roughly 80%.

Stanphyl Capital portfolio manager Mark Spiegel, who has been short Tesla "constantly, in varying size" since 2014, said a bet against Tesla was his fund's most profitable individual short position this year. The $18 million fund is up roughly 60% in 2022. Tesla's shares are up 1,271% since 2014.

While higher interest rates have punished growth stocks, some investors believe Tesla CEO Elon Musk's purchase of Twitter is diverting his time running the electric car company. Musk's Tesla share sales have also weighed on the stock, and investors have been watching for signs that consumer demand for electric vehicles is cooling.

Spiegel has maintained his bearish bets against Tesla, believing the stock has a long way to go before reaching a fair price.

The last several years haven't been kind to bearish investors. Shorts lost $142.4 billion in 2021, a year when huge rallies in so-called meme stocks such as GameStop hurt several firms that had bet against GameStop and similar companies. They took a $241.7 billion hit in 2020, when the Fed cut rates to historic lows in response to the COVID-19 pandemic, sparking a massive rally in markets.

(Graphic: Short sellers' gains: )

Not all short strategies worked this year. Long-short hedge funds, which bet on stock prices rising or falling, posted a 9.7% loss through November, according to data provider HFR.

Market swings sparked by economic data and Fed decisions have often wrong-footed investors and fueled lockstep moves in asset prices, making it more difficult to select individual stocks, traders said.

"It's a very difficult environment because correlations (among stocks) are high," said Venu Krishna, head of U.S. equity strategy at Barclays in New York.

At the same time, energy stocks such as Exxon Mobil Corp, Occidental Petroleum Corp, Chevron Corp and Marathon Petroleum notched big gains following a surge in energy prices, bruising those who bet against them.

Charles Lemonides, portfolio manager at $226 billion hedge fund ValueWorks LLC, believes tight monetary policy will weigh on risk appetite next year. His fund now has its highest ever level of overall short positioning.

"It's much less likely that we will get back to the sort of dangerous enthusiasm on the part of investors for stocks like Tesla that took short-sellers to the cleaners in years past," he said.

Companies that Lemonides is betting against include aircraft component supplier Transdigm Group, whose shares are up 1.45% year-to-date, and semiconductor company Broadcom, whose shares are down almost 16%.

"There are a bunch of companies out there ... that have a significant amount of debt, but equity investors are perceiving them as bulletproof right now," he said.

(Reporting by Carolina Mandl and David Randall in New York; Editing by Ira Iosebashvili and Leslie Adler)

By Carolina Mandl and David Randall