SAN FRANCISCO (Reuters) - Shares of Advanced Micro Devices surged nearly 9 percent on Tuesday boosted by strong demand for its chips from cryptocurrency miners, leaving short sellers at a loss for the year.

An "open compute program" server is pictured at Facebook's headquarters in Palo Alto, California on April 7, 2011. REUTERS/Norbert von der Groeben

A rally in cryptocurrency Ethereum has boosted demand for graphics chips used by people to “mine” it and other digital currencies, with some of AMD’s processors sold out on Amazon.com and other retail websites.

Mining for cryptocurrency involves using networks of computers to validate transactions and prevent counterfeit by solving complex mathematical problems. New currency is generated as a reward to the computer operators.

The emergence of Bitcoin in 2009 made cryptocurrency mining popular. Recent rallies in the price of Bitcoin and newer digital currency Ethereum have rekindled interest.

Ethereum miners spending as little as $2,000 to build mining computers using graphics processing units, or GPUs, from AMD or its rival Nvidia could break even within three or four months, estimated RBC analyst Mitch Steves in a note to clients on Tuesday.

“We think economics suggests that GPUs continue to be sold out,” Steves wrote. “We think GPU demand will remain robust as long as the return is under (about) one year.”

As of Monday, AMD short sellers had been up about $15 million for 2017. But Tuesday’s share surge left them at a loss of $125 million on paper for the year, according to S3 Partners, a financial analytics firm.

That follows losses of over $700 million for AMD short sellers last year, when the stock tripled.

The stock last traded up 7.3 percent at $12.06.

“There are going to be a lot of traders saying, ‘This is the last straw. I’m out,’” said Ihor Dusaniwsky, S3’s managing director of research.

AMD spokesman Drew Prairie acknowledged that interest from cryptocurrency miners was contributing to demand for the company’s chips, but he stressed that game enthusiasts are the core market.

JPMorgan Chase, Microsoft Corp, Intel Corp and more than two dozen other companies have teamed up to develop standards to make it easier for enterprises to use technology related to Ethereum.

Adding to support for AMD’s stock, Apple on Monday refreshed its lineup of Mac personal computers, including upgraded graphics chips from AMD.