• No results found

Arbitrage in Bitcoin markets : an analysis of historical arbitrage opportunities in Bitcoin markets

N/A
N/A
Protected

Academic year: 2021

Share "Arbitrage in Bitcoin markets : an analysis of historical arbitrage opportunities in Bitcoin markets"

Copied!
163
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

Arbitrage in Bitcoin Markets

An Analysis of Historical Arbitrage Opportunities in Bitcoin Markets

UNIVERSITY OF AMSTERDAM

FACULTY OF ECONOMICS AND BUSINESS

BSc Economics & Business

Bachelor Specialisation Finance & Organization

Author:

S. E. Bibo

Student number:

10580190

Thesis supervisor: Professor Jan Lemmen

(2)

PREFACE AND ACKNOWLEDGEMENTS

I would like to thank everyone who assisted me in the writing of this thesis. Special thanks go out to my supervisor Jan Lemmen, who provided me with valuable feedback and suggestions; Christopher Baum, who helped me with the transfiguration of the raw data; Vitor Baisi Hadad, who helped to write python code to perform a function that was impossible in STATA; and the Boston College Research Services Center, for their assistance with the Linux Cluster at Boston College which enabled me to run STATA on the large datasets and with STATA coding.

STATEMENT OF ORIGINALITY

This document is written by Sebastiaan Bibo who declares to take full responsibility for the contents of this document.

I declare that the text and the work presented in this document is original and that no sources other than those mentioned in the text and its

references have been used in creating it.

The Faculty of Economics and Business is responsible solely for the supervision of completion of the work, not for the contents.

(3)

ABSTRACT

Bitcoin has caught a lot of attention in the past few years. This paper therefore examines the availability of profitable arbitrage opportunities in its markets. As a result, this paper provides research on arbitrage in Bitcoin markets after providing an introduction to the cryptocurrency and arbitrage itself. The focus of this paper is to test the hypotheses that there are significant arbitrage opportunities in Bitcoin markets, that their occurrence is affected by the price volatility of Bitcoin and that these opportunities have decreased over the observed time. The paper adds to existing literature by providing an analysis over a more recent dataset and including a much larger data set in the calculations, consisting of both more exchanges and multiple currency pairs. The main findings of this paper were that all three hypotheses hold, which means that the law of one price does not hold in the Bitcoin market, though arbitrage profits are decreasing in both count and severity. These results contradict previous literature containing a smaller dataset suggesting that there are no significant profitable arbitrage opportunities when transaction costs are taken into account.

Keywords: Bitcoin, Arbitrage, Triangular Arbitrage, Bitcoin Exchanges, Volatility JEL Classification: G1

(4)

TABLE OF CONTENTS

PREFACE AND ACKNOWLEDGEMENTS ... ii

STATEMENT OF ORIGINALITY ... ii ABSTRACT ... iii TABLE OF CONTENTS ... iv LIST OF TABLES ... v LIST OF FIGURES ... vi CHAPTER 1 Introduction ... 1 1.1 What is Bitcoin? ... 1 1.2 What is arbitrage? ... 8

CHAPTER 2 Theoretical Framework ... 11

2.1 Triangular Arbitrage ... 11

2.2 Past Research in Bitcoin Arbitrage ... 12

2.3 Key Findings ... 17 CHAPTER 3 Data ... 19 CHAPTER 4 Method ... 24 CHAPTER 5 Results ... 26 CHAPTER 6 Conclusion... 35 REFERENCES ... 36

APPENDIX A Converting Original Observations To Intervals ... 39

APPENDIX B Add and Transform Currency Conversion Rates ... 46

APPENDIX C Create Dollar-Based Prices and Add Transaction Fees ... 58

APPENDIX D Add Variables Exname and Exid ... 88

APPENDIX E Append Datasets ... 94

APPENDIX F Correct OKCoin Data ... 96

APPENDIX G Remove Mt. Gox Data ... 107

APPENDIX H Further missing observation adjustments ... 108

APPENDIX I Average Volatility ... 115

APPENDIX J Currency Fees ... 116

(5)

LIST OF TABLES

Table 1 Exchange Trading Fees Jan 1st, 2014 – Jan 1st, 2016 21

Table 2 Variables 24

Table 3 Regression on Absolute Arbitrage Spread 26 Table 4 Regression on Absolute Arbitrage Spread Corrected for Transaction Fees 26 Table 5 Regression on Relative Arbitrage Spread 27 Table 6 Regression on Relative Arbitrage Spread Corrected for Transaction Fees 27 Table 7 Regr. on Absolute Arbitrage Spread Corr. for Trans. and Low Currency Fees 28 Table 8 Regr. on Relative Arbitrage Spread Corr. for Trans. and Low Currency Fees 28 Table 9 Regr. on Absolute Arbitrage Spread Corr. for Trans. and Med. Currency Fees 29 Table 10 Regr. on Relative Arbitrage Spread Corr. for Trans. and Med. Currency Fees 29 Table 11 Regr. on Absolute Arbitrage Spread Corr. for Trans. and High Currency Fees 30 Table 12 Regr. on Relative Arbitrage Spread Corr. for Trans. and High Currency Fees 30

(6)

LIST OF FIGURES

Figure 1 Bitcoin’s Transaction Structure 2

Figure 2 Bitcoin in Circulation 3

Figure 3 Historical Bitcoin Prices 4 Figure 4 Bid Ask Spread in Dollars 13 Figure 5 Arbitrage Profit as a % of Bitcoin Price 13

Figure 6 Exchange Rate USD/BTC 16

Figure 7 Intra-day Volatility USD/BTC 16 Figure 8 Exchange Rates – Converted Back to USD 16 Figure 9 Normalized Exchange Spread 17 Figure 10 Spread Excluding Mt. Gox 17 Figure 11 Relative Arbitrage Profit After Trans. and High Curr. Fees Over Time (Scatter) 31 Figure 12 Relative Arbitrage Profit After Trans. and High Curr. Fees Over Time (Line) 31 Figure 13 Total Trading Volume in Bitcoin Over Time 32 Figure 14 Effect of Uncorrected Volatility on Return After Trans. and High Curr. Fees 32 Figure 15 Effect of Corrected Volatility on Return After Trans. and High Curr. Fees 33 Figure 16 Effect of Cross-Pair Volatility on Return After Trans. and High Curr. Fees 33

(7)

CHAPTER 1 Introduction

1.1

What is Bitcoin?

In this paper, I will research the existence and extent of arbitrage opportunities in Bitcoin1 markets, and to

what degree they are affected by an increase in volatility. The main research question will be whether the Law of One Price holds for the worldwide Bitcoin market. This paper adds value by performing an analysis over several times more exchanges than previous research and incorporating a more recent dataset. In order to analyze this question, I have made three hypotheses. These hypotheses are that there are significant arbitrage opportunities, that their occurrence is affected by the price volatility of Bitcoin and that these opportunities have decreased over the observed time. These hypotheses and the main research question will be answered by interpreting the results of a regression analysis over the dataset. The following introduction to Bitcoin should suffice to give one a basic understanding of the

cryptocurrency in order to be able to use and trade it as well as to understand the analysis of the market. For further research on Bitcoin in general, the sources can be studied on their own; it is not the focus of this paper. In the next section, I will first discuss literature on arbitrage in general, and then move on to analyze past research into Bitcoin arbitrage. Afterwards, I will explain my methodology and my findings. At the end of the road, I will present my conclusion. My finding is that all three hypotheses hold, which means that the law of one price does not hold in the Bitcoin market, though arbitrage profits are

decreasing in both count and severity. These results contradict previous literature containing a smaller dataset suggesting that there are no significant profitable arbitrage opportunities when transaction costs are taken into account.

Bitcoin’s inception was in the beginning of 2009, by an anonymous group of developers (Böhme et al., 2014, p. 1). Bitcoin’s anonymous creator first published a paper regarding Bitcoin in 2008, under the pseudonym Satoshi Nakamoto. Nakamoto (2008, p. 1) describes Bitcoin as an “electronic payment system based on cryptographic proof instead of trust, allowing any two willing parties to transact directly with each other without the need for a trusted third party”. The cryptocurrency does, however, rely on incentive driven behavior to facilitate its upkeep by others, as later discussed (Badev & Chen, 2014, p. 1). Due to its basis in cryptography, this kind of currency has been coined a cryptocurrency, with currently over 2200 of those in existence (CryptoCoinCharts, 2016).

