Author

Topic: [ANN] Ethfinex bot with SURPRISING backtests! (Read 103 times)

newbie
Activity: 2
Merit: 0
January 24, 2019, 05:04:17 AM
#2
Hi party fans,

I've built a script that takes their maker fee rebate on the perpetual market, along with it's volume, and creates massive returns. I think the volume is a bit over-the-top these last few days, but evne at 1/100 the trades this venture is still highly profitable Smiley Because there's literally 10s of millons of orders being taken in a day, there's healthy room for more than one person to be the maker on some of those without any notceable competition.

Look! In 16 hours more than 4000% returns on 2.27 seed BTC!

https://docs.google.com/spreadsheets/d/1C1gdUs9ULA7qc6tO4JZcucHxFd4F6dfR-SUmPUYtRYE/edit#gid=0

Look! in 6 hours 600% returns!

https://docs.google.com/spreadsheets/d/1y_yQbV3e0pXqcMIG-h55oArJ-vEA8SEs5WBK6fpq62E/edit#gid=0

If you don't like sheets links, here's this:

https://drive.google.com/file/d/1KN16BgznUwcWVNKAx7tZwVA34s036xuw/view?usp=sharing https://drive.google.com/file/d/1vHRgJa_-4-XhCZivGbhOJ7YQUcD5xZoo/view?usp=sharing

The newest version of the bot includes many features to try to avoid a margin call, and at present never uses more than 1/3 the equity available on a given account.

From both my accounts, here is the summary:

Acc #1:

fees paid 69.08455994 change in balanec 157.334570159999 fees earned, after paying the above fees -234.01579655

csv export:

https://drive.google.com/file/d/1qyLluU8iS_bemh6Dwdl_7qfToqs-BiNB/view?usp=sharing

Acc #2:

fees paid 19.10605269 fees (rebates) earned after paying above fees -251.62075451 Change in balance 250.85156822

csv export:

https://drive.google.com/file/d/1bI53D78TCwACYwNMss1vFSVs8QeixAGu/view?usp=sharing

    Download, install node, npm (any machine) 1.5 git clone https://github.com/DunnCreativeSS/marketmaker
    run npm i in the directory of ths git repo
    Open deribit.js
    Change key, secret to appropriate values 4.5 in views/index.ejs,
    Run on TestNet
    When you want to run on livenet, take out the ', 'https://test.deribit.com'' section of var restClient = new RestClient('key','secret'

It should look like:

var restClient = new RestClient('key','secret')

    I do ask that you sign up to my Deribit ref lnk, so I can get value from your taker trades.

https://www.deribit.com/reg-4393.9303

    Yes, I fully intend on using some of the realized profits to repeat this success in other maker fee rebate exchanges (like BitMex).

    More details

To Prove for Viability Consistent over all types of markets, but identify when it does better From forward testing on testnet, it’s apparent: An upwards trend will cause more Sells than Buys A downwards trend will cause more Buys than Sells In each above case, until such time as there are more units in a position than the lower or higher threshold, lower being sell/buy back 1/3 of position as maker and higher threshold being sell/buy back 1/2 of position as taker A spike in volume will cause more buys/sells Until such point as it exceeds a maximum threshold for buys/sells in given 8s period, in which case it takes a 20s break from buying/selling Until such point as a given position PNL is <-0.30%, when it liquidates position Until such point as a given total equity falls 1.5% in a given 60s period, when it liquidates open positions A downturn in volume causes less profits But still shows a steady upwards movement on the graph, although decelerated Sunk costs of dev To deploy any number users to livenet Deribit $0, put in their API keys to my testnet script and switch to livenet To deploy to other exchanges, BTC futures with leverage Max. 40 hour’s effort by an effective resource or team On other exchanges, incorporate other coins or lower leverage Max. add’l 20 hour’s effort by an effective resource or team, given the buy/sell and other logic already exists from #2 Scalability given current market liquidity and volume A spot check shows top 10 bids/asks @ 40k contracts ($10 apiece) of non-hidden orders on the books for both testnet and livenet Livenet has 25 trades within last 3 minutes, Testnet within 1 minute I expect the scalability for a single deploy at 2-10 BTC seed will perform like the bot on testnet. Additional bots on Deribit would contribute to maker volume, if we had $400 000 (at 100x leverage, so $4000 on both sides of the books so $8000) it would double non-hidden orders. If we had $4000 leveraged the bot would enter orders of 1250 contracts. @ $32 difference, measuring each bid/ask by $2, there is roughly $3m on both sides of the books, $30 000 at 100x leverage, which we’d double with our own $30 000. If we had $3m leveraged the bot would enter orders of 10 000 contracts. Add’l exchanges, add’l liquidy and volume.
member
Activity: 113
Merit: 10
I built a bot first for Poloniex then for Bitfinex and it's as easy as switching 2 lines of code to get it to work on Ethfinex. Note that the attached backtests are for the bot running Ethfinex pairs on Bitfinex because the backtest suite didn't support Ethfinex out of the box.

In return for being able to run my bot with your balance, I ask that you sign up to Ethfinex using my affiliate link. Non-verified accounts can still deposit and withdraw, however they won't be able to take part in the NEC fee rebate until verified (but earnings are backdated).

If you trade as a maker on Ethfinex, half the maker fees and half the taker fees are refunded to you once a month (on the 14th) in NEC tokens on Ethfinex. This might not sound like a lot but hear me out: when I was running this bot on 0.1 Bitcoin Cash balance on Bitfinex (~$100) I managed to put $10k USD worth of volume through the order books in 1-2 days (and still turn a profit). If you extrapolate, that could be a ton of fee rebates seeing as how the bot is a maker 3/4 of the time.

The bot should outperform the backtests, as I was unable to find a way to accurately backtest selling/buying half the trade value at a limit and the other half at a trailing stop (which the bot does, to maximize profits).

The bot analyzes the last day's trading activity and sets stop limit reminders for itself to buy/sell at the next down/up Fibonacci levels. It then sells/buys back in at the next Fib level up/down, and 1/2 the value is put into a trailing stop.

I backtested the bot on SAN/BTC, GNT/BTC, TRX/BTC which are all pairs available on Ethfinex (and Bitfinex for backtesting), for a period of ~four months during both an uptrend and downtrend.

---I had posted this previously for Bitfinex and without relevant backtests, and then found that Bitfinex no longer has an affiliate program. The community also asked for backtests, so I took a day or two to learn how to backtest using Catalyst for Python (while brushing up on my Python skills) to bring you these results---

Backtest results:

SAN/BTC (black):

https://www.screencast.com/t/DZFdA3dDpfEM

March-July test

Buy n hodl: ~31% losses

Bot: ~101% gains

GNT/BTC (blue):

https://www.screencast.com/t/3NwaMpKC

March-July test

Buy n hodl: ~20% gains

Bot: ~119% gains

TRX/BTC (green):

https://www.screencast.com/t/u7pi0Grmx4

March-July test

Buy n hodl: ~17% gains

Bot: ~28% gains
Jump to: