forked from beatzxbt/smm
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparameters.yaml.example
More file actions
133 lines (127 loc) · 7.43 KB
/
parameters.yaml.example
File metadata and controls
133 lines (127 loc) · 7.43 KB
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
# =============================================================================
# parameters.yaml.example - 参数说明 (Parameter Reference)
# =============================================================================
#
# --- 账户与数据源 Account & Data Feed ---
#
# account_size
# Unit: USD | 单位:美元
# English: Account size in USD. Used to compute the maximum position value
# (acc_max = account_size * leverage / 2.05). inventory_delta is
# position_value/acc_max, so this sets the scale for inventory risk.
# 中文: 账户规模(美元)。用于计算最大持仓价值(acc_max = account_size * 杠杆 / 2.05),
# inventory_delta = 持仓价值/acc_max,即用该值设定库存/风险规模。
#
# primary_data_feed
# Unit: (none, choice string) | 单位:无,取值为 "Binance" 或 "Bybit"
# English: Primary market data source. "Binance" or "Bybit". If "Binance", the
# app subscribes to Binance USD-M WebSocket and uses Binance+Bybit
# features for skew; if "Bybit", only Bybit data is used for skew.
# 中文: 主行情数据源。选 "Binance" 会同时订阅币安 U 本位 WebSocket 并用币安+Bybit 计算 skew;
# 选 "Bybit" 则仅用 Bybit 数据计算 skew。交易与下单均在 Bybit。
#
# binance_symbol / bybit_symbol
# Unit: (none, trading pair string) | 单位:无,交易对字符串,如 ETHUSDT
# English: Derivatives symbol on Binance USD-M and Bybit Futures (e.g. ETHUSDT).
# bybit_symbol is always used for trading; binance_symbol only when
# primary_data_feed is Binance.
# 中文: 币安 U 本位与 Bybit 合约的交易对(如 ETHUSDT)。实际交易始终在 Bybit;仅当
# primary_data_feed 为 Binance 时才会使用 binance_symbol 订阅币安行情。
#
# --- 主偏移量 Master Offsets ---
#
# price_offset
# Unit: quote currency per unit of base (e.g. USDT for ETHUSDT) | 单位:报价货币/标的单位(如 ETHUSDT 即为 USDT)
# English: Constant added to every generated bid/ask price. Positive = all
# quotes shift higher. API may reject if resulting prices are outside
# exchange min/max or below zero.
# 中文: 对所有生成的买卖报价统一加上的价格偏移。正数=整体抬价。若导致价格超出交易所
# 范围或低于 0,接口可能报错。
#
# size_offset
# Unit: base asset quantity (e.g. ETH for ETHUSDT) | 单位:标的资产数量(如 ETHUSDT 即为 ETH)
# English: Constant added to every generated bid/ask size. Positive = larger
# sizes. API may reject if any size is below the exchange minimum.
# 中文: 对所有生成的买卖数量统一加上的数量偏移。正数=整体加大挂单量。若导致任何一档
# 低于交易所最小下单量,接口可能报错。
#
# volatility_offset
# Unit: same as price, quote currency per unit of base (e.g. USDT) | 单位:与价格相同,报价货币/标的单位(如 USDT)
# English: Added to the computed volatility (BBW result). Volatility is used to
# (1) scale base_spread (multiplier 1~10) and (2) set quote range
# (base_range = volatility_value/2). Positive = wider spread and range.
# 中文: 与计算得到的波动率(BBW)相加。波动率用于:(1) 放大 base_spread(1~10 倍);
# (2) 设定报价区间(base_range = volatility_value/2)。正数=价差与报价区间都变宽。
#
# --- 做市参数 Market Maker Settings ---
#
# base_spread
# Unit: quote currency per unit of base (e.g. USDT for ETHUSDT) | 单位:报价货币/标的单位(如 ETHUSDT 即为 USDT)
# English: Minimum spread (in quote currency units) between best bid and best ask.
# Actual spread = base_spread * multiplier, where multiplier is
# clipped from (volatility*100/mid) to [1, 10]. So spread scales with
# volatility, with base_spread as the floor.
# 中文: 最优买卖价之间的最小价差(报价货币单位)。实际价差 = base_spread * 系数,系数由
# (波动率*100/中间价) 裁剪到 [1,10],即随波动率放大,base_spread 为下限。
#
# min_order_size
# Unit: base asset quantity (e.g. ETH for ETHUSDT) | 单位:标的资产数量(如 ETHUSDT 即为 ETH)
# English: Minimum size for the order closest to mid (best bid/ask). Farther
# orders use sizes between min and max, scaled by skew.
# 中文: 最靠近中间价那一档挂单的最小数量。更远的档位在 min~max 之间按 skew 插值。
#
# max_order_size
# Unit: base asset quantity (e.g. ETH for ETHUSDT) | 单位:标的资产数量(如 ETHUSDT 即为 ETH)
# English: Maximum size for the order farthest from mid. bid_upper = max*(1-bid_skew),
# ask_upper = max*(1-ask_skew). With skew, effective max can be lower.
# 中文: 离中间价最远一档挂单的最大数量。bid_upper = max*(1-bid_skew),
# ask_upper = max*(1-ask_skew),随 skew 会变小。
#
# inventory_extreme
# Unit: dimensionless ratio in (0, 1) | 单位:无纲量比例,取值区间 (0, 1)
# English: Threshold in (0, 1). When inventory_delta >= inventory_extreme, the
# strategy stops quoting asks (reduce-only on ask side). When
# inventory_delta <= -inventory_extreme, it stops quoting bids. So it
# defines when to go “one-sided” to reduce inventory risk.
# 中文: 区间 (0,1) 的阈值。当 inventory_delta >= inventory_extreme 时不再挂卖单(仅减仓);
# 当 inventory_delta <= -inventory_extreme 时不再挂买单。即定义何时只做一侧以控库存风险。
#
# --- 波动率 Volatility (BBW) ---
#
# bollinger_band_length
# Unit: count (number of 1-minute candles) | 单位:根数(1 分钟 K 线数量)
# English: Lookback period (number of 1-minute candles) for Bollinger Band Width
# (BBW). BBW = 2 * bb_band_std * std(closes[-length:]). Used as
# volatility_value to scale spread and quote range.
# 中文: 布林带宽度(BBW)的回看周期(1 分钟 K 线根数)。BBW = 2 * bb_band_std * std(收盘价)。
# 结果作为 volatility_value 用于放大价差和报价区间。
#
# bollinger_band_std
# Unit: dimensionless multiplier | 单位:无纲量倍数
# English: Standard deviation multiplier for BBW (width = 2 * this * std).
# Larger value = wider bands = higher volatility_value = wider spread/range.
# 中文: BBW 的标准差倍数(宽度 = 2 * 该值 * std)。越大则带越宽、波动率越大、价差与区间越宽。
#
# =============================================================================
account_size: 100
primary_data_feed: Binance # Choices: ["Binance", "Bybit"]
binance_symbol: ETHUSDT
bybit_symbol: ETHUSDT
# Master offsets
price_offset: 0.0
size_offset: 0.0
# 计算布林带宽度后 这里会加一个偏移值
# 主要防止波动过低的时候布林带宽度过低 导致挂单间隔超级小
volatility_offset: 0.0
# Market Maker Settings
# 属于基础的 spread设置,我觉得这个值根据交易对价格结合费率定期调整
base_spread: 5
min_order_size: 0.01
max_order_size: 0.1
# inventory_delta 的最大值
inventory_extreme: 0.5
# Volatility settings
# 计算布林带指标需要的 K线数量
bollinger_band_length: 20
# 布林带的标准差倍数(宽度 = 2 * 该值 * std)。越大则带越宽、波动率越大、价差与区间越宽。
bollinger_band_std: 2.5