In his paper, Nakamoto (2008, p. 1) explains his intention to introduce an electronic payment system that does not require a third party to process transfers of funds, with as main benefits reduced transaction costs and non-reversible transactions. The latter facilitates trade by eliminating the need to extensively verify

1 I will use uppercase-B Bitcoin to talk about the currency in general, and lowercase-b bitcoin to talk about the unit of measurement, similar to

(8)

customers to be sure that they are not trying to perform fraudulent activities, by reversing their payment after a non-reversible service has been rendered. As a result, it also negates the need to accept that a certain percentage of all sales will be lost to fraudulent payments. Additional benefits include the increased privacy, flexibility and a lower susceptibility to regulatory oversight relative to preexisting systems, though all these benefits have their limit that will be addressed after a short technical explanation of how a Bitcoin transaction takes place and how more bitcoins are created (Nakamoto, 2008, pp. 1-6) (Böhme et al., 2014, pp. 1-2).

Bitcoin are stored in a file called a wallet using a Bitcoin client (Grinberg, 2011, pp. 162-163). This client can be run on someone’s own computer or one can use a website that runs it for him. These free-to-create wallets are all associated with one or more sets of public keys and a private key (Zhou, 2015, p. 1) (Badev & Chen, 2014, pp. 10-11). The former, also known as a Bitcoin address, is a public identifier to your Bitcoin wallet, used to receive bitcoin from others. The latter is used to sign as a sort of password for your public key, in order to allow you to send your bitcoin. This is done by signing the hash (a string of

characters) of the previous transaction involving a specific Bitcoin and by adding the public key of the next owner at the end of the Bitcoin (Nakamoto, 2008, p. 2) (Badev & Chen, 2014, p. 9). This transaction is then visible in a public ledger, which has been named the blockchain (Badev & Chen, 2014, p. 5). All of this happens automatically when using Bitcoin software applications; all one normally needs to do to send bitcoins is to enter the amount one wants to send, and the recipients public key. The process behind it has been depicted graphically by Nakamoto.

Figure 1. Bitcoin’s Transaction Structure

Source: Nakamoto (2008, p. 2)

Due to the absence of a central bank in this monetary system, a mechanism had to be implemented that controls the distribution of new bitcoins into the open market. This distribution has been explicitly linked to the upkeep of the Bitcoin network’s accounting system, thereby rewarding those who maintain it with

(9)

newly minted bitcoins at a predetermined pace (Nakamoto, 2008, pp. 2-6) (Böhme et al., 2014, p. 3). This process is called “mining” (Zhou, 2015, p. 39), a probable reference to Nakamoto’s initial comparison of the process’s liquidity function to that of gold mining, with computing power and energy being spent instead of manual labour (Nakamoto, 2008, p. 4). As written by Böhme et al. (2014, p. 21), the

distribution scheme “implements a variant of Milton Friendman’s “k-percent rule” – that is, a proposal to fix the annual growth rate of the money supply to a fixed rate of growth”. The design will reward bitcoins at the earlier mentioned, predetermined, ever decreasing speed, resulting in a finite number of 21 million bitcoins, which is estimated to be nearly achieved by the year 2100, as 99% of all Bitcoin is estimated to be mined in 2030 (Wisla, 2014) and the last bitcoin will take forty years to be eventually mined in 2140 (Badev & Chen, 2014, p. 6).

Figure 2. Bitcoin in Circulation

Source: Author, based on data from Bitcoin.it (2016) & Wisla (2014).

This means that as we near the year 2100, the spendable supply of bitcoins will only decrease, as people will forget their access codes and thus lose access to their bitcoins, and because of others who will intentionally destroy a number of bitcoins they own through various options, by, for example, sending the bitcoin to a public key to which no one has the private key. This does not mean that at that point in time, bitcoin mining will cease to exist because there will no longer be a reward for it. Already, many miners only accept to process transactions if a small voluntary transaction fee is added to compensate for their effort; this will likely slightly increase to offset the fact that no more bitcoins are being mined, though still stay under the cost of a general bank-involved transfer of funds (Grinberg, 2011, p. 165). When there are more miners active than necessary, the problems become harder, and vice versa, in order to arrive at the intended speed of releasing bitcoins (Grinberg, 2011, pp. 162-163).

0 5 10 15 20 25 2000 2020 2040 2060 2080 2100 2120 2140 2160 Milli o n

(10)

One of the reasons Bitcoin mining gained so much popularity was the extraordinary rise of Bitcoin prices. There have been multiple Bitcoin bubbles that have since burst. The earliest one was in June 2011 (Brezo & Bringas, 2012, p. 22). This bubble was followed around two years later by another one in April 2013 (Foley & Alice, 2013). A little over half a year later these were both dwarfed by the most well-known Bitcoin bubble at the end of 2013 and the beginning of 2014, which caused Bitcoin to rise to $1242 (Watts, 2013). These bubbles can be observed in the graph below, where the diverging price lines around the last bubble occur due to different recorded prices at different exchanges.

Figure 3. Historical Bitcoin Prices

Source: CoinDesk.com

One noteworthy point is that not everyone agrees that Bitcoin’s irreversibility is an advantage. Böhme et al. (2014, p. 15) argue that this heightens transaction risk, as there is no way to regain your bitcoin if you accidentally send them to the wrong person. Likewise, you cannot gain the bitcoin back if they have been fraudulently removed from your account or the other party did not hold up their end of the bargain, while, for example, you could cancel a completed PayPal transaction with the proper evidence. With Bitcoin, all transactions are final; there is no way of reversing the transaction at all.

Legal options to regain your wealth of course remain, however this gets complicated with an erroneous transfer due to the anonymity associated with the cryptocurrency. For those on the receiving end, problems are generally mitigated by simply waiting with relinquishing control of your goods until the transaction has been properly processed.

Another issue that not everyone is aware of is that Bitcoin’s privacy is not airtight. Transactions are all associated with your public key, and as all the transactions ever performed in the Bitcoin network are publicly visible, this means that someone often can find your identity. This becomes a possibility when your real name or address is added as a message in any one of the transactions associated with your public key, for example with a transaction involving a bank or retailer (Nakamoto, 2008, p. 6) (Böhme et al.,

(11)

2014, pp. 16-17). Brezo and Bringas (2012, p. 22) went one step further to describe a situation where a thief was linked to his victim within three linked transactions. One could mitigate this privacy risk by being careful about where he or she spends his or her bitcoin, by using multiple wallets and by using “mixers”, which are services that group together a bunch of transactions and route these through a large amount of wallets, eventually sending the intended amounts to all the correct recipients (Böhme et al., 2014, pp. 9-10). Through this procedure, which mixers offer at a 1-3% fee, it becomes hard to trace where each transaction originated. On the other hand, one has no guarantee that the mixer will not keep the bitcoin for himself, nor has it been proven that it is an effective way to stop a determined individual from finding out where a transaction originated, particularly so when there was a small amount of individual payments that were grouped together. For these reasons, for many people cash will still be king.

Anonymity is something that many common people desire, and with paper cash they (generally) leave no tracks behind that can eventually be traced back to them (The Economist, 2000).

There are two key weaknesses that stand in the way of widespread Bitcoin usage (Zhou, 2015, pp. 109-110). First, due to its high volatility, the cryptocurrency has large price swings making it an inefficient way to store value. Second, a large majority of the population still has not heard of Bitcoin, let alone knows its applications in detail. These obstacles have to be overcome, and regulation has to make the regular person more comfortable with using bitcoin, in order for widespread adoption to occur. More importantly, a weakness inherent to the system itself is that someone who controls 51% or more of the computing power in the network, gains the ability to change the network protocol and to take back bitcoin he recently sent to someone else (Nakamoto, 2008, p. 4-6). However, it remains impossible in any case to create bitcoin out of thin air.

Furthermore, Nakamoto states that returning his sent bitcoin to himself would destroy the market value of the retrieved bitcoin and thereby any potential gain he could hope to achieve by these actions. As a result, it would be better for anyone controlling such a large part of the computing power to play by the rules and to enjoy receiving a larger share of newly mined bitcoin than everyone else combined. Nevertheless, one could significantly invest in Bitcoin put options, subsequently crash the Bitcoin price by such a takeover, and profit immensely as a result. Someone could do this without necessarily linking his Bitcoin address to his real identity by never cashing out the stolen bitcoin. Furthermore, one cannot rule out there will never be an individual who will try to destroy the value of the currency, for the sake of proving he can.

