On triangular arbitrage

hi there, fellows

i’ve been working on modelling triangular arbitrage, so that one can

  1. determine the set of coins he would accept to trade (given the inventory risk)
  2. estimate the max profit (assuming the whole initial capital is traded through) on all tradable combinations of accepted coins (from item 1)
  3. how to trade the above, in an algorithm.
    it includes pseudo code to express the profit conditions.

in case you decide to implement it, it’ll be my pleasure clarify its aspects to ease you burden and speed up your dev time.

i believe triangular arbitrage allows the trader to profit from more popular coins that trade with a spread too tight for market making, still on a quasi market neutral trade.

the article is available for download in the link bellow.

best & thanks.
fernando a. bender

Thanks, this is a good overview of triangular arbitrage! We’re pretty familiar with that strategy, and I think it would pretty straightforward to add it to Hummingbot since we already have the regular arbitrage strategy.

I believe we would just have add a config question like “Do you want to run the bot across 2 or 3 trading pairs?” and prompt for the 3rd trading pair if users pick the latter. Afterwards, I think the logic of the arbitrage strategy mostly still applies.

We have a lot of other work in progress right now, but if there’s significant interest we could probably add this to the backlog. Are others interested in running a triangular arbitrage bot?

1 Like

hi there, feng. thanks for the reply.

the point a develop in the article is precisely more than 3 pairs.
i agree with you that it is straightforward 3 pairs.
but that limits the possibilities.
i’m sure you agree that there is much more money to be made other than what, say, ETH, BTC, LTC could yield.
this is why i suggest to specify the set of coins that one would like to consider for triangular arb.
then, the algo would split this combinations in tradable pairs and respective triples.
then, it’ll check for profits in each, in both senses (direct and reverse)
then it’ll rank them and trade the most profitable at that time.
i believe this maximizes the profitability of the operation by ensuring that, amongst the set of coins a trader would agree to arbitrage between their pairs, to be doing so with the most profitable ones.

thanks and best.
fernando a. bender

I see - yup, I agree that you could create this kind of strategy. I agree that this is more powerful than a normal triangular arb strategy and it makes sense for folks who want to maximize arbitrage opportunities.

As Hummingbot, our philosophy is to focus on “basic” strategies and show users how to customize the codebase to build logic like this. That’s why we will probably add triangular arb in the future, but we will focus more on adding exchange connectors and improving architecture and documentation to allow for greater customization.