I am really impressed by the project you are working on, using short selling is definitely a good idea to avoid fund transfer between exchanges (and the associated fees that would make arbitrage unprofitable).
But I have a few questions regarding how you tackle the inner risks of short selling. First of all, the potential loss while using short selling is (theoretically) infinite since the price has not an upper bound. Of course, since you are also buying, the winning would be as important as the loss. But this is true only if you strategy is perfectly market neutral, in other words: ONLY IF YOU BUY EXACTLY AT THE SAME TIME AS YOU SHORT SELL WITH EXACTLY THE SAME AMOUNT OF BTC. Your algorithm probably does not guarantee these two points so my question is did you try to assess the delay between short selling and buying? Did you assess the gap between them (in terms of btc amount)?
Thanks. The potential loss while using short selling is indeed infinite ...in theory. In reality, if your loss gets close to a defined amount of your account, you will get a margin call from the exchange. So you will never lose more than what you have on your margin account: if you only deposited $20 and you don't want to meet the margin calls then $20 will be your maximum loss.
That being said, Blackbird sends the two
long and
short orders at the same time. But if one is fully executed and not the other one (i.e. the market moved away from one order) then yes you won't be market neutral, that's correct. A solution would be to divide every order into child orders, e.g. a $50,000 order becomes 500 * $100 child orders. When you send your child orders you make sure than the number of already filled long orders is similar to the number of already filled short orders until all the orders are sent and fully filled. So the long/short unbalance would be $100 maximum at any time. That would be a nice implementation for Blackbird.
Meanwhile, note that to make sure the orders are almost instantly fully executed we do the following:
- we always cross the spread
- before we send an order we make sure that there is at least 3 times (by default) the liquidity in the order book than what we need for that order.
My second question is: you advise to use only small amounts to begin arbitraging (which is clearly prudent if we do not want to be ruined in a few minutes !). But if I run your algo, is my maximum loss really equal to my investment? Assume the algorithm goes crazy and order 1000btc for short selling! (The algo does need any money for that!) Assume the trend goes up... I could end up with 100000 dollars of debt due to the guys who borrowed me the btc even if I started to trade with 10$!!
How do you prevent this to happen, did you take this in account in your project or does the exchanges doing short selling prevent us from this event by rejecting too large short selling orders? If so what is the limit?
Again, you will get a margin call from the exchange if your potential loss is above the limit. If you don't meet the margin call then the exchange will close your BTC position, usually at market price, and their loss will be covered by your margin account. So yes, you could entirely lose your margin account, but not more.
Note that as for now, Blackbird doesn't deal with margin calls.