In such situations, regulation comes in. First and foremost, it is important to note that the possibilities of government regulation only exist around Bitcoin, not within the network itself. The government cannot generate more bitcoins, which has both positive and negative effects (Reber & Feuerstein, 2014, pp. 88-93). For example, this means that governments cannot destroy its value as a result of hyperinflation through the creation of a large amount of bitcoins. On the flip side, government’s central banks cannot

(12)

perform monetary policy with Bitcoin the same way they do with conventional currencies at times when the currency would benefit from it, as they cannot adjust the money supply which is their main

instrument. Furthermore, Bitcoin does not benefit from the reputation of an issuing government

promising to uphold the currency’s value and stability, which one may argue would have led to a lower volatility.

Nevertheless, governments have wanted to implement regulation on Bitcoin the past few years as they were generally not a fan of its deregulatory system (ECB, 2012, pp. 42-47); yet these government

agencies still like to tax it, as can be observed by the IRS published guidelines in 2014 (IRS, 2014). Other regulations have ranged from ruling Bitcoin a currency in the United States (Musil, 2013) to China’s ban on banks’ involvement in Bitcoin transactions (Ruwitch & Sweeney, 2013), a decision which was thought to have been made to stop the yuan from being moved overseas through the cryptocurrency (Böhme et al., 2014, p. 12), to Russia’s ban on Bitcoin in its entirety (Urquhart, 2014). This increased regulation clearly serves a purpose when 45% of exchanges studied in Böhme et al.’s paper have been closed, and in roughly half of those cases the consumers never received their bitcoin back (2014, p. 14). In such a marketplace, regulation can make people more comfortable with the currency, and hence increasing its adoption by the more mainstream consumers. Furthermore, the proven use of Bitcoin for criminal ends also justifies the increased security in exchanges to make sure that this is not what Bitcoin ends up being used for (Bernanke, 2013, pp. 1-17).

On the other hand, Brezo and Bringas (2012, p. 4) as well as Grindberg (2011, pp. 170-172) state that Bitcoin is not the first digital creation that is used by criminals for money laundering and other nefarious purposes; they mention that the online games World of Warcraft and Second Life have been used to the same point, as they provide a similarly tough to track environment. I have a lot of personal experience with avoiding those who wish to use such games as ways to launder money, as I run a business buying and selling items within online games for regular fiat currency myself; just because some people have ill intentions does not mean that the large majority is not, in fact, legitimate. In this industry, Bitcoin is often the most preferred payment method as it has no risk of fraud ex post the transaction, which is something that translates to many other business (Reber & Freuenstein, 2014, p. 93). Due to all those conflicting opinions held by a variety of people, it is yet unknown how the future regulations will unfold regarding Bitcoin.

All of the above may cause someone to wonder whether Bitcoin is money or a speculative investment. In order to determine that, we first need to know what exactly constitutes money. The Federal Reserve Bank of St. Louis (2015) gives the following three, widely accepted criteria of what constitutes money: it is a medium of exchange, it is a unit of account and it is a store of value. First of all, this means that money is unaffected by time and holds largely the same value over a prolonged period of time. Second, you can use money to easily calculate the different prices of goods and services and compare them accordingly. Third,

(13)

money is a widely accepted form of payment. Laidler (1969, pp. 508-525) discusses in further detail whether only currency-in-hand and demand deposits constitute money, or whether time deposits or even the liabilities of certain non-bank financial intermediaries should be included in the definition of money; this is beyond the scope of this paper.

One of the most cited papers on the question whether Bitcoin is money or not, is written by Yermack (2014, pp. 1-22). He states that Bitcoin fails to meet all three criteria, and instead behaves like a speculative investment. Yermack’s has two arguments that Bitcoin does not constitute a medium of exchange, namely that only a few transactions are handled in the cryptocurrency relative to conventional currencies and that one has to possess the required bitcoins before being able to complete a purchase, as there are no bitcoin-denominated credit cards and consumer credit available (2014, pp. 9-11). The former argument, that only a fraction of all transactions are handled in Bitcoin, does not nullify the actual possibility of using Bitcoin as a medium of exchange. It simply states that it is not widely used to do so, which by itself does not validate this reasoning. The latter names things that would make it easier to complete trades in Bitcoin, but not a requirement. Furthermore, there have been various

Bitcoin-denominated debit cards introduced, which allow someone to pay with them like a regular debit card, as well as withdraw cash from ATMs (Walsh, 2015); the main reason why Bitcoin-denominated credit cards are currently not available, would be the fact that any bitcoin purchase is final, and hence this would cause a security risk for anyone lending people money denominated in this currency on a large scale. Nevertheless, there is no reason why these issues cannot be solved with proper security measures and regulation, just like they have been solved for conventional fiat currencies, and hence we may see these credit cards sooner than we may think.

Next, Yermack says that Bitcoin is not a proper unit of account because of the different prices of Bitcoin at different exchanges, the cryptocurrency’s volatility and its high price, the latter of which would require prices to be quoted with many decimal points (2014, pp. 11-13). The different prices at different

exchanges are extensively covered later in this paper, as it researches arbitrage opportunities. A finding has been that Bitcoin prices have converged a great deal since the beginning of 2014. Second, volatility is more of an issue with the third criterion, money being a store of value, rather than a unit of account. Finally, the final argument that is extensively covered, namely that Bitcoin is an improper unit of account due to the required decimals when quoting prices, is actually no argument at all. Bitcoin can also be denominated in millibits, mBits for short, which constitute one thousandth of a Bitcoin, as well as bits, which constitute a millionth of a Bitcoin (You Me And Bitcoin, 2016). One could consider these the “Bitcents”. This would directly solve the problem for small transactions; after all, if you say that

something costs 99 cents everyone knows precisely what you mean. Most importantly, Germany formally recognized Bitcoin as a unit of account (The Economist, 2013).

(14)

The final criterion of being a store of value, Yermack writes, is not met for multiple reasons (2014, pp. 14-15): his first reason is that you cannot physically hide Bitcoin or put it in the bank to safeguard your wealth, and his second reason is that it is significantly more volatile than conventional fiat currencies. The former reason is invalid; one could use an offline wallet to store one’s bitcoins on a USB drive, which could then be hidden under your mattress or placed in a safety deposit box just like a regular roll of cash; this might even be easier to accomplish considering you can hide tens of millions of dollars’ worth of bitcoin on that flash drive, while you would need a separate vault to store that much cash. Yermack states that there have been many thefts and hackings of Bitcoin, but in all of these cases only the technology

surrounding Bitcoin has been hacked, not Bitcoin itself, and the proposed

USB-in-safety-deposit-box-method would be impenetrable for hackers (Karminsky, 2013) (Wood, 2013). Famous hacker Dan Karminsky even admitted to have initially thought that Bitcoin’s security systems would have failed instantaneously at every layer, but now praises Bitcoin’s coding instead. However, the latter reason is completely valid; at this time Bitcoin is still considerably more volatile than any other currency. This means that even with these arguments against Yermack’s initial research (2015, pp. 1-22), the three criteria of money have not all been completely met, and thus Bitcoin cannot be considered conventional

fiat money. However, it can be considered commodity money as it holds the function of a medium of

exchange (Kiyotaki & Wright, 1989, pp. 929-937).

1.2

What is arbitrage?

Some people may ask: What is arbitrage exactly? In theory, “arbitrage in financial markets requires no capital and entails no risk” (Schleifer & Vishny, 1997, pp. 35-37) In reality, almost all arbitrage requires risk and capital and arbitrage trades last for a prolonged period of time. This typically risky arbitrage is still based on The Law of One Price, which states that in one market there is one price (Kindleberger, 1990, pp. 67-92). In effect, arbitrage is finding situations in which this law does not hold, in order to perform profitable trades.

Delbaen and Schachermayer (2006, pp. 3-4) describe an arbitrage opportunity as “the possibility to make a profit in a financial market without risk and without net investment of capital”. No net investment of capital means you can simultaneously perform the trades in such a manner that the cash inflow equals the cash outflow, or preferably, surpasses it. In other words, the law of one price states that the same goods should have the same prices (Lamont & Thaler, 2003, pp. 191-194). The best example are the modern foreign exchange markets which allow for instantaneous in- and outflow of wealth around the globe, causing arbitrageurs to attempt to profit from even the slightest inconsistencies across markets. This is achieved by buying a currency in one place and simultaneously (short)selling it for slightly more in another. This clearly is profitable to repeat an infinite amount of times. As a result, this trading behavior causes market prices to eventually come together at the equilibrium price, due to an increase in supply

(15)

where the currency is expensive (as everyone wants to sell there) and an increase in demand where the currency is cheap (as everyone wants to buy there), upon which the arbitrage opportunity ceases to exist.

