-
Notifications
You must be signed in to change notification settings - Fork 205
/
config.env.example
158 lines (113 loc) · 7.12 KB
/
config.env.example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
# Single order execution algorithms are used to execute a single large order without excessive impact on the market price by splitting
# it into smaller child orders.
# See https://github.com/ontiyonke/book-1/blob/master/%5BALGO-TRADING%5D%5BAlgorithmic%20Trading%20%26%20DMA-%20An%20introduction%20to%20direct%20access%20trading%20strategies%5D.pdf for
# more details.
# In live trade, paper trade, and backtest mode, the program saves private data as CSV files in PRIVATE_DATA_DIRECTORY for
# performance analysis.
# For paper trade mode and backtest mode, see section "only applicable to paper trade and backtest" below to set additional
# parameters. Simulated order matching for market making order is based on real trades from the live market. See
# https://medium.com/open-crypto-market-data-initiative/the-nitty-gritty-of-paper-trading-a-market-making-strategy-792e08116296
# for more details. Simulated order matching for market taking order is based on real order books from the live market.
# For backtest mode, see section "only applicable to backtest" below to set additional parameters. The program expects daily
# historical market data CSV files in HISTORICAL_MARKET_DATA_DIRECTORY with the following names and formats. For example,
# File name: gemini__eth-usd__2021-07-01__market-depth.csv. This file contains market depth data at each second. OK to be sparse, meaning
# a missing second is assumed to contain the same data as its previous second.
# File format:
# time_seconds,bid_price_bid_size|...,ask_price_ask_size|...
# 1625097600,2271.58_1.6477|2271.56_12.297939|...,2279.63_28.479526|2279.86_11.74342|...
# ...
# File name: gemini__eth-usd__2021-07-01__trade.csv. This file contains trade data for every tick.
# File format:
# time_seconds,price,size,is_buyer_maker
# 1625097621.647,2278.15,0.0409,1
# ...
# You can choose to get the data from any vendor.
# 'live': Live trade.
# 'paper': Paper trade.
# 'backtest': Backtest.
TRADING_MODE=live
# 'twap': Time weighted average price algorithm.
# 'vwap': Volume weighted average price algorithm. Not supported yet.
# 'pov': Percent of volume algorithm. Not supported yet.
# 'is': Implementation shortfall algorithm. Not supported yet.
TRADING_STRATEGY=twap
EXCHANGE=coinbase
INSTRUMENT=BTC-USD
# If set to true, use weighted mid price as mid price.
# https://quant.stackexchange.com/questions/50651/how-to-understand-micro-price-aka-weighted-mid-price
USE_WEIGHTED_MID_PRICE=false
# If set to e.g. 15, orders will be canceled and replaced after 15 seconds.
ORDER_REFRESH_INTERVAL_SECONDS=15
# Some exchanges cache account balances. Therefore after canceling all open orders, we'd wait a little bit for the held
# funds to be released. Must be less than ORDER_REFRESH_INTERVAL_SECONDS.
ACCOUNT_BALANCE_REFRESH_WAIT_SECONDS=1
# If the exchange supports subaccount and you want to use it.
ACCOUNT_ID=''
# The program saves private data (e.g. balances, trades, orders) as CSV files. This value specifies the directory in which these
# files are saved. Leave empty if you want to use current working directory. For each day a new file is generated per data type.
PRIVATE_DATA_DIRECTORY=''
# This value specifies the name prefix of the files in which private data are saved.
PRIVATE_DATA_FILE_PREFIX=''
# This value specifies the name suffix of the files in which private data are saved.
PRIVATE_DATA_FILE_SUFFIX=''
# The application's start time, e.g. 2021-08-22T00:00:00Z. Optional, defaults to now.
START_TIME=''
# The application's total duration in seconds. When reached, the application will exit. Mandatory.
TOTAL_DURATION_SECONDS=3600
# Allowed values: 'buy', 'sell'.
ORDER_SIDE='buy'
# Overall quantity to be fulfilled.
TOTAL_TARGET_QUANTITY=0
# Overall quantity in quote to be fulfilled. Takes precedence over TOTAL_TARGET_QUANTITY.
QUOTE_TOTAL_TARGET_QUANTITY=1000000
# Order price limit relative to the mid price. If set to e.g. 0.0001, the price limit will be 0.01% higher than the mid
# price. If set to e.g. -0.0001, this price will be 0.01% lower than the mid price.
ORDER_PRICE_LIMIT_RELATIVE_TO_MID_PRICE=0.0001
# Additional price limit as a hard limit in absolute price. Optional.
ORDER_PRICE_LIMIT=0
# Order quantity limit relative to the target quantity. If set to e.g. 0.01, the child order quantity's upper limit is 1% of
# TOTAL_TARGET_QUANTITY or QUOTE_TOTAL_TARGET_QUANTITY.
ORDER_QUANTITY_LIMIT_RELATIVE_TO_TARGET=0.01
# Only applicable to trading strategy 'twap'. If set to e.g. 0.1, the child order quantity will be randomized anywhere between
# -10% to 10%.
TWAP_ORDER_QUANTITY_RANDOMIZATION_MAX=0.1
# Only applicable to trading strategy 'pov'. If set to e.g. 0.01, the participation rate is 1%.
POV_ORDER_QUANTITY_PARTICIPATION_RATE=0.01
# Only applicable to trading strategy 'is'. It has the unit of 1/second. This is exactly κ in equation (18) from https://www.smallake.kr/wp-content/uploads/2016/03/optliq.pdf.
# The value 1/κ is exactly the amount of time it takes to complete the parent order quantity by a factor of e (i.e. 36.8%). κ also represents the level of risk aversion.
# Positive κ is risk averse, negative κ is risk seeking. Zero κ is equivalent to trading strategy 'twap'.
IS_URGENCY=0.0001
# start: only applicable to paper trade and backtest
# If set to e.g. 0.001, for a taker each trade will carry a fee of 0.1% of the transacted value.
TAKER_FEE=0.001
# If set to e.g. USD, for a taker buyer the trading fee is charged in USD.
TAKER_BUYER_FEE_ASSET=USD
# If set to e.g. USD, for a taker seller the trading fee is charged in USD.
TAKER_SELLER_FEE_ASSET=USD
# If set to e.g. 0.001, for a maker each trade will carry a fee of 0.1% of the transacted value.
MAKER_FEE=0.001
# If set to e.g. USD, for a maker buyer the trading fee is charged in USD.
MAKER_BUYER_FEE_ASSET=USD
# If set to e.g. USD, for a maker seller the trading fee is charged in USD.
MAKER_SELLER_FEE_ASSET=USD
# A number between 0 and 1 to express how much impact your own orders might affect the market.
MARKET_IMPACT_FACTOR=0.5
# end: only applicable to paper trade and backtest
# start: only applicable to backtest
# The historical market data start date, e.g. 2021-08-22.
HISTORICAL_MARKET_DATA_START_DATE=''
# The historical market data end date, e.g. 2021-08-23. Exclusive.
HISTORICAL_MARKET_DATA_END_DATE=''
# The directory in which historical market data files are saved.
HISTORICAL_MARKET_DATA_DIRECTORY=''
# This value specifies the name prefix of the files in which historical market data are saved. For example, if set to "chassis__"
# File name: chassis__gemini__eth-usd__2021-07-01__market-depth.csv.
# File name: chassis__gemini__eth-usd__2021-07-01__trade.csv.
HISTORICAL_MARKET_DATA_FILE_PREFIX=''
# This value specifies the name suffix of the files in which historical market data are saved. For example, if set to "__chassis"
# File name: gemini__eth-usd__2021-07-01__market-depth__chassis.csv.
# File name: gemini__eth-usd__2021-07-01__trade__chassis.csv.
HISTORICAL_MARKET_DATA_FILE_SUFFIX=''
# If set to true, the program only saves a single final summary of private data rather than several detailed files. Use this option to increase backtest speed.
PRIVATE_DATA_ONLY_SAVE_FINAL_SUMMARY=false
# end: only applicable to backtest