-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfig.yaml
More file actions
247 lines (197 loc) · 4.95 KB
/
config.yaml
File metadata and controls
247 lines (197 loc) · 4.95 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
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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
# TiMi System Configuration
# Mode: backtest, paper, live
mode: paper
# LLM Configuration
llm:
# Semantic Analysis - for macro/micro strategy analysis
semantic:
provider: openai # openai, anthropic
model: gpt-5-2025-08-07
# Alternative: claude-sonnet-4-5-20250514 (anthropic)
temperature: 0.7
max_tokens: 4000
# Code Programming - for bot evolution
code:
provider: openai
model: gpt-5-pro-2025-10-06
# Alternative: claude-sonnet-4-5-20250514 (anthropic) - best for coding
temperature: 0.3
max_tokens: 8000
# Mathematical Reasoning - for parameter optimization
reasoning:
provider: openai
model: gpt-5-pro-2025-10-06
# Alternative: claude-opus-4-1-20250514 (anthropic) - specialized reasoning
temperature: 0.2
max_tokens: 4000
# Exchange Configuration
exchange:
primary: binance
testnet: true # Use testnet for testing
binance:
rate_limit: 1200 # requests per minute
timeout: 30000 # milliseconds
cme:
enabled: false
# Trading Pairs Configuration
trading_pairs:
# Mainstream coins
mainstream:
- BTC/USDT
- ETH/USDT
- BNB/USDT
# Altcoins (higher volatility)
altcoins:
- SOL/USDT
- AVAX/USDT
- MATIC/USDT
# Active pairs (what to trade)
active: [] # Will be populated by strategy
# Strategy Parameters (Algorithm 1 from paper)
strategy:
# T1: Execution intervals (minutes)
execution_interval: 1
# T2: Look-back period for volatility calculation (minutes)
lookback_period: 60
# Volume requirement (minimum 24h volume in USD)
min_volume: 1000000
# Φreq: Minimum volatility requirement (%)
min_volatility: 0.5
# A: Capital allocation per pair (USD)
capital_per_pair: 100
# MP: Price distribution matrix (exponents for grid levels)
price_distribution: [0.5, 0.75, 1.0, 1.25, 1.5, 2.0, 2.5]
# MQ: Quantity distribution matrix (proportions)
quantity_distribution: [0.2, 0.2, 0.2, 0.15, 0.15, 0.05, 0.05]
# H: Profit/loss thresholds (multiples of volatility)
profit_loss_thresholds: [1.5, 2.0, 3.0, 5.0]
# Scaling coefficients
market_cap_coefficient: 1.0
funding_rate_coefficient: 1.0
entry_coefficient: 0.8
# Risk Management
risk:
# Maximum drawdown before emergency stop (%)
max_drawdown: 20
# Maximum position size as % of capital
max_position_pct: 10
# Maximum number of concurrent positions
max_concurrent_positions: 5
# Stop loss per position (%)
stop_loss_pct: 5
# Price deviation check (%)
max_price_deviation: 2
# Position size divisor (lambda from paper)
position_size_divisor: 10
# Optimization Stage Configuration
optimization:
enabled: true
# Simulation settings
simulation:
# Historical data period for backtesting
historical_days: 90
# Number of optimization cycles
max_cycles: 5
# Minimum performance improvement to continue
min_improvement: 0.05
# Feedback collection
feedback:
# Collect every N minutes during simulation
collection_interval: 60
# Metrics to track
metrics:
- annual_return
- sharpe_ratio
- max_drawdown
- win_rate
- profit_factor
# Agent Configuration
agents:
macro_analysis:
enabled: true
# Technical indicators to analyze
indicators:
- SMA
- EMA
- RSI
- MACD
- Bollinger_Bands
- ATR
- Volume
# Time windows for analysis (in days)
time_windows: [1, 7, 30, 90]
strategy_adaptation:
enabled: true
# Pair-specific factors to consider
factors:
- historical_volatility
- liquidity_depth
- correlation_with_btc
- funding_rate_history
bot_evolution:
enabled: true
# Programming laws enforcement
enforce_laws: true
# Code quality checks
quality_checks:
- syntax_validation
- security_scan
- performance_check
feedback_reflection:
enabled: true
# Optimization approach
method: linear_programming
# Hierarchical levels
optimization_levels:
- parameter
- function
- strategy
# Monitoring and Logging
monitoring:
enabled: true
port: 8000
# Metrics to expose
metrics:
- active_positions
- total_pnl
- win_rate
- order_latency
- api_errors
# Alert thresholds
alerts:
drawdown_threshold: 10 # Alert if drawdown exceeds %
error_rate_threshold: 5 # Alert if errors exceed N per minute
logging:
level: INFO
format: json
# Log to file
file:
enabled: true
path: logs/timi.log
max_size_mb: 100
backup_count: 5
# Log to console
console:
enabled: true
# Database
database:
# Store trading history, feedback, etc.
type: sqlite
path: data/timi.db
# Tables to maintain
tables:
- trades
- positions
- feedback
- bot_versions
- optimization_history
# Backtesting
backtest:
# Data source
data_source: binance
# Initial capital
initial_capital: 10000
# Commission rate
commission: 0.001 # 0.1%
# Slippage model
slippage: 0.0005 # 0.05%