This can to a certain extent also be applied to everyday life, as it would mean that if you were to buy something in a store, it should have the same price as anywhere else, if there would be no transaction costs, nothing stopped you from going to that or a different store and others would freely be able to open new stores. In reality you will often face different prices for the same products in the consumer market, depending on the city where you live or the store you visit. This difference in prices is generally caused by people believing that the products are truly different or the situation making it hard or impossible to perform arbitrage related activities. It may be the case that the stores generally tend to have similar prices, but this is nowhere as profound as in the financial markets. If there seem to be profitable arbitrage

opportunities in the financial markets, it is generally the case because the assets are not precisely the same or regulation may prevent you from acting on it.

As mentioned before, arbitrage often happens in the foreign exchange market. Another similar market is the bond market (Schleifer & Vishny, 1997, pp. 36-50). The main overlapping characteristics within these two markets are that it is relatively easy to price their securities with a high degree of accuracy, and that you also find extreme leverage, short selling, and performance-based fees. These markets tend to be bond and foreign exchange markets rather than stock markets, due to the former reason that stocks are much more difficult to accurately value with a high degree of specificity. In fact, it has been shown that equity markets consistently violate the law of one price (Lamont & Thaler, 2003, p. 200). The fact that arbitrage happens in such specialized markets hint to the established fact that arbitrage is mainly performed by a few, very specialized (groups of) individuals who often work with the cash of investors, which is different from the common theory suggested in textbooks that an infinite amount of buyers and sellers operates as arbitrageurs, which would cause prices to return to normal if there are pricing inconsistencies.

These investors may in some cases also pressure an arbitrageur. Arbitrage firms are generally dependent on their most recent returns for new funding, and a loss on a particular trade could result in pressure from investors to stop this trading position, while the larger difference in true value and current market price has only increased, assuming one’s fundamental analysis of the security remains unchanged (Schleifer & Vishny, 1997, pp. 37-53). This would have meant that the potential profit only increased, while the arbitrageurs are forced to halt their investment, which is also the biggest risk in arbitrage (Lamont & Thaler, 2003, p. 200). The focus on recent returns stems from the fact that arbitrage firms are very secretive about their results; they obviously do not want to share the very complex methods that cause them to earn that much money. Even if they would tell their investors exactly what they were doing, many would not understand it or would not believe that they were telling the truth, as it would range from

(16)

hard to impossible for them to verify the information they were given. As a result, investors in arbitrageurs generally can only make assumptions on past returns.

Nevertheless, arbitrageurs may also close out a position themselves, without investor pressure, when recent data influences their beliefs about the true value of the assets, or if they are risk-averse and do not want to risk running out of capital to hold their position on a trade (Schleifer & Vishny, 1997, pp. 47-48). The combination of this and the forced divestment due to investors who pull their capital, may cause prices to continue to diverge substantially before they return to their true value in the end.

Schleifer and Vishny (1997, p. 50) also note an important finding that volatility does not necessarily increase the profitability of arbitrage. Considering that arbitrage in real life is not a hundred percent risk free, the fact that seemingly profitable arbitrage opportunities will occur with greater frequency as

volatility increases is often more than offset with the increase in risk relative to above-market profit rates. Another risk of arbitrage opportunities is that they carry the risk that they disappear while you are in the middle of the set of transactions you would perform to take advantage of the previously spotted arbitrage opportunity; this could lead to a loss of capital, which would generally be very small (Fenn et al., 2008, pp. 5-8). As the Bitcoin market most strongly resembles the foreign exchange market in structure, I have summarized some results and methodologies of arbitrage in the foreign exchange market in the next section to provide a basis for my own research, before I summarize the past research in Bitcoin arbitrage.

(17)

CHAPTER 2 Theoretical Framework

2.1

Triangular Arbitrage

In this section I will summarize a paper that describes the mechanics behind triangular arbitrage, which is the same kind of arbitrage that occurs in Bitcoin markets.

The largest volume of daily trading happens in the foreign exchange market, with about 3.2 trillion US dollars’ value being traded daily at the time of the paper written by Fenn et al. (2008, pp. 1-2), which has since increased to over 5.3 trillion US dollar (McLeod, 2014). Furthermore, it has liquidity throughout the 24 hours trading day. In this paper the focus is on triangular arbitrage within the foreign exchange market. This is a relatively simple arbitrage principle, and is also the arbitrage principle that I will analyze within my own research. An example of a triangular arbitrage opportunity would be to buy dollars for yen, exchanging the yen for euros, and subsequently trading the euros for dollars at an overall profit. However, in order to research such arbitrage opportunities, “a proper analysis requires availability of datasets with prices which are of sufficiently high-frequency and which are also executable” (Fenn et al., 2008, pp. 1-4), the latter of which means that the prices could have been traded upon, and were not merely indicative. Other research has been performed with indicative prices, but it has been found to be less reliable.

This poses some difficulties in analyzing such high-frequency markets, as the price updates occur extremely quickly and for that reason one must also have a dataset that encompasses such an

environment. Furthermore, one must be sure that performing a trade at these prices would in fact have been possible (Fenn et al., 2008, pp. 1-2).

The data used in Fenn’s paper was provided by HSBC bank. The examined data consists of continuous executable prices for the following currency pairs: EUR/USD, USD/CHF, EUR/CHF, EUR/JPY and USD/JPY. The authors looked at triangular arbitrage opportunities occurring in the subsets { EUR/USD, USD/CHF, EUR/CHF } and { EUR/USD, USD/JPY, EUR/JPY } for the total of about a month’s data. The existence of an arbitrage opportunity was measured by the product of each exchange rate; one which has a result of above 1 would be a positive arbitrage opportunity (Fenn et al., 2008, pp. 1-5).

Fenn et al. (2008, pp. 5-8) have found in their research that, as they expected, the product is generally slightly below 1 as a result of the difference in bid and ask prices; a few times it will be slightly larger allowing for arbitrage opportunities. As a result, they have found just under 21,400 arbitrage

opportunities, amongst 10.4 million total data points in the month analyzed. To test how profitable these would actually be, they continued to look at the time those were present. They found that, “although some opportunities appear to exist for in excess of 100 seconds, for both currency groups 95% last for 5

(18)

technology, this could still mean that in some cases a trader’s arbitrage profits may disappear while he is in the middle of his sequence of currency swaps; this would mean he would have to swap back at a small loss of a few basis points in most cases.

In order to guard against this risk, they looked at the magnitude of arbitrage profits afterwards (Fenn et al., 2008, pp. 8-9). They found that almost all trades occur with less than a basis point in profits; this means that there is hardly any arbitrage profit to be gained, particularly so because there will not be that much offered on the market of those currencies for those specific arbitrage prices. These profits have further decreased as technology made it possible for computers to automatically trade at an ever quicker speed (Fenn et al., 2008, pp. 13-15); after accounting for transaction fees, they are realistically

nonexistent. This all goes towards showing how important transaction fees are in arbitrage profit estimations.

2.2

Past Research in Bitcoin Arbitrage

Zhou (2015) has written a thesis on Bitcoin in general. His analysis did involve a little analysis of Bitcoin markets. First, he found that the bid-ask spread of Bitcoin varied from day to day and has a clear,

decreasing trend over time towards around 0.3% (Zhou, 2015, p. 91). This would suggest the bitcoin market itself is a mature market, even though the product itself is not.

Second, he analyzed the opportunities for cross-currency arbitrage in Bitcoin. He used pre-aggregated data for a crude analysis. He simulated arbitrage strategies which consist of buying one Bitcoin with dollars, subsequently converting the Bitcoin to euro, Chinese yuan or British pounds at the day’s conversion rate and to exchange the foreign currency back to dollars in the end.

He reasoned that there could be two explanations for the difference in Bitcoin prices. One would be that changes in the exchange rates of conventional currencies are not represented in Bitcoin markets quickly enough. The other would be that US dollar-denominated exchanges are much more active than their counterparts. This difference in activity would cause the price differences due to regional disparity (Zhou, 2015, p. 93). His results are shown in the graph on the next page. Please be aware that his graph is

(19)

Figure 4. Bid Ask Spread in Dollars

Source: Zhou, 2015, p. 91

The graph, though crude in origin, indicates a decreasing amount of arbitrage profits over time,

particularly so for trades against the euro and Chinese yuan, which near 0. The continuous British Pounds arbitrage profit can be explained as a liquidity issue, as the British Pound is not an often chosen currency in Bitcoin markets. Zhou (2015, pp. 94-95) concludes from these findings that the Bitcoin markets are increasingly efficient, and states that this means an increased maturity of Bitcoin itself.

