Professional Documents
Culture Documents
. . .
Now that you’re here after that clickbaity headline, let’s play a little
with some numbers.
Here I’m doing a simple Monte Carlo simulation on the daily returns
of the USD bitcoin price to try to know what will be its most likely
https://medium.com/@xoelop/weve-simulated-the-bitcoin-price-for-the-whole-2018-you-won-t-believe-the-result-4a602679dac2 1/8
01/02/2018 I’ve simulated the bitcoin price for the whole 2018. You won’t believe the result!
price by the end of 2018. You can see the whole code used to create
this in my GitHub.
The return is a computation of how much a price has varied from one
observation to the next one. In this case, as we’re taking daily data,
the returns will be daily. And how are they calculated? There are
several forms. Here, the simplest one will be enough:
Here you can’t tell the di erence between the tails but believe me, the ones from the returns
distribution are fatter.
https://medium.com/@xoelop/weve-simulated-the-bitcoin-price-for-the-whole-2018-you-won-t-believe-the-result-4a602679dac2 2/8
01/02/2018 I’ve simulated the bitcoin price for the whole 2018. You won’t believe the result!
The assumption that the future will be similar to the past is a daring one and it may not be true, but
it’s all we have and I guess it’s better than nothing ¯\_(ツ)_/¯ (source)
Random walks
The rst 200 random walks look like this:
https://medium.com/@xoelop/weve-simulated-the-bitcoin-price-for-the-whole-2018-you-won-t-believe-the-result-4a602679dac2 3/8
01/02/2018 I’ve simulated the bitcoin price for the whole 2018. You won’t believe the result!
Again, we’re facing the same problem as before, and we can’t draw
any kind of conclusions from that plot. The solution is the same:
plotting the data using a logarithmic scale for the horizontal axis. This
way, the plot looks much better:
https://medium.com/@xoelop/weve-simulated-the-bitcoin-price-for-the-whole-2018-you-won-t-believe-the-result-4a602679dac2 4/8
01/02/2018 I’ve simulated the bitcoin price for the whole 2018. You won’t believe the result!
It looks like the most likely price is somewhere between $24K and
$90K. To nd that price more precisely, we could do several things.
One of them is simply calculating the 50% percentile of the
distribution of nal prices: $ 58843. Another one is estimating the
probability density function with Kernel Density Estimation and
nding the price corresponding to the maximum of that function.
The result of this is shown below:
As you see, the estimations for the most likely price are similar, and
both above $50K.
What else?
Now that we have the KDE density function, we could, for example,
compute the probability that the price by the end of the year will be
below a certain level.
https://medium.com/@xoelop/weve-simulated-the-bitcoin-price-for-the-whole-2018-you-won-t-believe-the-result-4a602679dac2 5/8
01/02/2018 I’ve simulated the bitcoin price for the whole 2018. You won’t believe the result!
‘I never thought that probability was so low!’, his last words were.
. . .
Bonus tip
Yeah, I know. Nothing can keep going up forever, and the fact that it
did in the past doesn’t mean it’ll do in the future. Below there’s a
chart of another thing that has also gone up a lot in the past.
https://medium.com/@xoelop/weve-simulated-the-bitcoin-price-for-the-whole-2018-you-won-t-believe-the-result-4a602679dac2 6/8
01/02/2018 I’ve simulated the bitcoin price for the whole 2018. You won’t believe the result!
The monetary base is the most liquid part of USA money supply. It includes notes, coinage and bank
deposits.
And you, do you believe the USA can keep printing money out of thin
air forever?
. . .
Have fun! :)
https://medium.com/@xoelop/weve-simulated-the-bitcoin-price-for-the-whole-2018-you-won-t-believe-the-result-4a602679dac2 7/8
01/02/2018 I’ve simulated the bitcoin price for the whole 2018. You won’t believe the result!
https://medium.com/@xoelop/weve-simulated-the-bitcoin-price-for-the-whole-2018-you-won-t-believe-the-result-4a602679dac2 8/8