A researcher at MIT may have found the key to predicting the price of Bitcoin, the notoriously unpredictable cryptocurrency, MIT News reports.

Bitcoin is a high-risk investment. The digital currency can fluctuate dramatically depending on outside factors. A federal seizure may cause Bitcoin to plummet, while renewed media attention can make it to skyrocket.

Now, MIT researcher Devavrat Shah has developed a machine learning algorithm that stays one step ahead of the currency, allowing him to double his Bitcoin investment in just 50 days.

Working with MIT graduate Kang Zhang, Shah collected price point data from every major Bitcoin exchange for five months. Using a method called “Bayesian regression,” the two taught an algorithm to interpret patterns from the data and trade bitcoins based on those.

The team conducted 2,872 trade in 50 days and experienced an 89 percent return on their investment, effectively gaming the Bitcoin market. Shah and Zhang published a paper on their findings, Bayesian Regression and Bitcoin, earlier this month.

“Can we explain the price variation in terms of factors related to the human world? We have not spent a lot of time doing that,” Shah told MIT News, joking, “But I can show you it works. Give me your money and I’d be happy to invest it for you.”

Photo by fdecomite.