Bitcoin Forum
April 23, 2024, 08:10:20 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 4 5 [6] 7 8 »  All
  Print  
Author Topic: Bitcoin arbitrage on GitHub: ~2% monthly return, market-neutral long/short  (Read 38224 times)
mxnsch
Sr. Member
****
Offline Offline

Activity: 471
Merit: 252



View Profile
February 02, 2016, 03:16:57 PM
 #101

I got it resolved by removing 796.com for the moment and also opened an issue with them as i
* suspected it is an issue with their API
* wanted to know if they will enable short sells via API

;-)

██  ███  nope ██  ███
1713859820
Hero Member
*
Offline Offline

Posts: 1713859820

View Profile Personal Message (Offline)

Ignore
1713859820
Reply with quote  #2

1713859820
Report to moderator
1713859820
Hero Member
*
Offline Offline

Posts: 1713859820

View Profile Personal Message (Offline)

Ignore
1713859820
Reply with quote  #2

1713859820
Report to moderator
1713859820
Hero Member
*
Offline Offline

Posts: 1713859820

View Profile Personal Message (Offline)

Ignore
1713859820
Reply with quote  #2

1713859820
Report to moderator
The block chain is the main innovation of Bitcoin. It is the first distributed timestamping system.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
siameze
Legendary
*
Offline Offline

Activity: 1064
Merit: 1000



View Profile
February 02, 2016, 04:19:57 PM
 #102

I got it resolved by removing 796.com for the moment and also opened an issue with them as i
* suspected it is an issue with their API
* wanted to know if they will enable short sells via API

;-)

I will probably go ahead and patch it into mine tonight, but leave it commented out until after New Year. Exciting times though, 796 support is very nice.


                     ▀▀█████████▀████████████████▄
                        ████▄      ▄████████████████
                     ▄██████▀  ▄  ███████████████████
                  ▄█████████▄████▄███████████████████
                ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀████████
                                               ▀▀███▀
    ▄█▀█       ▄▀  ▄▀▀█  ▄▀   █████████████████▄ ██▀         ▄▀█
   ▄█ ▄▀      ▀█▀ █▀ █▀ ▀█▀  ███████████████████ █▀ ▀▀      ▄▀▄▀
  ▄█    ▄███  █     █   █   ████████████████████  ▄█     ▄▀▀██▀ ▄███
███▄▄▄  █▄▄▄ █▄▄ ▄▄▀   █▄▄ ██████████████████▀▀   █▄▄ ▄▄ █▄▄█▄▄▄█▄▄▄
                           ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                            ▀▀█████████████▄
                                █████████████▄
                                  █████████████▄
                                    ▀███████▀▀▀▀▀
                                      ▀████▀
                                        ▀█▀
LetItRideINNOVATIVE ▬▬▬
DICE GAME
                        ▄███████████▄
                       ██  ██████████▄
                     ▄█████████████  ██▄
            ▄▄▀█▄▄▄▄▄████████████████████▄
        ▄▄█▀   ███████████  █████  ████  █
    ▄██████ ▄▄███████████████████████████▀
 ▄▀▀ ██████████████████████████  ████  █
█  ▄███████████▀▀▀█████████████████████
██████████████    ████████▀▀██████  █▀
██████████████▄▄▄██████████   ▀▀▀▀▀▀▀
███▀ ▀██████████████████████
██    ███████████████████████
██▄▄██████████████████████████
██████████████▀   ██████████
  █████████████   ▄██████▀▀
     ▀▀██████████████▀▀
         ▀▀██████▀▀
PROVABLY
F A I R
▄█████████████▀ ▄█
██            ▄█▀
██          ▄██ ▄█
██ ▄█▄    ▄███  ██
██ ▀███▄ ▄███   ██
██  ▀███████    ██
██    █████     ██
██     ███      ██
██      ▀       ██
██              ██
▀████████████████▀
BUY  BACK
PLANS
[BTC]
butor (OP)
Newbie
*
Offline Offline

Activity: 49
Merit: 0


View Profile WWW
February 03, 2016, 02:59:56 AM
 #103

I got it resolved by removing 796.com for the moment and also opened an issue with them as i
* suspected it is an issue with their API
* wanted to know if they will enable short sells via API

;-)

I will probably go ahead and patch it into mine tonight, but leave it commented out until after New Year. Exciting times though, 796 support is very nice.

