NEW YORK (Reuters) - It would be the ultimate black eye for short sellers.

FILE PHOTO: A Tesla car charges at a charging station in Beijing, China, April 18, 2017. REUTERS/Thomas Peter/File Photo

A buyout of electric carmaker Tesla Inc., led by entrepreneur CEO Elon Musk, would cap a painful ride for short sellers, who have amassed more than $13 billion in bets that the company will founder and deliver them a huge windfall.

Instead, Tesla’s stock has surged more than 900 percent in five years, and this year alone losses have now topped $3 billion.

Short sellers have had a painful year as stock prices have risen broadly, leaving fewer opportunities for profits as heavily-shorted stocks have risen also.

Just 69 out of the 500 companies in the benchmark U.S. S&P 500 stock index have declined by 10 percent or more for the year to date, while 164 companies have gained more than 10 percent over the same time, according to a Reuters analysis.

“I’ve got guys pitching me all the time on short ideas and I love to hear them, but in this environment I’ve been burned too many times and I’m gun shy about shorting anything that has any viability,” said Mark Spiegel, portfolio manager of hedge fund Stanphyl Capital Partners.

Shares of Tesla rallied 11 percent on Thursday as Musk said in a tweet that he was considering taking the company private. Those gains follow a 16 percent jump last Thursday after its August 1 earnings announcement.

Short sellers in Tesla have lost $3.03 billion this year in mark to market-losses, according to research firm S3 Partners www.s3partners.net.

Spiegel, whose fund is short Tesla by holding puts that expire in January 2020, said it was “unfathomable to me” that anyone would finance a Tesla leveraged buyout.

Some of the industry’s most prominent players are suffering heavy losses amid soured short bets.

David Einhorn’s Greenlight Capital fund is down 19 percent, posting some of the industry’s worst returns, as Tesla was the fund’s second largest loser in the second quarter, the fund manager told investors in late July.

Musk has been in a vocal war with short sellers, needling prominent investors who bet against Tesla, which is one of the most heavily-shorted stocks. Musk on Tuesday tweeted that going private would end “negative propaganda from shorts.”

The average long-short hedge fund is up just 0.7 percent for the year to date, according to Hedge Fund Research, while the average short-focused mutual fund or exchanged traded fund is down nearly 6 percent for the year, according to Lipper. The benchmark S&P 500 index by comparison is up 7 percent for the year.

“The major shorts have remained steadfast to their convictions,” said Ihor Dusaniwsky, head of research at S3 Partners.

Yet short-sellers say that rising interest rates may soon make betting against rising prices once again profitable as companies find it more expensive to borrow.

“One of the challenges we’ve been facing is that some of the business models which are really bad in our opinion keep thriving because they get acquired or they can still get debt financing,” said Bimal Shah, an associate portfolio manager of the Thornburg Long/Short Equity fund.

Shah’s fund has been increasing its short exposure as interest rates rise, he said, and has been adding to its bets in sectors including technology, healthcare and consumer discretionary companies.

“We are starting to see some really juicy shorting opportunities now,” Shah said.

Overall, short interest - a measure of how many shares of a given company are held by short-sellers - has been increasing yearly since 2016, and is up 6.1 percent for the year so far, according to S3 Partners.

The total value of short interest topped $1 trillion for the first time on record this year, S3 Partners said, pushed higher in part by large short bets on companies including Alibaba Group Holding Ltd , Amazon.com Inc, and Apple Inc.

Brian Culpepper, a portfolio manager of the James Long-Short Fund, said that the breadth of gains in the stock market has made it difficult to find profitable shorts.

The U.S. tax cuts passed by Congress last December has helped earnings among S&P 500 index companies who have reported their second quarter results rise by an average of 24.2 percent, according to Thomson Reuters data, nearly double the 12.3 percent earnings growth rate during the same quarter last year.

The broad gains in the stock market will likely slow as the effects of the tax cut are more fully priced into the market, Culpepper said.

“As the stock market becomes more condensed into a few overall names, our percentage of shorts will increase,” he said.

(GRAPHIC-Shorting pain : reut.rs/2Mpvht3)