Bitcoin, the controversial digital currency, is on its way to a major milestone thanks to a confluence of positive factors.

With just a couple trading days left in the year, bitcoin looks poised to break the $1,000 barrier — quite an achievement for a product considered close to dead not that long ago amid a series of embarrassing headlines. The price has surged 122 percent in 2016, making it one of the top trades of the year.

The increase has been driven by a number of factors.

China and India both have been big buyers as part of a broader global landscape that has pushed bitcoin's acceptance further along. Chinese investors have bought bitcoins as the yuan has lost its value, while the surge in India has been driven thanks to the government's decision to retire some currency denominations.

"It is one tool that many people around the world use to try to preserve wealth," said Nick Colas, chief market strategist at Convergex who writes a widely followed daily newsletter that was likely the first on Wall Street to discuss bitcoin several years ago. "Bitcoin has gone from being just a nerd's version of gold years ago to now being another thing people do to try to hold onto their wealth."

Indeed, the total value of bitcoins in circulation now is about $15.5 billion, based on more than 16 million bitcoins.

Bitcoin has been one of the investment stories of the year. Only two stocks in the — Nvidia and Oneok — have delivered better returns. No nonleveraged exchange-traded fund has beaten bitcoins, with the SPDR S&P Metals & Mining fund coming closest with a 110 percent gain this year. Of currency trades, the best has been the euro's 16 percent gain against the British pound.