Fingers crossed their API will allow short selling. We would double the arbitrage opportunities!

mxnsch
Sr. Member
****
Offline Offline

Activity: 471
Merit: 252



View Profile
February 03, 2016, 05:29:39 AM
 #104

Good news:
Quote
Original Message -----Hi there, yes we will launch bitcoin spot trading soon but API might need later development.

██  ███  nope ██  ███
carlo__
Full Member
***
Offline Offline

Activity: 222
Merit: 100

Margin Call


View Profile
February 03, 2016, 09:31:43 AM
 #105

Hello dudes

Sorry for the dumb question but i am not properly a linux experericend user.

How to upgrade the jansson lib to 2.7 version?

I am getting the error message "json_boolean_value was not delcared in this scope"


I used apt-get install to download the previous version


Thanks for the support
siameze
Legendary
*
Offline Offline

Activity: 1064
Merit: 1000



View Profile
February 03, 2016, 12:23:36 PM
 #106

Hello dudes

Sorry for the dumb question but i am not properly a linux experericend user.

How to upgrade the jansson lib to 2.7 version?

I am getting the error message "json_boolean_value was not delcared in this scope"


I used apt-get install to download the previous version


Thanks for the support


Build from sources: http://jansson.readthedocs.org/en/2.7/gettingstarted.html or provide someone with a little more system information please.  Smiley


                     ▀▀█████████▀████████████████▄
                        ████▄      ▄████████████████
                     ▄██████▀  ▄  ███████████████████
                  ▄█████████▄████▄███████████████████
                ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀████████
                                               ▀▀███▀
    ▄█▀█       ▄▀  ▄▀▀█  ▄▀   █████████████████▄ ██▀         ▄▀█
   ▄█ ▄▀      ▀█▀ █▀ █▀ ▀█▀  ███████████████████ █▀ ▀▀      ▄▀▄▀
  ▄█    ▄███  █     █   █   ████████████████████  ▄█     ▄▀▀██▀ ▄███
███▄▄▄  █▄▄▄ █▄▄ ▄▄▀   █▄▄ ██████████████████▀▀   █▄▄ ▄▄ █▄▄█▄▄▄█▄▄▄
                           ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                            ▀▀█████████████▄
                                █████████████▄
                                  █████████████▄
                                    ▀███████▀▀▀▀▀
                                      ▀████▀
                                        ▀█▀
LetItRideINNOVATIVE ▬▬▬
DICE GAME
                        ▄███████████▄
                       ██  ██████████▄
                     ▄█████████████  ██▄
            ▄▄▀█▄▄▄▄▄████████████████████▄
        ▄▄█▀   ███████████  █████  ████  █
    ▄██████ ▄▄███████████████████████████▀
 ▄▀▀ ██████████████████████████  ████  █
█  ▄███████████▀▀▀█████████████████████
██████████████    ████████▀▀██████  █▀
██████████████▄▄▄██████████   ▀▀▀▀▀▀▀
███▀ ▀██████████████████████
██    ███████████████████████
██▄▄██████████████████████████
██████████████▀   ██████████
  █████████████   ▄██████▀▀
     ▀▀██████████████▀▀
         ▀▀██████▀▀
PROVABLY
F A I R
▄█████████████▀ ▄█
██            ▄█▀
██          ▄██ ▄█
██ ▄█▄    ▄███  ██
██ ▀███▄ ▄███   ██
██  ▀███████    ██
██    █████     ██
██     ███      ██
██      ▀       ██
██              ██
▀████████████████▀
BUY  BACK
PLANS
[BTC]
carlo__
Full Member
***
Offline Offline

Activity: 222
Merit: 100

Margin Call


View Profile
February 03, 2016, 01:03:01 PM
 #107

Hello dudes

Sorry for the dumb question but i am not properly a linux experericend user.

How to upgrade the jansson lib to 2.7 version?

I am getting the error message "json_boolean_value was not delcared in this scope"


I used apt-get install to download the previous version


Thanks for the support


Build from sources: http://jansson.readthedocs.org/en/2.7/gettingstarted.html or provide someone with a little more system information please.  Smiley

Thanks siameze

I run Linux Mint Rosetta, on a Vbox. What's the proper terminal command?
mxnsch
Sr. Member
****
Offline Offline

Activity: 471
Merit: 252



