A couple weeks ago I got into a bar room argument with a hardcore bitcoin fan, a dialogue which quickly degenerated into two monologues: an IT nerd blathering on the deep meaning of a medium of exchange, and an accounting nerd droning on the deep meaning of a unit of account.

I was right and he was wrong, both of which is irrelevant, but the argument got me thinking: how would our world look like if bitcoin won?

This line of thought led me to imagined story of an investor who, having abandoned the shackles of fiat money and fully embraced the serene bliss of techno utopia of crypto currency, decided to invest in an alternative investment vehicle called the US dollar.

If this imagined investor listened to the advice of a proverbial shoeshine boy and bought into US dollar six weeks ago he would have nearly doubled his money. Quite a ride, wasn’t it?

The code to generate the chart is following:

# USD and BTC - roles reversed...

library(tidyverse)
library(scales)
library(Quandl)
library(grid)
library(gridExtra)
library(xkcd)


frmData <- Quandl("BCHARTS/BITSTAMPUSD") %>%
  filter(Date >= Sys.Date() - 6 * 7) %>% # six weeks ago...
  select(Date, Close) %>%
  mutate(Value = 10000 / Close)

frmLast <- frmData %>% # last trading day
  slice(which.max(Date))

frmFirst <- frmData %>% # first trading day
  slice(which.min(Date))

ggpBitcoin <- ggplot(data = frmData, aes(x = Date, y = Value)) +
  geom_line(col = "red", size = 1.25) +
  # last trading day - round mark, annotation below
  geom_point(data = frmLast, aes(x = Date, y = Value), col = "red", shape = 21, fill = "white", size = 2, stroke = 1.7) +
  geom_text(data = frmLast, aes(x = Date, y = Value, label = sprintf("%0.3f", round(Value, digits = 3))), size = 4, vjust = 2.5) +
  # first trading day - round mark, annotation above
  geom_point(data = frmFirst, aes(x = Date, y = Value), col = "red", shape = 21, fill = "white", size = 2, stroke = 1.7) +
  geom_text(data = frmFirst, aes(x = Date, y = Value, label = sprintf("%0.3f", round(Value, digits = 3))), size = 4, vjust = -1.5) +
  scale_x_date(labels = date_format("%d-%b-%y")) +
  scale_y_continuous(labels = dollar_format(prefix = "", suffix = " BTC")) +
  ggtitle("Value of USD and BTC\nin a looking glass world") +
  theme_xkcd() +
  theme(axis.title = element_blank(),
        panel.border = element_blank(),
        plot.title = element_text(hjust = 0.5, size = 25))

print(ggpBitcoin)