Figure 5. Arbitrage Profit as a % of Bitcoin Price

(20)

Smith equates Bitcoin to digital gold in both design and behavior, and researches the similarities between them (2015, pp. 2-3). His main research focus is on Bitcoin-implied exchange rates, which are the relative price of Bitcoin as denominated in different currencies. With this research he explores how Bitcoin prices are affected by changes in the currency markets and vice versa. He then redoes the same calculations on the price of gold, in order to show the strong similarities between gold and Bitcoin.

His data includes Bitcoin prices in US dollars, British pounds, euros and Australian dollars (Smith, 2015, p. 6). This data was from the Mt. Gox exchange at 12:00 am GMT (UTC) for the timeframe of September 1st, 2011 through January 31st, 2014. The “conventional market exchange rates as well as gold prices were

obtained from the St. Louis Fed’s FRED database. The nominal exchange rates are the “noon buying rates in New York City for cable transfers payable in foreign currencies.” While gold prices are 3:00 p.m. (London Time) fixing prices which prevailed in the London Bullion Market” (Smith, 2015, p. 7).

He found that while bitcoin prices are highly volatile and not strongly correlated with nominal exchange rates, as evidenced in other research, but that relative bitcoin prices are less volatile and highly dependent of nominal exchange rates (Smith, 2015, pp. 2-3). This would imply no or little inter-currency arbitrage opportunities. A weakness in his research is that he compared only three currency pairs, namely the US dollar against the others. He did not check for arbitrage opportunities involving a currency pair that did not include the US dollar.

The dependency he found is completely one-sided. Bitcoin prices are strongly affected by changes in the conventional currency markets, however this does not hold the other way around (Smith, 2015, pp. 2-3). This is exactly the same with gold, which is strongly influenced by the currency markets but does not (strongly) influence them in return. This relationship is explained as a result of arbitrage. As Smith (2015, p. 7) wrote, “when the bitcoin (or gold) implied exchange rate finds itself out of parity with the

conventional market rate there exists an opportunity for arbitrage. As agents take advantage of these arbitrage opportunities the exchange rates are driven back together. For example, suppose the implied dollar-euro rate was greater in the bitcoin market than in the conventional market. This means the euro is relatively stronger in the bitcoin market than in the conventional market. Thus, a trader could exchange dollars for euros in the conventional market (where euros are relatively cheap) and take those euros to buy bitcoins in the bitcoin market (where euros are relatively valuable). The purchase of bitcoins with euros drives up the euro price of bitcoin thereby driving down the implied exchange rate.” The logical explanation as to why Bitcoin and gold prices are led by the foreign exchange market, but not the other way around, is that the market capitalization of the US dollar is about 2,000 times as large as Bitcoin’s market capitalization, and the gold market is similarly much smaller, though substantially larger than the Bitcoin market (Smith, 2015, pp. 11-14).

(21)

Smith (2015, pp. 13-14) further writes that the deviations of the Bitcoin implied exchange rates and the foreign currency pairs are greater than those of the gold implied exchange rates, which he attributes to larger transaction costs for Bitcoin. He concludes that one should think about Bitcoin as digital gold. Moreover, he states that more than half of the cryptocurrency’s price deviations are as a result of movements in the foreign exchange market, but emphasizes the latter is not the sole reason for Bitcoin’s high volatility.

Hur, Jeon and Yoo (2015, pp. 0-6) state that “the purpose of this paper is to determine the extent to which [the] Bitcoin market is dominated by speculative investments. The paper studies arbitrage opportunities in Bitcoin and how the trading volume and the price of Bitcoin react to them. The results of the empirical analysis show the existence of a positive relationship between the arbitrage opportunities and both the Bitcoin trading volume and the Bitcoin price.”

The authors research this by comparing data from a Korean Bitcoin exchange, Korbit, against Bitcoin open market data from Quandl (Hur, Jeon & Yoo, 2015, pp. 1-6). They mainly look at what happened when the transaction fee on the Korean exchange was lifted. They found that influence of the level of price deviation on the volume of trade and the Bitcoin price in Korbit increased. Furthermore, they found that price gap between the Bitcoin market price and the Korbit price was positively related to Korbit’s Bitcoin trading volume. All these results are logically a result of increased arbitrage opportunities when transaction fees disappear as well as making the exchange more interesting for speculative investors when they do not face transaction costs. The authors are of the opinion that speculative actions are to be

avoided, and hence would suggest to implement a small transaction fee, as even the presence of very small transaction fee deters a lot of speculative investment.

Badev and Chen (2014, p. 4) have found that more than half of the Bitcoin at the time had not been used in any transaction the past three months and that a third had not been used in a year. They believe this indicates the volume of bitcoin used for investment purposes. For the time period of which the authors have data from a Bitcoin gambling website called Satoshi Dice, they have found that almost all small payments below $100 can be associated with this service (Badev & Chen, 2014, p. 22). Additionally, the authors have argued that the daily variance of the Bitcoin price has not changed in the past two years, despite significant changes in the price (Badev & Chen, 2014, p. 4). Two graphs they created, visible below, show this relationship. It can be seen that the volatility remains quite constant over the period of two years, aside of a few unpredictable outliers.

They used the site bitcoincharts.com to gather data on Mt. Gox, Bitstamp, BTC-e, BTC China, OKCoin and Bitfinex, which were the largest exchanges at the time (Badev & Chen, 2014, p. 17).

(22)

Figure 6. Exchange Rate USD/BTC

Source: Badev & Chen, 2015, p. 23

Figure 7. Intra-day Volatility USD/BTC

Source: Badev & Chen, 2015, p. 23

Next, they examine the availability of cross-currency arbitrage amongst different exchanges, with the goal of estimating how well the Bitcoin network can be used to make transfers of wealth in different currencies (Badev & Chen, 2014, pp. 23-25). After correcting for the Mt. Gox exchange’s approaching bankruptcy that caused irregular trading habits at the exchange, they compiled the following graphs. All lines consist of the weighted average of Bitcoin trades in that currency on that day, converted back to US dollars at the day’s foreign exchange market rates.

Figure 8. Exchange Rates – Converted Back to USD

(23)

Figure 9. Normalized Exchange Spread Figure 10. Spread Excluding Mt. Gox

Source: Badev & Chen, 2015, p. 24

As can be seen in these graphs, there are still significant cross-currency pricing inconsistencies in the first half of the graph, while these dim in the second half. They interpret “this evidence as lack of depth of the exchange markets for bitcoins and as costly exchange rather than as unexploited arbitrage opportunities”, meaning that they believe these price inconsistencies are not profitable to take advantage of.

2.3

Key Findings

Zhou (2015)

Data retrieved from Quandl.com.

Key findings: Bitcoin’s bid-ask spread and arbitrage profits are decreasing towards

zero.

Smith (2015)

Data retrieved from bitcoincharts.com, consisting of:

Bitcoin prices from the Mt. Gox exchange at 12:00 am GMT, denominated in US Dollars, British Pounds, Euros, and Australian Dollars.

Data retrieved from the St. Louis Fed’s FRED database, consisting of:

Daily conventional market exchange rates and gold prices.

(24)

Key findings: Changes in Bitcoin prices occur for a large part due to relative price

changes in the conventional foreign exchange market. This is a result of the Bitcoin-implied currency exchange rates equaling the market exchange rates through the

efforts of arbitrageurs. In this regard, Bitcoin strongly resembles gold.

Hur, Jeon & Yoo (2015)

Data retrieved from the Korean Bitcoin exchange Korbit, consisting of Bitcoin prices.

Data retrieved from Quandl, consisting of open source data.

Analyzed timespan: mid-November 2013 to mid-January 2015.

Key findings: Shows the importance of transaction costs as they can significantly

affect arbitrage opportunities and speculative Bitcoin investments resulting in a much greater use of a platform that does not have these costs.

Badev & Chen (2014)

Data retrieved from bitcoincharts.com, consisting of:

Bitcoin prices of the exchanges Mt. Gox, Bitstamp, BTC-e, BTC China, OKCoin and Bitfinex.

Analyzed timespan: Focus on January 2013 to July 2014.

Key findings: Authors argue that the half and the third of Bitcoin which had not been

used in transactions for three months respectively a year estimate the amount of Bitcoin used for investment purposes.

They also estimated that there are significant price inconsistencies in cross-currency Bitcoin trading but attribute these to costly exchange and a low market depth instead

(25)

CHAPTER 3 Data

