This commit is contained in:
Cryptoval Trading Technologies
2024-05-01 19:22:21 +01:00
parent 920831523a
commit 7a173c54fb
27 changed files with 475 additions and 232 deletions
+85 -49
View File
@@ -3,13 +3,9 @@
{
"refdata": @inc=http://${CONFIG_SVC_HOST}:6789/refdata/refdata
, "redis": @inc=http://${CONFIG_SVC_HOST}:6789/apps/redis
, "algos": @inc=http://${CONFIG_SVC_HOST}:6789/apps/algos
, "redis": @inc=http://${CONFIG_SVC_HOST}:6789/apps/common/redis
, "algos": @inc=http://${CONFIG_SVC_HOST}:6789/apps/common/algos
# , "cvttcomm": {
# "type": "redis"
# , "redis_settings": "cvtt-prod-02"
# }
, "session_type": "CALENDAR"
, "calendar_session": {
"trading_hours_url": [
@@ -17,8 +13,90 @@
, "http://cloud16.cvtt.vpn:8000/api/v1/markets/hours?mic=XNYS&start={start}&end={end}"
]
}
, "backtest": {
"exchanges_settings": {
"*": {
"mkt_data": {
"enabled": true
, "streaming": true
}
,"order_entry": {
"enabled": true
, "streaming": true
}
,"accounting": {
"enabled": true
, "streaming": false
}
}
}
, "source": {
"database": {
"class": "cvttpy.tools.db.sqlite.sqlite_client.SqliteClient"
, "file_name": "aaa"
}
, "from_time": {
"BUY": "09:29"
"SELL": "15:30"
}
}
# , "initial_positions": {
# "COINBASE": {
# "BTC": 0
# , "USD": 1000.0
# }
# }
, "simulation": {
"speed_factor": 0.0
}
, "execution": {
"top_only": true
,"min_order_age_sec": 0.1
, "pricing_method": "BY_MKT_TRD_PRICE_BY_ORDER"
}
, "result": {
"repository": "${ResultPath}/backtest_results.json"
, "db_file": "${ResultPath}/%T.backtest.db"
}
}
, "exchanges_settings": {
"COINBASE_AT-MDPORTAL": {
"ALPACA_SNDBX-MDPORTAL": {
"order_entry": {
"enabled": true
, "streaming": true
},
"mkt_data": {
"enabled": true
, "streaming": true
},
"accounting": {
"enabled": false
, "streaming": false
}
, "credentials_key": {
"read_only": "ALPACA_SANDBOX"
, "trade": "ALPACA_SANDBOX"
}
}
, "ALPACA_SNDBX-MDP-03": {
"order_entry": {
"enabled": true
, "streaming": true
},
"mkt_data": {
"enabled": true
, "streaming": true
},
"accounting": {
"enabled": false
, "streaming": false
}
, "credentials_key": {
"read_only": "ALPACA_SANDBOX"
, "trade": "ALPACA_SANDBOX"
}
}
, "COINBASE_AT-MDPORTAL": {
"order_entry": {
"enabled": true
, "streaming": true
@@ -38,45 +116,3 @@
}
}
}
# , "books": {
# "ALPACA_BK02": {}
# , "ALPACA_BK_ILYA_01": {}
# }
# # --------------------------------------------------------------------
# , "trader": {
# "app_channel": "TRDR" active_exchanges_: str
# , "is_short_allowed": false
# , "exchanges_settings": {
# "*": {
# "mkt_data": {
# "enabled": true
# , "streaming": true
# },
# }
# }
# , "trading_pos_diff_pct_trigger": 10.0
# , "trading_depth": {
# "USD": 1000.0,
# }
# }
# , "quant": {
# "app_channel": "QUANT"
# , "strategies": @inc=http://${CONFIG_SVC_HOST}:6789/apps/strategies
# , "exchanges_settings": {
# "*": {
# "mkt_data": {
# "enabled": true
# , "streaming": true
# },
# }
# # , "COINBASE_AT": {
# # "mkt_data": {
# # "enabled": true
# # , "streaming": true
# # },
# # }
# }
# }
# }
@@ -20,16 +20,28 @@
, "marketable_stage_added_ticks": 0
},
}
, "TRDALGO_ICEBERG01": {
, "TRDALGO_ICEBERG01_COINBS": {
"class": "cvttpy.trading.algos.twap.TwapAlgo"
, "params": {
"num_slices": 5
, "duration_sec": 1500 # 25 min
, "max_order_usd": 100
, "max_order_usd": 100.
, "passive_stage_t1": 0
, "aggressive_stage_t2": 0
, "aggressivity_scale": [0.5, 1.0] # 0.5 = mid, 1.0= BBO-1 tick
, "marketable_stage_added_ticks": 0
},
}
, "TRDALGO_ICEBERG01_ALPACA": {
"class": "cvttpy.trading.algos.twap.TwapAlgo"
, "params": {
"num_slices": 5
, "duration_sec": 1500 # 25 min
, "max_order_usd": 1000.
, "passive_stage_t1": 0
, "aggressive_stage_t2": 0
# , "aggressivity_scale": [0.5, 1.0] # 0.5 = mid, 1.0= BBO-1 tick
, "marketable_stage_added_ticks": 0
},
}
}
@@ -24,4 +24,9 @@
, "read_timeout" : 0.01
, "ping_timeout_secs": 2.0
}
, "cvtt-prod-03": {
"url": "redis://cvtt-prod-03.cvtt.vpn"
, "read_timeout" : 0.01
, "ping_timeout_secs": 2.0
}
}
@@ -9,7 +9,7 @@
"class": "cvttpy.trading.strategies.vwap_strat.VWAP001"
, "params": {
"vwap_interval": "1 hour"
, "hist_md_database": {
, "hist_md_source": {
"class": "cvttpy.tools.db.timescale.tsdb_client.TimescaleDbClient"
, "cred_key": "TSDB_MD_CVTTDATA_RO"
, "data_type": "OHLCV"
+2 -22
View File
@@ -3,7 +3,7 @@
{
"refdata": @inc=http://${CONFIG_SVC_HOST}:6789/refdata/refdata
, "redis": @inc=http://${CONFIG_SVC_HOST}:6789/apps/redis
, "redis": @inc=http://${CONFIG_SVC_HOST}:6789/apps/common/redis
, "cvttcomm": {
"type": "redis"
# , "redis_settings": "localhost"
@@ -140,27 +140,7 @@
# --------------------------------------------------------------------
, "quant": {
"app_channel": "QUANT"
, "strategies": {
"CVTT_QST001": {
"class": "cvttpy.trading.strategies.test_strat.SeesawTestStrategy"
, "params": {
"dummy": "dummy"
}
}
, "VWAP001": {
"class": "cvttpy.trading.strategies.vwap_strat.VWAP001"
, "params": {
"vwap_interval": "1 hour"
, "hist_md_database": {
"class": "cvttpy.tools.db.timescale.tsdb_client.TimescaleDbClient"
, "cred_key": "TSDB_MD_CVTTDATA_RO"
, "data_type": "OHLCV"
}
, "publish_details": true
}
}
}
, "strategies": @inc=http://${CONFIG_SVC_HOST}:6789/apps/common/strategies
, "exchanges_settings": {
"COINBASE_AT": {
"mkt_data": {
+4 -4
View File
@@ -3,7 +3,7 @@
{
"refdata": @inc=http://${CONFIG_SVC_HOST}:6789/refdata/refdata
, "redis": @inc=http://${CONFIG_SVC_HOST}:6789/apps/redis
, "redis": @inc=http://${CONFIG_SVC_HOST}:6789/apps/common/redis
, "cvttcomm": {
"type": "redis"
# , "redis_settings": "localhost"
@@ -37,7 +37,7 @@
}
# , "interval": "4 hours"
, "interval": "2 hours"
, "from_time": "2024-04-01 09:00:00"
, "from_time": "2024-04-15 09:00:00"
}
, "initial_positions": {
"COINBASE": {
@@ -72,7 +72,7 @@
},
}
}
, "algos": @inc=http://${CONFIG_SVC_HOST}:6789/apps/algos
, "algos": @inc=http://${CONFIG_SVC_HOST}:6789/apps/common/algos
, "trading_pos_diff_pct_trigger": 10.0
, "trading_depth": {
"BTC": 0.001
@@ -107,7 +107,7 @@
, "quant": {
"app_channel": "QUANT"
, "strategies": @inc=http://${CONFIG_SVC_HOST}:6789/apps/strategies
, "strategies": @inc=http://${CONFIG_SVC_HOST}:6789/apps/common/strategies
, "exchanges_settings": {
"COINBASE_AT": {
"mkt_data": {
+3 -3
View File
@@ -3,7 +3,7 @@
{
"refdata": @inc=http://${CONFIG_SVC_HOST}:6789/refdata/refdata
, "redis": @inc=http://${CONFIG_SVC_HOST}:6789/apps/redis
, "redis": @inc=http://${CONFIG_SVC_HOST}:6789/apps/common/redis
, "active_instruments": @inc=http://${CONFIG_SVC_HOST}:6789/apps/active_instruments
, "cvttcomm": {
"type": "redis"
@@ -33,7 +33,7 @@
},
}
}
, "algos": @inc=http://${CONFIG_SVC_HOST}:6789/apps/algos
, "algos": @inc=http://${CONFIG_SVC_HOST}:6789/apps/common/algos
, "trading_pos_diff_pct_trigger": 10.0
, "trading_depth": {
"USD": 1000.0,
@@ -102,7 +102,7 @@
# --------------------------------------------------------------------
, "quant": {
"app_channel": "QUANT"
, "strategies": @inc=http://${CONFIG_SVC_HOST}:6789/apps/strategies
, "strategies": @inc=http://${CONFIG_SVC_HOST}:6789/apps/common/strategies
, "exchanges_settings": {
"*": {
"mkt_data": {
+3 -3
View File
@@ -3,7 +3,7 @@
{
"refdata": @inc=http://${CONFIG_SVC_HOST}:6789/refdata/refdata
, "redis": @inc=http://${CONFIG_SVC_HOST}:6789/apps/redis
, "redis": @inc=http://${CONFIG_SVC_HOST}:6789/apps/common/redis
, "active_instruments": @inc=http://${CONFIG_SVC_HOST}:6789/apps/active_instruments
, "cvttcomm": {
"type": "redis"
@@ -33,7 +33,7 @@
},
}
}
, "algos": @inc=http://${CONFIG_SVC_HOST}:6789/apps/algos
, "algos": @inc=http://${CONFIG_SVC_HOST}:6789/apps/common/algos
, "trading_pos_diff_pct_trigger": 10.0
, "trading_depth": {
"USD": 1000.0,
@@ -102,7 +102,7 @@
# --------------------------------------------------------------------
, "quant": {
"app_channel": "QUANT_03"
, "strategies": @inc=http://${CONFIG_SVC_HOST}:6789/apps/strategies
, "strategies": @inc=http://${CONFIG_SVC_HOST}:6789/apps/common/strategies
, "exchanges_settings": {
"*": {
"mkt_data": {
+47
View File
@@ -0,0 +1,47 @@
{
"TRDALGO_001": {
"class": "cvttpy.trading.algos.simple.SimpleTradingAlgo"
, "params": {}
}
, "TRDALGO_MOOMOC_01": {
"class": "cvttpy.trading.algos.moo_moc.MooMocTradingAlgo"
, "params": {
},
}
, "TRDALGO_TWAP01": {
"class": "cvttpy.trading.algos.twap.TwapAlgo"
, "params": {
"num_slices": 5
, "duration_sec": 1500 # 25 min
, "max_order_usd": 100
, "passive_stage_t1": 0.4 # join BBO, the rest is aggressive
, "aggressive_stage_t2": 0.4
, "aggressivity_scale": [0.5, 1.0] # 0.5 = mid, 1.0= BBO-1 tick
, "marketable_stage_added_ticks": 0
},
}
, "TRDALGO_ICEBERG01_COINBS": {
"class": "cvttpy.trading.algos.twap.TwapAlgo"
, "params": {
"num_slices": 5
, "duration_sec": 1500 # 25 min
, "max_order_usd": 100.
, "passive_stage_t1": 0
, "aggressive_stage_t2": 0
, "aggressivity_scale": [0.5, 1.0] # 0.5 = mid, 1.0= BBO-1 tick
, "marketable_stage_added_ticks": 0
},
}
, "TRDALGO_ICEBERG01_ALPACA": {
"class": "cvttpy.trading.algos.twap.TwapAlgo"
, "params": {
"num_slices": 5
, "duration_sec": 1500 # 25 min
, "max_order_usd": 1000.
, "passive_stage_t1": 0
, "aggressive_stage_t2": 0
# , "aggressivity_scale": [0.5, 1.0] # 0.5 = mid, 1.0= BBO-1 tick
, "marketable_stage_added_ticks": 0
},
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"refdata": @inc=http://cloud11.cvtt.vpn:6789/refdata/refdata
, "redis": @inc=http://cloud11.cvtt.vpn:6789/apps/redis
, "redis": @inc=http://cloud11.cvtt.vpn:6789/apps/common/redis
, "cvttcomm": @inc=http://cloud11.cvtt.vpn:6789/apps/cvttcomm
, "exchanges_settings": {
"COINBASE_AT": {
+2 -2
View File
@@ -2,7 +2,7 @@
{
"refdata": @inc=http://${CONFIG_SVC_HOST}:6789/refdata/refdata
, "redis": @inc=http://${CONFIG_SVC_HOST}:6789/apps/redis
, "redis": @inc=http://${CONFIG_SVC_HOST}:6789/apps/common/redis
, "cvttcomm": @inc=http://${CONFIG_SVC_HOST}:6789/apps/cvttcomm
, "quant": {
"books": {
@@ -15,7 +15,7 @@
"dummy": "dummy"
}
}
}
}
}
, "exchanges_settings": {
"COINBASE_AT": {
+32
View File
@@ -0,0 +1,32 @@
{
"localhost": {
"url": "redis://localhost"
, "read_timeout" : 0.01
, "ping_timeout_secs": 2.0
}
, "cloud17": {
"url": "redis://cloud17.cvtt.vpn"
, "read_timeout" : 0.01
, "ping_timeout_secs": 2.0
}
, "cvttdata": {
"url": "redis://cvttdata.cvtt.vpn"
, "read_timeout" : 0.01
, "ping_timeout_secs": 2.0
}
, "cvtt-prod-01": {
"url": "redis://cvtt-prod-01.cvtt.vpn"
, "read_timeout" : 0.01
, "ping_timeout_secs": 2.0
}
, "cvtt-prod-02": {
"url": "redis://cvtt-prod-02.cvtt.vpn"
, "read_timeout" : 0.01
, "ping_timeout_secs": 2.0
}
, "cvtt-prod-03": {
"url": "redis://cvtt-prod-03.cvtt.vpn"
, "read_timeout" : 0.01
, "ping_timeout_secs": 2.0
}
}
+1 -1
View File
@@ -3,7 +3,7 @@
"refdata": @inc=http://cloud11.cvtt.vpn:6789/refdata/refdata
, "cvttcomm": @inc=http://cloud11.cvtt.vpn:6789/apps/cvttcomm
, "redis": @inc=http://cloud11.cvtt.vpn:6789/apps/redis
, "redis": @inc=http://cloud11.cvtt.vpn:6789/apps/common/redis
, "risk_manager": {
"book": "CVTT_BK01"
, "database": {
@@ -0,0 +1,25 @@
{
"CVTT_QST001": {
"class": "cvttpy.trading.strategies.test_strat.SeesawTestStrategy"
, "params": {
"dummy": "dummy"
}
}
, "VWAP001": {
"class": "cvttpy.trading.strategies.vwap_strat.VWAP001"
, "params": {
"vwap_interval": "1 hour"
, "hist_md_source": {
"class": "cvttpy.tools.db.timescale.tsdb_client.TimescaleDbClient"
, "cred_key": "TSDB_MD_CVTTDATA_RO"
, "data_type": "OHLCV"
}
}
}
, "DAILY_STOCK_001": {
"class": "cvttpy.trading.strategies.daily_stocks_strat.DailyStocksStrategy"
, "params": {
"liquidate_at": "15:45" # EDT Time
}
}
}
+2 -2
View File
@@ -1,7 +1,7 @@
{
"refdata": @inc=http://cloud11.cvtt.vpn:6789/refdata/refdata
, "cvttcomm": @inc=http://cloud11.cvtt.vpn:6789/apps/cvttcomm
, "redis": @inc=http://cloud11.cvtt.vpn:6789/apps/redis
, "redis": @inc=http://cloud11.cvtt.vpn:6789/apps/common/redis
, "exchanges_settings": {
"COINBASE_AT": {
"mkt_data": {
@@ -10,7 +10,7 @@
},
}
}
, "trader": {
, "trader": {
"books": {
"CVTT_BK01": {}
}
+1 -1
View File
@@ -3,5 +3,5 @@
{
# ----------------------------------
"refdata": @inc=http://${CONFIG_SVC_HOST}:6789/refdata/refdata
, "redis": @inc=http://${CONFIG_SVC_HOST}:6789/apps/redis
, "redis": @inc=http://${CONFIG_SVC_HOST}:6789/apps/common/redis
}
-69
View File
@@ -1,69 +0,0 @@
@var CONFIG_SVC_HOST=cloud16.cvtt.vpn
{
# ----------------------------------
"refdata": @inc=http://${CONFIG_SVC_HOST}:6789/refdata/refdata
, "redis": @inc=http://${CONFIG_SVC_HOST}:6789/apps/redis
, "md_portal": {
"app_channel": "MD_PORTAL_03"
, "exchanges_settings": {
"ALPACA_SNDBX": {
"order_entry": {
"enabled": false
, "streaming": false
},
"mkt_data": {
"enabled": true
, "streaming": true
},
"accounting": {
"enabled": false
, "streaming": false
}
}
, "BNBSPOT": {
"order_entry": {
"enabled": false
, "streaming": false
},
"mkt_data": {
"enabled": true
, "streaming": true
},
"accounting": {
"enabled": false
, "streaming": false
}
}
, "BNBFUT": {
"order_entry": {
"enabled": false
, "streaming": false
},
"mkt_data": {
"enabled": true
, "streaming": true
},
"accounting": {
"enabled": false
, "streaming": false
}
}
"COINBASE_AT": {
"order_entry": {
"enabled": false
, "streaming": false
},
"mkt_data": {
"enabled": true
, "streaming": true
},
"accounting": {
"enabled": false
, "streaming": false
}
}
}
}
}
+1 -1
View File
@@ -2,7 +2,7 @@
{
"refdata": @inc=http://${CONFIG_SVC_HOST}:6789/refdata/refdata
, "redis": @inc=http://${CONFIG_SVC_HOST}:6789/apps/redis
, "redis": @inc=http://${CONFIG_SVC_HOST}:6789/apps/common/redis
, "active_instruments": @inc=http://${CONFIG_SVC_HOST}:6789/apps/active_instruments
, "cvttcomm": {
"type": "redis"
+1 -1
View File
@@ -23,6 +23,6 @@
}
}
, "refdata": @inc=http://${CONFIG_SVC_HOST}:6789/refdata/refdata
, "redis": @inc=http://${CONFIG_SVC_HOST}:6789/apps/redis
, "redis": @inc=http://${CONFIG_SVC_HOST}:6789/apps/common/redis
}
+1 -1
View File
@@ -23,6 +23,6 @@
}
}
, "refdata": @inc=http://${CONFIG_SVC_HOST}:6789/refdata/refdata
, "redis": @inc=http://${CONFIG_SVC_HOST}:6789/apps/redis
, "redis": @inc=http://${CONFIG_SVC_HOST}:6789/apps/common/redis
}
+1 -1
View File
@@ -1,7 +1,7 @@
@var CONFIG_SVC_HOST=cloud16.cvtt.vpn
{
"refdata": @inc=http://${CONFIG_SVC_HOST}:6789/refdata/refdata
, "redis": @inc=http://${CONFIG_SVC_HOST}:6789/apps/redis
, "redis": @inc=http://${CONFIG_SVC_HOST}:6789/apps/common/redis
, "active_instruments": @inc=http://${CONFIG_SVC_HOST}:6789/apps/active_instruments
"exchanges_settings": {
"*": {
+1 -1
View File
@@ -1,7 +1,7 @@
@var CONFIG_SVC_HOST=cloud16.cvtt.vpn
{
"refdata": @inc=http://${CONFIG_SVC_HOST}:6789/refdata/refdata
, "redis": @inc=http://${CONFIG_SVC_HOST}:6789/apps/redis
, "redis": @inc=http://${CONFIG_SVC_HOST}:6789/apps/common/redis
, "active_instruments": @inc=http://${CONFIG_SVC_HOST}:6789/apps/active_instruments
, "exchanges_settings": {
"*": {
+1 -1
View File
@@ -1,7 +1,7 @@
@var CVTT_CONFIG_HOST=cloud16.cvtt.vpn
{
"refdata": @inc=http://${CVTT_CONFIG_HOST}:6789/refdata/refdata
, "redis": @inc=http://${CVTT_CONFIG_HOST}:6789/apps/redis
, "redis": @inc=http://${CVTT_CONFIG_HOST}:6789/apps/common/redis
, "cvttcomm": {
"type": "redis"