Table of Contents
Cryptocurrency Arbitrage Bot is a python-based trading system that collects real-time market data from various sets of cryptocurrency exchanges in Korea.
The bot analyzes spreads and condition of arbitrage oppotunities using its own algorithms like basic arbitrage strategy
, RFAB v1
, RFAB v2
, and ACO
.
These are further enhanced using stat analyzer that acts as a middleware between the raw data coming in and the decision tree made by algorithms that leads to actual execution of trades.
To get a local copy up and running follow these simple steps.
- credentials
Before commencing, make sure you have proper API secrets for each trading exchanges that has full access to execution of trades and accounot transfer.
Save them in file named
conf_user.ini
. Below is a demonstration of how you should align secrets in this file.
[KORBIT]
client_id = <client_id>
client_secret = <client_secret>
username = chungjin93@gmail.com
password = <password>
[COINONE]
access_token = <access_token>
secret_key = <secret_key>
[GOPAX]
access_token = <access_token>
secret_key = <secret_key>
- virtualenv for Python3.7
- Install dependencies
pip install -r requirements.txt
- Run RFAB Streamer
python -m ./run_trade_streamer_v2.py
- Run RFAB Trader
python -m ./run_risk_free_arb_bot_v2.py
Currently Arbitrage Bot is run with combination of RFAB V2 augemented with ACO. Also RFAB Streamer is added to inject real-time market data to the execution bot.
This is the very first version of Arbitrage Strategy applied to the bot.
Following is the lists of what has been included as a part of algorithms.
- Repetitive trading with reverse set of arbitrage spreads
- Decide where to pin entry point and secondary point as exit plan
- Calibration when market variation is high
- Make use of Bollinger band to determine extreme point
This is the next generation trading algorithm that improves performance and yields of RFAB V1 better. Limitation found in V1 was that there were huge discrepency between the volume of target currency on other side of trading exchange. In order to resolve few features were added,
- Optimized Traded Spread (OTS)
- Individual Combination Optimization (ICO)
- 3D Portfolio Optimization (3D PO)
These new features allowed the bot to broaden oppotunity of trading by maxmizing unit spread and its threshold of settings dynamically. As a result, the bot was able to execute trade on even smaller volumes of currency while maximizing profit.
This is the profit optimizer whose foundation lies into backtesting of past trades. Previsouly, every trades were dependant on the static settings meaning the bot was not capable of changing its strategy of allocating assets and volumes dynamically.
With this ACO backtester, it consistently analyzes the past traded spreads and market condition and make change on settings like threshold, division, depth, min_trading_coin etc.
- ISO (Initial Setting Optimizer)
- IBO (Initial Balance Optimizer)
- OTC (Opportunity Time Collector)
- IYO (Integrated Yield Optimizer)
This is an actual operation report of Arbitrage Bot. The sample linked covers 7days of trading.
developer: david.jeong0724@gmail.com