When surprises happen, people buy bitcoin.

When Greece threatened to leave the European Union in 2015, investors surged into the digital currency. The same thing happened when Britain voted to leave the European Union last year, and when Donald Trump defied polls to win the U.S. presidential election. Recent economic surprises in China, India and Venezuela that threatened to destabilize those countries’ paper currencies sparked an interest in the digital alternative as well.

That’s why Chris Burniske, an analyst at ARK Investment Management, a firm that invests in disruptive innovations, has termed bitcoin a “disaster hedge.”

“People are using it similar to how they use gold,” he says. “They use it as a risk-off trade when they’re concerned about what’s going on in the capital markets.”

Last year held plenty such surprises for investors, and they collectively helped make bitcoin the best-performing currency of 2016, analysts say. The currency’s value more than doubled in 2016 to reach $1,029 on Tuesday, a three-year high, as data from CoinDesk, a bitcoin-tracking website, shows.

Image: Coin Desk, Washington Post

Bitcoin was created in 2008 by an unidentified programmer known as Satoshi Nakamoto. It is the world’s first completely decentralized currency — unlike with the dollar, euro or yen, there is no central bank that controls the amount of bitcoin in circulation or its value. Instead, that is controlled by a global peer-to-peer network of computers.

People provide their computing power to the network to log transactions, which are recorded in a ledger that is publicly distributed across the network, called the block chain. New bitcoins are created as the computers in the network solve complex math problems that verify transactions in the block chain, a process known as mining.

Because bitcoin is decentralized, it can be used anonymously — a feature that has made the virtual currency the payment system of choice for those seeking to evade taxes, launder money, fund hacking attacks or engage in other illicit behavior. The currency also acquired a reputation for instability, due in part to hacking attacks on virtual exchanges that provoked wild swings in its value in past years.

But in the past few years, bitcoin has become more mainstream, attracting the interest of hedge funds, brokerages and other institutional investors, especially as risks for traditional currencies increase.

“All this instability is sort of bringing alternative methods to the forefront,” said Ryan Rabaglia, a trader at Octagon Strategy, a commodity and digital asset trading firm in Hong Kong.

Some analysts believe that rising interest rates and continued economic uncertainty could push the currency’s value even higher in the next year. The price may surpass an all-time high of $1,216.70 reached in 2013, CoinDesk predicts.

Traders say one major force pushing up the value of bitcoin is surging demand from China, where people are using the digital currency to circumvent tight restrictions on moving money out of the country. More than 95 percent of the global trading volume in bitcoin takes place on Chinese exchanges, and most of that is what’s known as capital flight, Burniske says.

China’s economy has slowed in recent years, and its real estate and stock markets have at times fluctuated violently. As a result of these forces, and the expectation that China’s currency may lose value in the future, Chinese companies and investors have been eager to diversify their portfolios by moving their money into what they perceive as safer assets abroad.

This has led to a massive outflow of cash from China. Chinese investment in the United States nearly tripledin 2016 compared with the year before, according to tracking by research firm Rhodium Group. In total, some $762 billion exited China in the first 11 months of the year, according to Bloomberg Intelligence.

Some of this money left China legally, and some did not. The Chinese government has been wary of too much money moving offshore, because that might destabilize the country’s currency and economy. So it has imposed tighter restrictions on individual citizens, who can move only $50,000 abroad each annually, and limited some channels for moving money abroad, like purchasing insurance or real estate.

But Chinese people have found ways to get around these restrictions, moving money out of the country through channels like illicit import-export companies, gambling dens and alternative currencies like bitcoin.

“The desire to diversify their portfolios and get around the constraints imposed by the authorities may certainly have sparked additional demand for bitcoin,” says Eswar Prasad, a fellow at the Brookings Institution and the author of “Gaining Currency: The Rise of the Renminbi.”

Burniske agrees that China has recently been the largest driver in the value of bitcoin. He points to the chart below, which shows that the rise in the value of bitcoin is closely associated with the drop in the value of China's currency, which is known as the renminbi or yuan.

Image: Washington Post

Rabaglia says efforts to limit the exchange of currency in Venezuela, which is in the midst of an economic meltdown, and in India, which is undergoing a massive campaign to stamp out black money, have also caused bitcoin’s value to surge.

“The availability and the ease of transit of this currency makes it an attractive play for [people in] all these countries that are having these controls put on them,” Rabaglia says.

Burniske is quick to point out that bitcoin has a roughly $16 billion market capitalization, which is still small compared with the amount of money flowing out of China, for example.