For my analysis I gathered data from bitcoincharts.com consisting of bitcoin price data of the BTC/USD, BTC/EUR and BTC/CNY currency pairs on the following exchanges: Anxbtc, Bitcurex, Bitfinex, Bitstamp, Bitcoin.de, Btc-e, BTC China, Coinbase, Hitbtc, ItBit, Kraken, LakeBTC, Mt Gox, OKCoin, TheRockTrading and Zyado. Bitcoinmarkets.com has also been used as a source of data for past research, but is now updated with recent trading data. I have chosen all these exchanges as those represent almost the entirety of the traded bitcoin volume; those with a lower trading volume than those included have a comparably negligible trading volume. Furthermore, I have included some very large exchanges that have since closed to present data of earlier points in time, as back then they were of great importance in

arbitrage trading. I only examined the BTC/USD, BTC/EUR and BTC/CNY as currency pairs as they almost cover the entire traded volume and any other currency pairs would have resulted in too many missing data points due to sporadic trading. I have chosen to analyze all data from January 1st, 2014 to

January 1st, 2016 at 12:00am UTC. This time span is long enough to make a proper analysis of the

arbitrage opportunities in Bitcoin markets. An earlier start date would result in few exchanges and clear pricing inconsistencies due to the novelty of the market that has long since dissipated.

As the data was not in a ready-to-use format, this first had to be converted. As there was not a lot of documentation on how to proceed, and some of it proved to be erroneous, this proved quite an effort in itself. The general methodology explained in the next paragraph is explained in more detail in a short paper under review for the Stata Journal co-written with professor Christopher Baum at Boston College, who helped me to transfigure the data to a workable format (Baum & Bibo, 2016, pp. 1-3). The STATA output of the transfiguration of a single exchange’s currency pair, described below, has been included in Appendix A.

First, I converted the UNIX-timestamp to a timestamp with which STATA could work. The trades recorded in the data occurred at sporadic intervals; there were no multiple trades every second on every exchange. For this reason, the trades needed to be grouped in intervals in order to have matching intervals during which most exchanges would have had recorded trades that can be analyzed for arbitrage

opportunities. In this paper a sixty-second time span was used, as a shorter time interval would have resulted in too few observations to be placed in those actual timeframes, and a longer time interval would create doubt as to what the actual traded price would have been in such a long time span. Ideally there would be no need to group data in intervals at all so that the analysis is the most accurate and reliable, but as mentioned before Bitcoin trading is yet too irregular and sporadic to make that viable. As 73% of all sixty-second intervals had at least one observed transaction in the Bitstamp exchange, this seemed to be a proper interval; as these exchanges operate 24/7 there are a few times during the day during which trading is bound to be less frequent, because a part of the exchange’s user base is asleep. Hence, aiming for a

(26)

percentage close to 100% would result in such large time intervals that a pricing inconsistency amongst exchanges, or even within the same exchange, is almost guaranteed.

The missing values were filled with linear progression of the most nearby recorded values through the 𝑖𝑝𝑜𝑙𝑎𝑡𝑒 command. This was necessary in order to estimate the prices at which a trade could have happened when there is not one recorded trade at a particular exchange’s currency pair. For example, an exchange could have been trading at $500 per Bitcoin, while all others were trading at $480. This would indicate a clear arbitrage opportunity. However, if no trade occurred at the former exchange in a

particular interval, the arbitrage opportunity would not be noticed in the regression analysis. Filling in the missing values with the 𝑖𝑝𝑜𝑙𝑎𝑡𝑒 command solves this problem. Ideally, the bid-ask prices would be recorded for all time intervals for all exchanges, however this data is unavailable. The only available data consists of the actual trades that occurred amongst these exchanges without mention whether a bid or ask offer was completed. In this paper it is assumed that if Bitcoin was traded at different prices across exchanges with a significant difference in price, an arbitrage opportunity would have been present regardless of whether the completed trades were bid or ask offers. These steps were repeated for every currency pair.

The exchange’s transaction fees are listed on the next page. This data was found by looking at each individual exchange’s current fees listing on its relative website and using https://web.archive.org to look for changes in the listed rates in combination with a search of articles announcing the changes to find the exact dates. Withdrawal and deposit fees have been ignored for simplicity. Finally, the daily currency exchange rates of the USD/EUR and CNY/USD currency pairs were retrieved from the Federal Reserve Economic Data, completing the dataset.

In order to make the data from the FRED useable in STATA, it had to be slightly edited. All N/A results due to holidays were removed with the replace command in Excel. The currency exchange rates from January 2nd were copied into those of January 1st, as there was no trading on January 1st. Subsequently, the

dashes were removed to make the currency exchange observation dates variables have a format that STATA can recognize, through the use of moving the dates to a notepad file for editing and back again as Excel was unaccommodating. Afterwards, a calendar variable was created with continuous days of January 1st 2014 through January 1st 2016. This variable was treated the same way as the exchange rates

to end up resembling STATA’s format. Following this treatment, it was copied into an empty STATA file and adjusted to be recognized as a date, as shown in Appendix B. Next, the observation dates and

recorded exchange rates were copied into an empty STATA file. The dates were also adjusted to be recognized as such, after which the files were saved as 𝑢𝑠𝑑𝑒𝑢𝑟. 𝑑𝑡𝑎 and 𝑢𝑠𝑑𝑐𝑛𝑦. 𝑑𝑡𝑎.

(27)

Table 1. Exchange Trading Fees Jan 1st, 2014 – Jan 1st, 2016

Exchange % fee based on $30k monthly trade volume

Anxbtc.com Jan - May 2014: 0.1%

May 2014 onwards: 0%

Bitcurex.com 0.33%

Bitfinex.com Jan 2014 - Aug 5, 2015: 0.15%

Aug 5, 2015 onwards: 0.20%

Bitstamp.net Jan 2014 - Mar 2, 2015: 0.32%

Mar 2, 2015 onwards: 0.24%

Bitcoin.de 1%

Btc-e.com 0.2%

BTC China Jan - Mar 21st, 2014: 0.1%

Mar 21st, 2014 onwards: 0%

Coinbase.com Jan 2014 - Apr 1, 2015: 0%

Apr 1, 2015 onwards: 0.25%

Hitbtc.com 0.1%

Itbit.com Jan - Jun 4, 2014: 0.5%

Jun 4, 2014 onwards: 0.2%

Kraken.com

Jan - Sep 1, 2014: 0.16% Sep 1, 2014 - Aug 1, 2015: 0.30%

Aug 1, 2015 onwards 0.24%

LakeBTC.com Jan - Dec 16, 2014: 0.5%

Dec 16, 2014 onwards: 0.2%

Mt Gox 0.6%

OKCoin.com Jan - Nov 23, 2014: 0.3%

Nov 23, 2014 onwards: 0.18% TheRockTrading.com Jan 2014 – Oct 30, 2014: 1% Oct 30, 2014 – Sept 3, 2015: 0.5% Sept 3, 2015 onwards: 0.20% Zyado.com 0.23%

Sources: Individual exchanges’ historical websites, various articles and communications.

The currency pairs were then 𝑚𝑒𝑟𝑔𝑒𝑑 upon the calendar variable, in order to be able to use 𝑖𝑝𝑜𝑙𝑎𝑡𝑒 again to fill in the missing values for each holiday and weekend on which no trading occurred, as Bitcoin trading is 24/7. This final file was called 𝑒𝑥. 𝑑𝑡𝑎. In order to eventually 𝑚𝑒𝑟𝑔𝑒 the currency data with the exchange data, each day’s currency values were assigned the same 𝑤ℎ𝑖𝑐ℎ𝑖𝑛𝑡 values that corresponded to the first interval occurring on each consecutive day. Afterwards, the exchange data was 𝑚𝑒𝑟𝑔𝑒𝑑 upon a file with all the 𝑤ℎ𝑖𝑐ℎ𝑖𝑛𝑡 intervals. This allowed for the use of 𝑖𝑝𝑜𝑙𝑎𝑡𝑒 on the currency data to fill in a proper currency exchange rate at every interval. When this was completed, the currency data was 𝑚𝑒𝑟𝑔𝑒𝑑 with the first currency dataset on 𝑤ℎ𝑖𝑐ℎ𝑖𝑛𝑡.

(28)

Once the currency data had been adjusted, the transaction fees were added in for each exchange as seen in Appendix C. This was done by generating the variable 𝑓𝑒𝑒, which was always given value of the

exchange fee at January 1st 2014. If the exchange had a change in charged fees during the observation

