86 points · by wbelk · 8y ago · 61 comments
The trick is to transform the graph by taking the negative log of the edge weights, which turns problem of finding a cumulative product > 1 into one of finding a negative sum loop. Then, you can just run the Bellman Ford algorithm and if it detects a negative cost cycle in the transformed graph, this corresponds to a positive arbitrage cycle in the original graph.
I always thought that was a neat application.
For cryptocoins it's nearly impossible. Because in most cases there's no idea when the actual transfer will be executed (if arbitraging between exchanges).
Concretely, imagine if every ten minutes you made an arbitrage buy on GDAX, and sell on BitFinex. As long as GDAX remains the “buy side” of the arbitrage, you will need to keep refilling your fiat funds at GDAX. You could “keep it filled,” but this becomes more unsustainable as you deplete your bankroll. You will eventually need to rebalance which will affect your velocity.
Disclaimer: I am not a financial professional.
Although I did recently see a more sophisticated example of arbitrage where you have money on all the exchanges at once and then you don't actually do a transfer, but you long on one and short on the other. However, I don't think it would work w/ bitcoin b/c I don't think shorting is much of a thing yet.
While transaction costs are easy to model in LPs, transaction clearing times are much harder. To the point where most opportunities are better described as phantasma.
Something is amiss here. Selling BTC to USD should be instantaneous even if cash withdrawal isn't no? Can you not look at the bid/ask and get executed at the bid on these exchanges?
I should be able to buy "cheaply quoted BTC" on Exchange A. Transfer to wallet at "higher quoted BTC" at exchange B, and executed a sale at the bid, even if I can't pull my USD into my actual bank account for a couple days.
The problem is that after this sequence of events, your USD is at the exchange with the higher priced BTC, while you need it at the exchange with the lower priced BTC to repeat the process. This requires moving the USD back via the traditional banking system, which is slow. The bank wires are the bottleneck.
Crypto-Crypto trading pairs don't have this problem, which is why the ETH/BTC spread for example is much smaller. The spread there probably just reflects fees and custodial risks that put a slight break on arbitrage.
I think it could also just indicate a lack of arbitrage being executed that keeps the price in line with other exchanges, meaning as a separate market the price is free to move higher / lower than other markets without necessarily indicating some sort of problem at the exchange. Normally this would be sort of synchronised to some level by arbitrage.
It seems like the arbitrage opportunity here is real and at least someone recently managed to profit ~10% from it:
https://www.reddit.com/r/BitcoinMarkets/comments/7kitks/arbi...
Although of course it is a bit slow which exposes you to lots of risks, so if you really wanted to do it you would need to hedge your exposure with other types of trades (shorts, etc) to try to limit the amount of risk.
I guess what I am thinking is just it could also be the exchange is operating fine, people are able to withdraw fiat, but it's just not worth the risk / effort to run arbitrage (or people just aren't doing it) and that could at least explain some price difference without there needing to be some sort of systemic problem at the exchange. There of course could be.
Seems like this might at least be a factor, but honestly I don't know what something like that would mean in terms of the impact on pricing on an exchange.
- You want to look at the order book, not just the last trade to compare the bid on one against the offer on another venue. The bid-offer spread can be very wide on some of these.
- Fees should be included.
- You still aren't pricing in counterparty risk, the biggest risk in crypto trading.
- I don't see CME and CBOT. The most reliably venues (you can replicate the spot with a multileg trade).
since those are futures, arbitraging them brings a bunch of other problems. mainly, keeping your (futures) account with enough cash to prevent liquidation (if there are drastic price swings). this is easier said than done because a short position requires 100% margin (afaik).
When things are running "normally" the arb space is pretty crowded especially amongst crypto-crypto pairs. Things like BTC-USD arbitrage between a USA exchange like GDAX and a Korean exchange are more of a regulatory arbitrage than a trading arbitrage (it takes a lot of work to get set up to trade and withdraw money from Korea to the USA to balance the sell-leg of the arb), so I would ignore those as they are really out of the scope of a HN tech discussion.
I think this site has come up before and I might have commented on it. If you are seeing these spreads and thinking about quitting your day job, don't.
Source: I did quit my day job and paired arbs like this account for about 0% of trading volume we do.
Shameless plug: if you are interested in this stuff feel free to contact me, info should be in my profile.
"if you try to arb it, all of a sudden the spread disappears" - well there's a lot of people trying to do the same thing because they think it is easy money and no one has thought of this great idea of buying LTC on one exchange and selling on GDAX, so when your incoming transfer of LTC completes so do a bunch of other transfers all doing the same arb trade (and those are automated and will beat you in the race).
The blogs you are referring to I do not hold in high esteem. I maintain high levels of doubt about exchanges as a whole and realize the extremely high counterparty risk more than most in the space, but their ideas about painting the tape and nefarious bots are misguided at best.
This "arbitrage" is a classic picking-up-nickels-in-front-of-steamrollers trade.
Wrote about the math here - https://steemit.com/arbitrage/@kesor/the-math-behind-cross-e...
dont ask
The last time I did this about a week or 2 ago, there was an 8% difference between GDAX and Bittrex. At the end of it, after fees and all that, I made 6%.
That is, if LTC is higher on exchange A than B, then you buy all you can on B and sell on A. You've made free money, but aren't strictly better than before because you have a different allocation across exchanges. But then you can later do a slow transfer that evens them out.