Hank Stoever

Calculating Bitcoin Arbitrage Profit

posted 5 months ago - 3 min read

I receive a lot of questions from people who want to hear hard numbers about what kind of yield you can get with an arbitrage strategy. There are so many different options for how you run your strategy, but the math is actually pretty basic to calculate yourself.

If you're unfamiliar with arbitrage or bitcoin arbitrage, start here first.

There are two variables that matter in an arbitrage strategy:

  1. The 'cutoff' level. This is the minimum percentage price difference between exchanges for conducting arbitrage. A higher cutoff will result in higher profit per trade, but will occur more rarely.
  2. The volume of currency you wish to trade during every arbitrage trade. This is largely based off how much you wish to invest.

Let's pick two arbitrary numbers and analyze what might happen with that scenario. We'll set cutoff to 5% and volume to 0.1 BTC.

A 5% arbitrage level is not very rare. Depending on how often you're scraping bitcoin tickers, you could find 5% price differences many times per day. bitcoin-analytics is a good place to get an idea of what current arbitrage levels are like. Let's imagine your bot scrapes price tickers once every 10 minutes and discovers arbitrage opportunities of at least 5% 5 times per day.

Here's how you'd get started:

  1. Deposit some number of USD (or other currency) into the lower-priced exchange. Let's use btc-e for this example, as it often has very low prices. We'll deposit $1000 dollars.
  2. Deposit only the amount you need to mitigate block chain confirmation time into the higher exchange, which we'll say is MtGox. Because our hypothetical bot only scrapes once every 10 minutes, there is a very low chance that we'll trade more than once an hour. That means we only need to deposit 0.1 (our volume parameter) into MtGox.

Then our bot discovers an arbitrage opportunity over 5% (our cutoff). Imagine the price on btc-e is $1000 and on MtGox it's $1050. Here's the order of events the automated trading bot would execute:

  1. Buy 0.1 BTC on btc-e. This will cost $100.60 with fees. 0.1 * 1.006 * 1000
  2. Sell 0.1 BTC on MtGox. This will earn you $104.37 after fees. 0.1 * 0.994 * 1050

The above scenario would earn us a net profit of $3.77.

You'd then wait to receive your BTC on btc-e, transfer that amount to MtGox, and rinse and repeat. Because we only started with $1000 and are typically spending ~$100 per trade, we'll only be able to execute 10 trades. If prices are relatively similar to the above situation, that would mean a total net profit of $37.70. This is a 3.77% yield on our $1000 investment.

The best part about all of this is that because our bot discovers 5% arbitrage opportunities 5 times a day, the entire above scenario would play out in just two days.

Using the compound interest formula:

E = P(1 + r)^t

Our expected portfolio after a year would be:

1000(1.0377)^(182.5)

= $857,248.14

$857248.14

Crazy numbers, I know. The great thing about this formula is you can tweak the numbers yourself.

Caveats

There are withdrawal and deposit fees when moving around USD or other currencies other than bitcoin, which severely lowers the profit level available. You should account for those fees in your net profit calculation.

In our scenario, we predicted that there would be a 5% price difference between btc-e and MtGox 5 times per day. This is not a factual value and the truth is that arbitrage opportunity fluctuates with volatility. However, a 5% arbitrage opportunity is extremely common with bitcoin, and there are entire days when arbitrage levels hover at around 10%. I encourage you to peer into the data yourself and come to your own conclusions.

comments powered by Disqus

Read Next

Testing Coffeescript Cake Tasks

Why I open sourced a bitcoin arbitrage bot