View Profile
February 03, 2016, 06:12:11 PM
 #108

Hello dudes

Sorry for the dumb question but i am not properly a linux experericend user.

How to upgrade the jansson lib to 2.7 version?

I am getting the error message "json_boolean_value was not delcared in this scope"


I used apt-get install to download the previous version


Thanks for the support


Build from sources: http://jansson.readthedocs.org/en/2.7/gettingstarted.html or provide someone with a little more system information please.  Smiley

Thanks siameze

I run Linux Mint Rosetta, on a Vbox. What's the proper terminal command?
Read the thread and the document on Github. Your error and the solution are documented there. Ask in the Mint / ubuntuforums to get a backport of the package.

██  ███  nope ██  ███
Bobba12
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
February 03, 2016, 10:09:10 PM
 #109

Hello Butor,

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)?

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? 

Thank you in advance for the clarification Smiley
wormat22
Full Member
***
Offline Offline

Activity: 224
Merit: 100


View Profile
February 05, 2016, 11:36:47 PM
 #110

Is BTC-E currently working? I see it's implemented
butor (OP)
Newbie
*
Offline Offline

Activity: 49
Merit: 0


View Profile WWW
February 07, 2016, 02:41:18 PM
 #111


Is BTC-E currently working? I see it's implemented

No BTC-e is not yet implemented. From the README file:

The following exchange should be implemented soon:
  • BTC-e

I will post something here when the implementation is done.

butor (OP)
Newbie
*
Offline Offline

Activity: 49
Merit: 0


View Profile WWW
February 07, 2016, 02:57:46 PM
 #112


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.

siameze
Legendary
*
Offline Offline

Activity: 1064
Merit: 1000



View Profile
February 07, 2016, 03:01:35 PM
 #113


Is BTC-E currently working? I see it's implemented

No BTC-e is not yet implemented. From the README file:

The following exchange should be implemented soon:
  • BTC-e

I will post something here when the implementation is done.



No rush, the best things come to those who wait. I love the project as it is now, each new implementation is exciting. Cheesy


                     ▀▀█████████▀████████████████▄
                        ████▄      ▄████████████████
                     ▄██████▀  ▄  ███████████████████
                  ▄█████████▄████▄███████████████████
                ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀████████
                                               ▀▀███▀
    ▄█▀█       ▄▀  ▄▀▀█  ▄▀   █████████████████▄ ██▀         ▄▀█
   ▄█ ▄▀      ▀█▀ █▀ █▀ ▀█▀  ███████████████████ █▀ ▀▀      ▄▀▄▀
  ▄█    ▄███  █     █   █   ████████████████████  ▄█     ▄▀▀██▀ ▄███
███▄▄▄  █▄▄▄ █▄▄ ▄▄▀   █▄▄ ██████████████████▀▀   █▄▄ ▄▄ █▄▄█▄▄▄█▄▄▄
                           ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                            ▀▀█████████████▄
                                █████████████▄
                                  █████████████▄
                                    ▀███████▀▀▀▀▀
                                      ▀████▀
                                        ▀█▀
LetItRideINNOVATIVE ▬▬▬
DICE GAME
                        ▄███████████▄
                       ██  ██████████▄
                     ▄█████████████  ██▄
            ▄▄▀█▄▄▄▄▄████████████████████▄
        ▄▄█▀   ███████████  █████  ████  █
    ▄██████ ▄▄███████████████████████████▀
 ▄▀▀ ██████████████████████████  ████  █
█  ▄███████████▀▀▀█████████████████████
██████████████    ████████▀▀██████  █▀
██████████████▄▄▄██████████   ▀▀▀▀▀▀▀
███▀ ▀██████████████████████
██    ███████████████████████
██▄▄██████████████████████████
██████████████▀   ██████████
  █████████████   ▄██████▀▀
     ▀▀██████████████▀▀
         ▀▀██████▀▀
PROVABLY
F A I R
▄█████████████▀ ▄█
██            ▄█▀
██          ▄██ ▄█
██ ▄█▄    ▄███  ██
██ ▀███▄ ▄███   ██
██  ▀███████    ██
██    █████     ██
██     ███      ██
██      ▀       ██
██              ██
▀████████████████▀
BUY  BACK
PLANS
[BTC]
wormat22
Full Member
***
Offline Offline

Activity: 224
Merit: 100


View Profile
February 07, 2016, 07:09:23 PM
 #114