period, this was adjusted for by looking up the interval correlating with the date the fees changed with the help of the earlier calendar variable, now named 𝑐𝑎𝑙. Then, all values of the variable after this moment were changed to the new fee; this process was repeated if there were two changes across time.

Furthermore, all the previous variables recorded for the individual exchanges were recreated to fit general variables to be compared in the future. These were 𝑠𝑑 for the standard deviation, 𝑛𝑜𝑏𝑠 for the number of observations in the interval, 𝑣𝑜𝑙 for the volume in the interval, min and max for the minimum respectively maximum price recorded in the interval, 𝑓𝑚𝑖𝑛 and 𝑓𝑚𝑎𝑥 which where the 𝑚𝑖𝑛 and 𝑚𝑎𝑥 variables corrected for the transaction fee variable 𝑓𝑒𝑒.

Upon completion of these transformations, each exchange was given a unique identifier for the exchange called 𝑒𝑥𝑛𝑎𝑚𝑒 and an identifier for its currency pair, with 𝑒𝑥𝑖𝑑 equaling 1 for a USD currency pair, 2 for a EUR currency pair, and 3 for a CNY currency pair. This can be seen in Appendix D. The file

𝑎𝑛𝑥ℎ𝑘𝐶𝑁𝑌𝑒𝑥𝑒𝑑. 𝑑𝑡𝑎, which held the currency information aside of only the exchange’s data, was renamed 𝑑𝑎𝑡𝑎𝑠𝑒𝑡. 𝑑𝑡𝑎. All the other datasets were then appended to this file, as seen in Appendix E. Afterwards, these were sorted by the 𝑤ℎ𝑖𝑐ℎ𝑖𝑛𝑡 variable so that all the values of all exchanges appeared neatly below each other in each interval, as seen in Appendix F. Then, the highest maximum price across all exchanges per interval was identified in the variable 𝑟𝑝𝑚𝑎𝑥. The lowest price was similarly identified in 𝑟𝑝𝑚𝑖𝑛. The spread, or arbitrage profit given no transaction costs, was then calculated in 𝑟𝑝 by

subtracting these two values from each other. The profit as a percentage of the minimum price was then calculated in the variable 𝑟𝑝𝑝𝑒𝑟𝑐. These same steps were repeated to create similar variables that include the transaction fee, named 𝑟𝑓𝑝𝑚𝑖𝑛, 𝑟𝑓𝑝𝑚𝑎𝑥, 𝑟𝑓𝑝 and 𝑟𝑓𝑝𝑝𝑒𝑟𝑐.

However, when looking at the data, it seemed that the OKCoin exchange was particularly off during some data intervals. As it turned out, by looking at the earlier created 𝑜𝑘𝑐𝑜𝑖𝑛𝐶𝑁𝑌𝑒𝑥𝑒𝑑. 𝑑𝑡𝑎 file, there were large time spans during which there were no trades on OKCoin, presumably due to it being closed during these times. Therefore, the 𝑖𝑝𝑜𝑙𝑎𝑡𝑒 command caused a range of intervals to become inconsistent. These intervals were observed to have been: 748830 – 844667, 897178 – 844667, 941554 – 968782, 969527 – 969721, 973018 – 987709 and 1005612 – 1010067. In order to resolve this, I sorted all data in the main dataset by 𝑒𝑥𝑛𝑎𝑚𝑒, as observed in Appendix F. This allowed all of the results from the OKCoin exchange to appear in a row, starting at row 23126401. Then I created the variable 𝑜𝑘𝑓𝑖𝑥3that equaled 𝑤ℎ𝑖𝑐ℎ𝑖𝑛𝑡 in the rows currently belonging to OKCoin variables. After that I sorted the variables again by 𝑜𝑘𝑓𝑖𝑥3, as previously the OKCoin data was not in chronological order. Now, I was able to replace all the incorrect ranges’ 𝑚𝑖𝑛, 𝑚𝑎𝑥, 𝑓𝑚𝑖𝑛 and 𝑓𝑚𝑎𝑥 to missing values. Afterwards, I sorted the data again by

(29)

𝑤ℎ𝑖𝑐ℎ𝑖𝑛𝑡 and dropped 𝑜𝑘𝑓𝑖𝑥3 and the earlier calculated values that compared the data across all exchanges per interval and recreated these variables.

Similarly, it turned out that the Mt. Gox upcoming bankruptcy severely affected the results, as people realized that something was going on. Therefore, I decided to remove all these data from this exchange from the dataset. As we do not need to get specific intervals within this particular exchange’s dataset, it was sufficient to sort by 𝑒𝑥𝑛𝑎𝑚𝑒 and to find that all its results were in the interval 19972801 – 23126400, and dropping this range of observations. Afterwards, the same variables as before were dropped and recalculated, and the results were again sorted by 𝑤ℎ𝑖𝑐ℎ𝑖𝑛𝑡. This procedure is shown in Appendix G. Appendix H shows a further trim of the dataset until the outliers are sufficiently reduced that they will not affect the results. Finally, the volatility was recalculated as the average of the volatility plus the fifteen previous observations plus the fifteen subsequent observations. In order to help with this, the data was sorted by 𝑒𝑥𝑛𝑎𝑚𝑒1 𝑤ℎ𝑖𝑐ℎ𝑖𝑛𝑡 which allows all the data to be sorted by exchange and in the correct order of intervals, which facilitates the calculations. In addition to this, a variable was created which measures the average of this new volatility across all exchanges. The procedure can be observed in Appendix I.

When the highest spread after transaction fees is a trade in two different currencies, a conversion fee is applied to the sell price. Originally, a 0.1%, 0.5% or 1% fee would be applied to replicate the currency conversion fees a bank, corporation or individual would face. However, the data made an alaysis with fees of 0.5%, 1% and 3% more interesting. The idea behind these exchange fee-corrected values is that every time the best possible spread after exchange transaction fees involves a currency swap, this low, medium or high fee gets deducted from the sale price beforehand. This makes it very common for a top spread to no longer be the best option, as you would save on fees by selling on another exchange that uses the same currency you bought the bitcoins, or similarly, by buying your bitcoin on a different exchange in order to buy with the same currency you sell for. Therefore, a matrix of all buy and sell options needs to be checked for the second best option, to see whether that results in a better post-currency fee price. If it also involves a cross-currency trade, it loops again to the next option, until either a non-currency swap pair is found that has a better end result than the original trade, or the original’s trade is of higher value including the currency fee than all other alternatives. This is done for the low, medium and high fee, all of whom get a absolute and relative profit variable as a result. The steps undertaken to input and calculate these variables and numbers are visible in Appendix J.

(30)

CHAPTER 4 Method

The following variables are available in the final dataset of 23 pairs.

Table 2. Variables

Variable Description

whichint Interval in minutes since Jan 1st 2014

usdeur Ipolated daily USD/EUR currency rates

usdcny Ipolated daily USD/CNY currency rates

fee The transaction fee of each individual exchange, throughout the datasets time span

sd The standard deviation of the price in the sixty-second interval

nobs Number of transactions in the interval

vol Volume of bitcoin sold in the interval

min Minimum dollar-based price recorded at each exchange in the interval

max Maximum dollar-based price recorded at each exchange in the interval

fmin Minimum dollar-based price at each exchange in the interval corrected for fee

fmax Maximum dollar-based price at each exchange in the interval corrected for fee

exname Unique exchange and currency pair identifier

exid Currency pair identifier

exname1 Exname in different style format

rpmax The maximum price across all exchanges within the same sixty-second interval

rpmin The minimum price across all exchanges within the same sixty-second interval

rp The absolute arbitrage profit = rpmax - rpmin

rpperc The relative arbitrage profit = rp / rpmin

rfpmax The maximum price across all exchanges within the same interval corrected for fee

rfpmin The minimum price across all exchanges within the same interval corrected for fee

rfp The absolute arbitrage profit including transaction fee = rpmax - rpmin

rfpperc The relative arbitrage profit including transaction fee = rp / rpmin

elrfp Absolute arbitrage profit corrected for low currency fee

emrfp Absolute arbitrage profit corrected for medium currency fee

ehrfp Absolute arbitrage profit corrected for high currency fee

elrfpperc Relative arbitrage profit corrected for low currency fee

emrfpperc Relative arbitrage profit corrected for medium currency fee

ehrfpperc Relative arbitrage profit corrected for high currency fee

sd31 Variable sd recalculated to reflect a moving average

sdall The average of variable sd31 across all exchanges

With these variables, I will be testing the law of one price for the Bitcoin market. This would be achieved by regressing those variables on each other, and then observing the data output and graphs and by

