20260112
This commit is contained in:
@@ -1,89 +0,0 @@
|
||||
@var ResultPath=/tmp
|
||||
@var SourcePath=/home/oleg/develop/cvtt2/tmp
|
||||
{
|
||||
"refdata": @inc=http://@env{CONFIG_SERVICE}/refdata/refdata
|
||||
, "comm": @inc=http://@env{CONFIG_SERVICE}/apps/common/comm
|
||||
, "algos": @inc=http://@env{CONFIG_SERVICE}/apps/common/algos
|
||||
|
||||
, "session_type": "CALENDAR"
|
||||
, "calendar_session": {
|
||||
"trading_hours_url": [
|
||||
"GET"
|
||||
, "https://trading-calendar.cvtt.net/api/v1/markets/hours?mic=XNYS&start={start}&end={end}"
|
||||
]
|
||||
}
|
||||
###### N E W S E C T I O N (example)
|
||||
, "simulation": {
|
||||
"speed_factor": 0.0,
|
||||
"time_events_interval_ms": 100
|
||||
}
|
||||
, "market_simulator" : {
|
||||
"market_data": {
|
||||
"sources": [
|
||||
{
|
||||
"loader_class": "cvttpy.research.time_series.loaders.tsdb_loader.TimescaleTSLoader"
|
||||
, "credentials_key": "TSDB_MD_CVTTDATA_RO"
|
||||
# , "interval": "4 hours"
|
||||
, "interval": "2 hours"
|
||||
, "from_time": "2024-04-15 09:00:00"
|
||||
}
|
||||
# , {
|
||||
# "loader_class": "cvttpy.research.time_series.loaders.sqlite_loader.SqliteMdLoader",
|
||||
# "file_name": "${SourcePath}/20240424.ALPACA.QAT.db"
|
||||
# }
|
||||
]
|
||||
}
|
||||
, "accounting": {
|
||||
"initial_positions": {
|
||||
"COINBASE": {
|
||||
"BTC": 0
|
||||
, "USD": 1000.0
|
||||
}
|
||||
}
|
||||
}
|
||||
, "order_entry": {
|
||||
"execution": {
|
||||
"top_only": true
|
||||
,"min_order_age_sec": 0.1
|
||||
, "pricing_method": "BY_MKT_TRD_PRICE_BY_ORDER"
|
||||
# , "presubscribe_md_types": ["BOOK_TOP", "TRADES"]
|
||||
}
|
||||
}
|
||||
}
|
||||
###### N E W S E C T I O N - end
|
||||
, "backtest": {
|
||||
"source": {
|
||||
"loader_class": "cvttpy.research.time_series.loaders.sqlite_loader.SqliteMdLoader"
|
||||
, "file_name": "${SourcePath}/20240424.ALPACA.QAT.db"
|
||||
# , "from_time": "09:29"
|
||||
}
|
||||
, "result": {
|
||||
# "repository": "${ResultPath}/backtest_results.json"
|
||||
"db_file": "${ResultPath}/%D.backtest.db"
|
||||
}
|
||||
, "simulation": {
|
||||
"speed_factor": 0.0
|
||||
}
|
||||
, "execution": {
|
||||
"top_only": true
|
||||
,"min_order_age_sec": 0.1
|
||||
, "pricing_method": "BY_MKT_TRD_PRICE_BY_ORDER"
|
||||
}
|
||||
}
|
||||
, "exchanges_settings": {
|
||||
"*": {
|
||||
"order_entry": {
|
||||
"enabled": true
|
||||
, "streaming": true
|
||||
},
|
||||
"mkt_data": {
|
||||
"enabled": true
|
||||
, "streaming": true
|
||||
},
|
||||
"accounting": {
|
||||
"enabled": false
|
||||
, "streaming": false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,191 +0,0 @@
|
||||
@var ResultPath=/tmp
|
||||
|
||||
{ "___dummy___": null
|
||||
, "refdata": @inc=http://@env{CONFIG_SERVICE}/refdata/refdata
|
||||
, "comm": @inc=http://@env{CONFIG_SERVICE}/apps/common/comm
|
||||
, "active_instruments": {
|
||||
"ALPACA_SNDBX": {
|
||||
"dynamic_stock_list": {
|
||||
"exchange_id": "ALPACA"
|
||||
, "list_source": "redis"
|
||||
, "comm_settings": "/comm/pubsub/redis/cvtt-prod-eqty-01"
|
||||
, "redis_key": "DAY_STOCK_LIST"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
, "comm_settings": "/comm/pubsub/redis/cvtt-prod-eqty-01"
|
||||
, "session_type": "CALENDAR"
|
||||
, "calendar_session": {
|
||||
"trading_hours_url": [
|
||||
"GET"
|
||||
, "https://trading-calendar.cvtt.net/api/v1/markets/hours?mic=XNYS&start={start}&end={end}"
|
||||
]
|
||||
}
|
||||
, "books": {
|
||||
"ALPACA_BK02": {}
|
||||
, "ALPACA_BK_ILYA_01": {}
|
||||
}
|
||||
# --------------------------------------------------------------------
|
||||
, "md_portal": {
|
||||
"app_channel": "MD_PORTAL"
|
||||
, "exchanges_settings": {
|
||||
"*": {
|
||||
"mkt_data": {
|
||||
"enabled": true
|
||||
, "streaming": true
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
# --------------------------------------------------------------------
|
||||
, "trader": {
|
||||
"app_channel": "TRDR"
|
||||
|
||||
, "is_short_allowed": false
|
||||
, "exchanges_settings": {
|
||||
"*": {
|
||||
"mkt_data": {
|
||||
"enabled": true
|
||||
, "streaming": true
|
||||
},
|
||||
}
|
||||
}
|
||||
, "algos": @inc=http://@env{CONFIG_SERVICE}/apps/common/algos
|
||||
, "trading_pos_diff_pct_trigger": 10.0
|
||||
, "trading_depth": {
|
||||
"USD": 1000.0,
|
||||
}
|
||||
}
|
||||
# --------------------------------------------------------------------
|
||||
, "executor": {
|
||||
"app_channel": "EXEC"
|
||||
, "exchanges_settings": {
|
||||
"COINBASE_AT": {
|
||||
"order_entry": {
|
||||
"enabled": true
|
||||
, "streaming": true
|
||||
},
|
||||
"mkt_data": {
|
||||
"enabled": false
|
||||
, "streaming": false
|
||||
},
|
||||
"accounting": {
|
||||
"enabled": false
|
||||
, "streaming": false
|
||||
}
|
||||
, "credentials_key": {
|
||||
"read_only": "COINBASE_ADV_RO"
|
||||
, "trade": "COINBASE_ADV_TRD"
|
||||
}
|
||||
}
|
||||
, "ALPACA_SNDBX": {
|
||||
"order_entry": {
|
||||
"enabled": true
|
||||
, "streaming": true
|
||||
},
|
||||
"mkt_data": {
|
||||
"enabled": false
|
||||
, "streaming": false
|
||||
},
|
||||
"accounting": {
|
||||
"enabled": false
|
||||
, "streaming": false
|
||||
}
|
||||
, "credentials_key": {
|
||||
"read_only": "ALPACA_SANDBOX"
|
||||
, "trade": "ALPACA_SANDBOX"
|
||||
}
|
||||
}
|
||||
, "ALPACA_SNDBX-MDPORTAL": {
|
||||
"order_entry": {
|
||||
"enabled": true
|
||||
, "streaming": true
|
||||
},
|
||||
"mkt_data": {
|
||||
"enabled": false
|
||||
, "streaming": false
|
||||
},
|
||||
"accounting": {
|
||||
"enabled": false
|
||||
, "streaming": false
|
||||
}
|
||||
, "credentials_key": {
|
||||
"read_only": "ALPACA_SANDBOX"
|
||||
, "trade": "ALPACA_SANDBOX"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
# --------------------------------------------------------------------
|
||||
, "quant": {
|
||||
"app_channel": "QUANT"
|
||||
, "strategies": @inc=http://@env{CONFIG_SERVICE}/apps/common/strategies
|
||||
, "exchanges_settings": {
|
||||
"*": {
|
||||
"mkt_data": {
|
||||
"enabled": true
|
||||
, "streaming": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
# --------------------------------------------------------------------
|
||||
, "risk_manager": {
|
||||
"app_channel": "RMGR"
|
||||
# , "books": {
|
||||
# "CVTT_BK01": {}
|
||||
# }
|
||||
, "db": {
|
||||
"positions_table": "prod.cvtt_positions"
|
||||
, "cred_key": {
|
||||
"write": "TSDB_TRD_CVTTDATA"
|
||||
, "read_only": "TSDB_TRD_CVTTDATA"
|
||||
}
|
||||
}
|
||||
, "positions": {
|
||||
"load_interval_sec": 10.0
|
||||
, "to_store_zero_positions": false
|
||||
, "to_save_unchanged_positions": false
|
||||
}
|
||||
, "publish_value_interval": 10.0
|
||||
, "exchanges_settings": {
|
||||
"*": {
|
||||
"mkt_data": {
|
||||
"enabled": true
|
||||
, "streaming": true
|
||||
},
|
||||
"accounting": {
|
||||
"enabled": true
|
||||
, "streaming": false
|
||||
}
|
||||
, "credentials_key": {
|
||||
"trade": "ALPACA_SANDBOX"
|
||||
, "read_only": "ALPACA_SANDBOX"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
, "trading_recorder": {
|
||||
"app_channel": "TRDREC"
|
||||
, "format": "SQLite" # formats: "CSV", "TSDB", "SQLite"
|
||||
, "csv_settings": {
|
||||
"order_events_file_path": "%T.order_events.csv"
|
||||
"position_events_file_path": "%T.position_events.csv"
|
||||
}
|
||||
, "tsdb_settings": {
|
||||
"db": {
|
||||
"class": "cvttpy.tools.db.timescale.tsdb_client.TimescaleDbClient"
|
||||
, "cred_key": "TSDB_TRD_CVTTDATA_DB_TEST"
|
||||
}
|
||||
, "order_events_table": "backtest.trading_orders"
|
||||
, "trade_events_table": "backtest.trading_trades"
|
||||
, "trading_md_summary_table": "backtest.trading_md"
|
||||
}
|
||||
, "sqlite_settings": {
|
||||
# "file_name": "/tmp/%T.cvtt_backtest.db"
|
||||
"file_name": "/logs/%T.cvtt_alpaca_sandbox.db"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,135 +0,0 @@
|
||||
@var COORDINATOR_REST_PORT=23456
|
||||
# @var COORDINATOR_WS_PORT=12345
|
||||
|
||||
@var PRICER_REST_PORT=23457
|
||||
@var PRICER_WS_PORT=12346
|
||||
|
||||
@var GLOBAL_CHANNEL_PREFIX=CVTT_MU
|
||||
|
||||
{
|
||||
"refdata": @inc=http://@env{CONFIG_SERVICE}/refdata/refdata
|
||||
, "comm": @inc=http://@env{CONFIG_SERVICE}/apps/common/comm
|
||||
, "algos": @inc=http://@env{CONFIG_SERVICE}/apps/common/algos
|
||||
, "strategies": @inc=http://@env{CONFIG_SERVICE}/apps/common/strategies
|
||||
, "risk_strategies": @inc=http://@env{CONFIG_SERVICE}/apps/common/risk_strategies
|
||||
|
||||
, "comm_settings": @env{CONFIG_COMM_SETTINGS}
|
||||
, "global_channel_prefix": ${GLOBAL_CHANNEL_PREFIX}
|
||||
|
||||
, "coordinator": {
|
||||
"api": {
|
||||
"REST": {
|
||||
"port": ${COORDINATOR_REST_PORT},
|
||||
"base_url": ["POST", "http://localhost:${COORDINATOR_REST_PORT}"]
|
||||
}
|
||||
# , "WS": {
|
||||
# "url": "ws://localhost:${COORDINATOR_WS_PORT}/ws"
|
||||
# }
|
||||
}
|
||||
}
|
||||
, "market_data_gateway": {
|
||||
"exchanges_settings": {
|
||||
"*": {
|
||||
"mkt_data": {
|
||||
"enabled": true
|
||||
, "streaming": true
|
||||
},
|
||||
"order_entry": {
|
||||
"enabled": false
|
||||
, "streaming": false
|
||||
},
|
||||
"accounting": {
|
||||
"enabled": false
|
||||
, "streaming": false
|
||||
},
|
||||
},
|
||||
}
|
||||
, "channel_prefix": "${GLOBAL_CHANNEL_PREFIX}.MD_GW"
|
||||
, "app_status_channel": "${GLOBAL_CHANNEL_PREFIX}.MD_GW_APP_STATUS"
|
||||
, "exchanges": [
|
||||
"COINBASE_AT"
|
||||
, "BNBSPOT"
|
||||
]
|
||||
}
|
||||
, "order_entry_gateway": {
|
||||
"exchanges_settings": {
|
||||
"COINBASE_AT": {
|
||||
"mkt_data": {
|
||||
"enabled": false
|
||||
, "streaming": false
|
||||
},
|
||||
"order_entry": {
|
||||
"enabled": true
|
||||
, "streaming": true
|
||||
},
|
||||
"accounting": {
|
||||
"enabled": false
|
||||
, "streaming": false
|
||||
}
|
||||
}
|
||||
}
|
||||
, "channel_prefix": "${GLOBAL_CHANNEL_PREFIX}.OE_GW"
|
||||
, "app_status_channel": "${GLOBAL_CHANNEL_PREFIX}.OE_GW_APP_STATUS"
|
||||
, "exchanges": [
|
||||
"COINBASE_AT"
|
||||
]
|
||||
}
|
||||
, "accounting_gateway": {
|
||||
"exchanges_settings": {
|
||||
"COINBASE_AT": {
|
||||
"mkt_data": {
|
||||
"enabled": false
|
||||
, "streaming": false
|
||||
},
|
||||
"order_entry": {
|
||||
"enabled": false
|
||||
, "streaming": false
|
||||
},
|
||||
"accounting": {
|
||||
"enabled": true
|
||||
, "streaming": false
|
||||
}
|
||||
}
|
||||
}
|
||||
, "channel_prefix": "${GLOBAL_CHANNEL_PREFIX}.ACCT_GW"
|
||||
, "app_status_channel": "${GLOBAL_CHANNEL_PREFIX}.ACCT_GW_APP_STATUS"
|
||||
, "exchanges": [
|
||||
"ALPACA_SNDBX", "COINBASE_AT"
|
||||
]
|
||||
}
|
||||
, "quant": {
|
||||
"channel_prefix": "${GLOBAL_CHANNEL_PREFIX}.QUANT"
|
||||
, "app_status_channel": "${GLOBAL_CHANNEL_PREFIX}.QUANT_MUSVC_STATUS"
|
||||
}
|
||||
, "trader": {
|
||||
"channel_prefix": "${GLOBAL_CHANNEL_PREFIX}.TRADER"
|
||||
, "app_status_channel": "${GLOBAL_CHANNEL_PREFIX}.TRADER_MUSVC_STATUS"
|
||||
}
|
||||
, "bookkeeper": {
|
||||
"channel_prefix": "${GLOBAL_CHANNEL_PREFIX}.BKPR"
|
||||
, "app_status_channel": "${GLOBAL_CHANNEL_PREFIX}.BKPR_MUSVC_STATUS"
|
||||
, "db": {
|
||||
"server_type": "timescale",
|
||||
# "cred_key": "TSDB_TRADING_CVTT_TESTDB"
|
||||
"cred_key": "TSDB_CVTT_TRADINNG_PROD-01-RW"
|
||||
}
|
||||
}
|
||||
, "risk_manager": {
|
||||
"channel_prefix": "${GLOBAL_CHANNEL_PREFIX}.RMGR"
|
||||
, "app_status_channel": "${GLOBAL_CHANNEL_PREFIX}.RMGR_MUSVC_STATUS"
|
||||
, "revalue_interval_sec": 10.5
|
||||
}
|
||||
, "pricer": {
|
||||
"channel_prefix": "${GLOBAL_CHANNEL_PREFIX}.PXER"
|
||||
, "app_status_channel": "${GLOBAL_CHANNEL_PREFIX}.PXER_MUSVC_STATUS"
|
||||
, "api": {
|
||||
"REST": {
|
||||
"port": ${PRICER_REST_PORT},
|
||||
"base_url": ["POST", "http://localhost:${PRICER_REST_PORT}"]
|
||||
}
|
||||
, "WS": {
|
||||
"url": "ws://localhost:${PRICER_WS_PORT}/ws"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user