Do any implemented exchanges other than Bitfinex support short selling?
mxnsch
Sr. Member
****
Offline Offline

Activity: 471
Merit: 252



View Profile
February 07, 2016, 08:54:19 PM
 #115

Do any implemented exchanges other than Bitfinex support short selling?
Your attention span is shorter than 4 posts, isnt it?

██  ███  nope ██  ███
wormat22
Full Member
***
Offline Offline

Activity: 224
Merit: 100


View Profile
February 08, 2016, 01:19:09 AM
 #116

Do any implemented exchanges other than Bitfinex support short selling?
Your attention span is shorter than 4 posts, isnt it?

It'd be a lot more productive use of everyone's time if you'd just answer the question...
butor (OP)
Newbie
*
Offline Offline

Activity: 49
Merit: 0


View Profile WWW
February 08, 2016, 05:45:29 PM
 #117


Do any implemented exchanges other than Bitfinex support short selling?

For the moment, only Bitfinex offers an API to short sell. We hope that 796.com will offer a similar API soon.

wormat22
Full Member
***
Offline Offline

Activity: 224
Merit: 100


View Profile
February 08, 2016, 06:19:57 PM
 #118

796.com has an option to sell short? I see this when I go to their trading page:

nuffsaid420
Member
**
Offline Offline

Activity: 86
Merit: 10


View Profile
February 08, 2016, 10:16:53 PM
 #119

I haven't input any API info yet, but I got it working fine. I'm using tails -F to output the log file at the moment. Is there a way to change the polling rate(refresh)? It seems to be doing it every second.
siameze
Legendary
*
Offline Offline

Activity: 1064
Merit: 1000



View Profile
February 08, 2016, 10:31:29 PM
 #120

I haven't input any API info yet, but I got it working fine. I'm using tails -F to output the log file at the moment. Is there a way to change the polling rate(refresh)? It seems to be doing it every second.

Just do this:

Code:
watch -n (x) tail -n 15 <path/to/logfile>

Replacing x with number of seconds you want to poll, and path to your logfile of course.


                     ▀▀█████████▀████████████████▄
                        ████▄      ▄████████████████
                     ▄██████▀  ▄  ███████████████████
                  ▄█████████▄████▄███████████████████
                ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀████████
                                               ▀▀███▀
    ▄█▀█       ▄▀  ▄▀▀█  ▄▀   █████████████████▄ ██▀         ▄▀█
   ▄█ ▄▀      ▀█▀ █▀ █▀ ▀█▀  ███████████████████ █▀ ▀▀      ▄▀▄▀
  ▄█    ▄███  █     █   █   ████████████████████  ▄█     ▄▀▀██▀ ▄███
███▄▄▄  █▄▄▄ █▄▄ ▄▄▀   █▄▄ ██████████████████▀▀   █▄▄ ▄▄ █▄▄█▄▄▄█▄▄▄
                           ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                            ▀▀█████████████▄
                                █████████████▄
                                  █████████████▄
                                    ▀███████▀▀▀▀▀
                                      ▀████▀
                                        ▀█▀
LetItRideINNOVATIVE ▬▬▬
DICE GAME
                        ▄███████████▄
                       ██  ██████████▄
                     ▄█████████████  ██▄
            ▄▄▀█▄▄▄▄▄████████████████████▄
        ▄▄█▀   ███████████  █████  ████  █
    ▄██████ ▄▄███████████████████████████▀
 ▄▀▀ ██████████████████████████  ████  █
█  ▄███████████▀▀▀█████████████████████
██████████████    ████████▀▀██████  █▀
██████████████▄▄▄██████████   ▀▀▀▀▀▀▀
███▀ ▀██████████████████████
██    ███████████████████████
██▄▄██████████████████████████
██████████████▀   ██████████
  █████████████   ▄██████▀▀
     ▀▀██████████████▀▀
         ▀▀██████▀▀
PROVABLY
F A I R
▄█████████████▀ ▄█
██            ▄█▀
██          ▄██ ▄█
██ ▄█▄    ▄███  ██
██ ▀███▄ ▄███   ██
██  ▀███████    ██
██    █████     ██
██     ███      ██
██      ▀       ██
██              ██
▀████████████████▀
BUY  BACK
PLANS
[BTC]
Pages: « 1 2 3 4 5 [6] 7 8 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!