examining the correlation tables. If the 𝑝 − 𝑣𝑎𝑙𝑢𝑒 < 0.05 then it will be considered significant. Regressing these variables on each other will give that result.All tests will be with the robust standard errors.

(31)

The formula for the law of one price is as follows; I will also be checking this condition for when transaction and currency exchange fees are included:

(1) 𝑃 = 𝑃∗× 𝐶 𝑖 𝑊ℎ𝑒𝑟𝑒 𝑃 = 𝑝𝑟𝑖𝑐𝑒 𝑖𝑛 𝐵𝑖𝑡𝑐𝑜𝑖𝑛 𝑖𝑛 𝑈𝑆𝐷 𝑃∗= 𝑝𝑟𝑖𝑐𝑒 𝑖𝑛 𝐵𝑖𝑡𝑐𝑜𝑖𝑛 𝑖𝑛 𝑓𝑜𝑟𝑒𝑖𝑔𝑛 𝑐𝑢𝑟𝑟𝑒𝑛𝑐𝑦 𝐶𝑖= 𝑐𝑢𝑟𝑟𝑒𝑛𝑐𝑦 𝑐𝑜𝑛𝑣𝑒𝑟𝑠𝑖𝑜𝑛 𝑟𝑎𝑡𝑒 (2) 𝑃 × 𝜏𝑗= 𝑃∗× 𝜏𝑖× 𝐶𝑖 𝑊ℎ𝑒𝑟𝑒 𝑃 = 𝑝𝑟𝑖𝑐𝑒 𝑖𝑛 𝐵𝑖𝑡𝑐𝑜𝑖𝑛 𝑖𝑛 𝑈𝑆𝐷 𝑃∗= 𝑝𝑟𝑖𝑐𝑒 𝑖𝑛 𝐵𝑖𝑡𝑐𝑜𝑖𝑛 𝑖𝑛 𝑓𝑜𝑟𝑒𝑖𝑔𝑛 𝑐𝑢𝑟𝑟𝑒𝑛𝑐𝑦 𝐶𝑖= 𝑐𝑢𝑟𝑟𝑒𝑛𝑐𝑦 𝑐𝑜𝑛𝑣𝑒𝑟𝑠𝑖𝑜𝑛 𝑟𝑎𝑡𝑒 𝜏𝑖,𝑗 = 𝑡𝑟𝑎𝑛𝑠𝑎𝑐𝑡𝑖𝑜𝑛 𝑓𝑒𝑒 𝑓𝑜𝑟 𝑡ℎ𝑒 𝑒𝑥𝑐ℎ𝑎𝑛𝑔𝑒 𝑖, 𝑗 𝑤𝑒𝑟𝑒 𝑏𝑜𝑢𝑔ℎ𝑡 𝑜𝑟 𝑠𝑜𝑙𝑑 𝑎𝑡 (3) 𝑃 × 𝜏𝑗= 𝑃∗× 𝜏𝑖× 𝐶𝑖× 𝐸𝑖 𝑊ℎ𝑒𝑟𝑒 𝑃 = 𝑝𝑟𝑖𝑐𝑒 𝑖𝑛 𝐵𝑖𝑡𝑐𝑜𝑖𝑛 𝑖𝑛 𝑈𝑆𝐷 𝑃∗= 𝑝𝑟𝑖𝑐𝑒 𝑖𝑛 𝐵𝑖𝑡𝑐𝑜𝑖𝑛 𝑖𝑛 𝑓𝑜𝑟𝑒𝑖𝑔𝑛 𝑐𝑢𝑟𝑟𝑒𝑛𝑐𝑦 𝐶𝑖,𝑗= 𝑐𝑢𝑟𝑟𝑒𝑛𝑐𝑦 𝑐𝑜𝑛𝑣𝑒𝑟𝑠𝑖𝑜𝑛 𝑟𝑎𝑡𝑒 𝜏𝑖,𝑗 = 𝑡𝑟𝑎𝑛𝑠𝑎𝑐𝑡𝑖𝑜𝑛 𝑓𝑒𝑒 𝑓𝑜𝑟 𝑡ℎ𝑒 𝑒𝑥𝑐ℎ𝑎𝑛𝑔𝑒 𝑖, 𝑗 𝑤𝑒𝑟𝑒 𝑏𝑜𝑢𝑔ℎ𝑡 𝑜𝑟 𝑠𝑜𝑙𝑑 𝑎𝑡 𝐸𝑖 = 𝑐𝑢𝑟𝑟𝑒𝑛𝑐𝑦 𝑐𝑜𝑛𝑣𝑒𝑟𝑠𝑖𝑜𝑛 𝑟𝑎𝑡𝑒 𝑒 (4) 0 = 𝑃 × 𝜏𝑗− 𝑃∗× 𝜏𝑖× 𝐶𝑖× 𝐸𝑖

The variables 𝑚𝑖𝑛 and 𝑚𝑎𝑥 as well as 𝑟𝑝𝑚𝑖𝑛 and 𝑟𝑝𝑚𝑎𝑥 correspond with the first equation, as those are all brought back to dollar values if they are not originally traded in that currency. The variables 𝑓𝑚𝑖𝑛 and 𝑓𝑚𝑎𝑥 as well as 𝑟𝑓𝑝𝑚𝑖𝑛 and 𝑟𝑓𝑝𝑚𝑎𝑥 correspond with the second equation, as those are the same variables mentioned before but then corrected for the exchanges’s trading fees. The third equation has to be rewritten to the fourth, in order to have the variables correspond with 𝑒𝑙𝑟𝑓𝑝, 𝑒𝑚𝑟𝑓𝑝 and 𝑒ℎ𝑟𝑓𝑝; this shows that all equations can be seen as equalling their respective arbitrage profit to zero.

Additionally, I would be looking to see how time, the standard deviation, the pure minimum and

maximum prices, the minimum and maximum prices adjusted for transaction fees and the minimum and maximum prices adjusted for transaction fees and each of the currency conversion fees depend on each other.

(32)

CHAPTER 5 Results

The results of various regressions are listed below.

Table 3. Regression on Absolute Arbitrage Spread

Regression Number Time Interval Standard Deviation Mean of all SD Volume Total Volume

1 -.0000423 (-2754.22) 2 10.15332 (142.28) 3 107.9345 (864.70) 4 .0060375 (30.08) 5 .0012719 (69.52) 6 -.0000426 5.513137 .0069276 (-2673.39) (122.85) (210.23) 7 -.0000358 67.92872 .0028255 (-2293.42) (672.65) (160.77)

The dependent variable is rp.

The t-statistic is reported below the coefficient in parantheses.

All results are significant at the 1% significance level.

Table 4. Regression on Absolute Arbitrage Spread Corr. for Transaction Fees

Regression Number Time Interval Standard Deviation Mean of all SD Volume Total Volume

1 -.0000377 (-2443.31) 2 9.587205 (139.76) 3 101.9164 (847.82) 4 .0067871 (31.21) 5 .0023622 (111.84) 6 -.0000381 5.384104 .0073956 (-2373.11) (120.82) (210.05) 7 -.0000314 66.33886 .0033895 (-2002.96) (660.33) (171.90)

The dependent variable is rfp.

The t-statistic is reported below the coefficient in parantheses.

Referenties

GERELATEERDE DOCUMENTEN

We also look at the orbit method, where unitary irreducible representations of Lie groups are found, using geometrical objects called coadjoint orbits.. The orbit method is

In the former two chapters I aim to study if the 1970 UNESCO Convention, the ICOM Code of Ethics for Museums and the heritage professionals view on informing the public

We studied the diagnostic value of symptoms for the detection of unrecognized atrial fibrillation (AF), heart failure (HF), and coronary artery disease (CAD) and developed

ook die Blankes en Chinese - hulle onderdanige posisie en hoe hulle (Swartes veral) deur samewerking tussen die staat en mynbase, uitgebuit word.. Die werk is in drie

This year sees the 10th RESIM workshop, which is a good moment to look back on this series of workshops?. Partially, this will be a &#34;trip down memory lane&#34;: remembering

Deze vraag is verdeeld over twee verschillende hoofdstukken: in hoofdstuk drie werd er gekeken of de Women’s March door de respondenten wordt gezien als een feministische

Figure 2c shows untreated fluorescence intensity profiles near the anode at different reaction times, clearly visualizing the decrease of fluorescence intensity in time close to the

Russiese inmenging in Iran, Pa- lestina, Egipte, Indii', China,.. Boelgaryc, Rocmcnie,