fix: exit_price=last_price в executor, time_exit=ON, exp20 результаты
1. executor.py:266 — exit_price=last_price вместо stop_price (реальная биржа исполняет по рыночной цене, не по уровню стопа) 2. config.yaml — time_exit=true (exp20: Sharpe 1.10, DD 15.7% vs 0.98/20.2%) 3. exp19 — исправлен пропущенный stop_scale=0.5 4. exp20 — новый эксперимент: повторный тест отклонённых идей с 50% slippage Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -13,7 +13,7 @@ risk:
|
||||
max_open_positions: 6 # 6 assets (XRP removed), one position per asset
|
||||
leverage: 2 # 2x spot margin (exp12: DD ~14%, Sharpe stable)
|
||||
stop_scale: 0.5 # exp16e: tighter stop = faster exit + cooldown (Sharpe 4.15)
|
||||
time_exit: false # exp16e: no forced close, hold until stop (Sharpe +70%)
|
||||
time_exit: true # exp20: time_exit=ON → Sharpe 1.10, DD 15.7% (was 0.98/20.2%)
|
||||
safety_stop_pct: 0.10 # 10% hard stop on exchange (flash crash protection)
|
||||
|
||||
assets:
|
||||
|
||||
+14943
File diff suppressed because it is too large
Load Diff
+14943
File diff suppressed because it is too large
Load Diff
+14943
File diff suppressed because it is too large
Load Diff
+14150
File diff suppressed because it is too large
Load Diff
+10413
File diff suppressed because it is too large
Load Diff
@@ -426,7 +426,8 @@ def main():
|
||||
|
||||
k_adj, stop_mult = risk.regime_adaptive_params(prices, price_idx, asset_k)
|
||||
atr = risk.compute_atr(prices, price_idx)
|
||||
stop_dist = max(atr * stop_mult, current_price * 0.005)
|
||||
# stop_scale=0.5 matches production (was missing before exp20 found it)
|
||||
stop_dist = max(atr * stop_mult * 0.5, current_price * 0.005)
|
||||
|
||||
# Lock margin (only margin_needed from free_usdc, haircut+IM tracked separately)
|
||||
free_usdc -= req["margin_needed"]
|
||||
|
||||
+566
@@ -0,0 +1,566 @@
|
||||
{
|
||||
"configs": {
|
||||
"BASELINE": {
|
||||
"stop_scale": 0.5,
|
||||
"assets": [
|
||||
{
|
||||
"ticker": "BTC-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.241,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "ETH-USD",
|
||||
"tf": "2h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.158,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "ADA-USD",
|
||||
"tf": "4h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "DOT-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "DOGE-USD",
|
||||
"tf": "4h",
|
||||
"ws": 48,
|
||||
"leverage": 2,
|
||||
"weight": 0.127,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "SOL-USD",
|
||||
"tf": "2h",
|
||||
"ws": 128,
|
||||
"leverage": 2,
|
||||
"weight": 0.108,
|
||||
"K": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
"A_ss075": {
|
||||
"stop_scale": 0.75,
|
||||
"assets": [
|
||||
{
|
||||
"ticker": "BTC-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.241,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "ETH-USD",
|
||||
"tf": "2h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.158,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "ADA-USD",
|
||||
"tf": "4h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "DOT-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "DOGE-USD",
|
||||
"tf": "4h",
|
||||
"ws": 48,
|
||||
"leverage": 2,
|
||||
"weight": 0.127,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "SOL-USD",
|
||||
"tf": "2h",
|
||||
"ws": 128,
|
||||
"leverage": 2,
|
||||
"weight": 0.108,
|
||||
"K": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
"B_btc3x": {
|
||||
"stop_scale": 0.5,
|
||||
"assets": [
|
||||
{
|
||||
"ticker": "BTC-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 3,
|
||||
"weight": 0.241,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "ETH-USD",
|
||||
"tf": "2h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.158,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "ADA-USD",
|
||||
"tf": "4h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "DOT-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "DOGE-USD",
|
||||
"tf": "4h",
|
||||
"ws": 48,
|
||||
"leverage": 2,
|
||||
"weight": 0.127,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "SOL-USD",
|
||||
"tf": "2h",
|
||||
"ws": 128,
|
||||
"leverage": 2,
|
||||
"weight": 0.108,
|
||||
"K": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
"C_aggr_wt": {
|
||||
"stop_scale": 0.5,
|
||||
"assets": [
|
||||
{
|
||||
"ticker": "BTC-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.15,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "ETH-USD",
|
||||
"tf": "2h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.1,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "ADA-USD",
|
||||
"tf": "4h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.22,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "DOT-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.22,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "DOGE-USD",
|
||||
"tf": "4h",
|
||||
"ws": 48,
|
||||
"leverage": 2,
|
||||
"weight": 0.2,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "SOL-USD",
|
||||
"tf": "2h",
|
||||
"ws": 128,
|
||||
"leverage": 2,
|
||||
"weight": 0.11,
|
||||
"K": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
"D_ss075_btc3x": {
|
||||
"stop_scale": 0.75,
|
||||
"assets": [
|
||||
{
|
||||
"ticker": "BTC-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 3,
|
||||
"weight": 0.241,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "ETH-USD",
|
||||
"tf": "2h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.158,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "ADA-USD",
|
||||
"tf": "4h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "DOT-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "DOGE-USD",
|
||||
"tf": "4h",
|
||||
"ws": 48,
|
||||
"leverage": 2,
|
||||
"weight": 0.127,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "SOL-USD",
|
||||
"tf": "2h",
|
||||
"ws": 128,
|
||||
"leverage": 2,
|
||||
"weight": 0.108,
|
||||
"K": 2
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"results": [
|
||||
{
|
||||
"config": "BASELINE",
|
||||
"stop_scale": 0.5,
|
||||
"final_equity": 1045.79,
|
||||
"total_pnl": 791.79,
|
||||
"total_ret": 311.7,
|
||||
"sharpe": 3.14,
|
||||
"max_dd": 9.1,
|
||||
"trades": 718,
|
||||
"wins": 293,
|
||||
"wr": 40.8,
|
||||
"commission": 252.0,
|
||||
"interest": 7.53,
|
||||
"skipped": {
|
||||
"margin": 0,
|
||||
"cooldown": 730,
|
||||
"corr": 163,
|
||||
"short": 947,
|
||||
"imr": 18
|
||||
},
|
||||
"per_asset": {
|
||||
"BTC-USD": {
|
||||
"pnl": 71.54,
|
||||
"trades": 70,
|
||||
"wins": 30,
|
||||
"wr": 42.9
|
||||
},
|
||||
"ETH-USD": {
|
||||
"pnl": 85.5,
|
||||
"trades": 160,
|
||||
"wins": 67,
|
||||
"wr": 41.9
|
||||
},
|
||||
"ADA-USD": {
|
||||
"pnl": 197.81,
|
||||
"trades": 74,
|
||||
"wins": 30,
|
||||
"wr": 40.5
|
||||
},
|
||||
"DOT-USD": {
|
||||
"pnl": 180.26,
|
||||
"trades": 97,
|
||||
"wins": 38,
|
||||
"wr": 39.2
|
||||
},
|
||||
"DOGE-USD": {
|
||||
"pnl": 155.7,
|
||||
"trades": 116,
|
||||
"wins": 49,
|
||||
"wr": 42.2
|
||||
},
|
||||
"SOL-USD": {
|
||||
"pnl": 100.98,
|
||||
"trades": 201,
|
||||
"wins": 79,
|
||||
"wr": 39.3
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "A_ss075",
|
||||
"stop_scale": 0.75,
|
||||
"final_equity": 732.89,
|
||||
"total_pnl": 478.89,
|
||||
"total_ret": 188.5,
|
||||
"sharpe": 2.32,
|
||||
"max_dd": 11.2,
|
||||
"trades": 664,
|
||||
"wins": 251,
|
||||
"wr": 37.8,
|
||||
"commission": 195.61,
|
||||
"interest": 8.43,
|
||||
"skipped": {
|
||||
"margin": 0,
|
||||
"cooldown": 708,
|
||||
"corr": 177,
|
||||
"short": 916,
|
||||
"imr": 23
|
||||
},
|
||||
"per_asset": {
|
||||
"BTC-USD": {
|
||||
"pnl": 66.53,
|
||||
"trades": 66,
|
||||
"wins": 26,
|
||||
"wr": 39.4
|
||||
},
|
||||
"ETH-USD": {
|
||||
"pnl": -6.02,
|
||||
"trades": 143,
|
||||
"wins": 50,
|
||||
"wr": 35.0
|
||||
},
|
||||
"ADA-USD": {
|
||||
"pnl": 107.78,
|
||||
"trades": 65,
|
||||
"wins": 24,
|
||||
"wr": 36.9
|
||||
},
|
||||
"DOT-USD": {
|
||||
"pnl": 140.39,
|
||||
"trades": 93,
|
||||
"wins": 39,
|
||||
"wr": 41.9
|
||||
},
|
||||
"DOGE-USD": {
|
||||
"pnl": 90.78,
|
||||
"trades": 113,
|
||||
"wins": 43,
|
||||
"wr": 38.1
|
||||
},
|
||||
"SOL-USD": {
|
||||
"pnl": 79.42,
|
||||
"trades": 184,
|
||||
"wins": 69,
|
||||
"wr": 37.5
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "B_btc3x",
|
||||
"stop_scale": 0.5,
|
||||
"final_equity": 1090.29,
|
||||
"total_pnl": 836.29,
|
||||
"total_ret": 329.2,
|
||||
"sharpe": 3.18,
|
||||
"max_dd": 9.2,
|
||||
"trades": 718,
|
||||
"wins": 293,
|
||||
"wr": 40.8,
|
||||
"commission": 275.7,
|
||||
"interest": 9.17,
|
||||
"skipped": {
|
||||
"margin": 0,
|
||||
"cooldown": 730,
|
||||
"corr": 163,
|
||||
"short": 947,
|
||||
"imr": 18
|
||||
},
|
||||
"per_asset": {
|
||||
"BTC-USD": {
|
||||
"pnl": 108.04,
|
||||
"trades": 70,
|
||||
"wins": 30,
|
||||
"wr": 42.9
|
||||
},
|
||||
"ETH-USD": {
|
||||
"pnl": 85.58,
|
||||
"trades": 160,
|
||||
"wins": 67,
|
||||
"wr": 41.9
|
||||
},
|
||||
"ADA-USD": {
|
||||
"pnl": 199.74,
|
||||
"trades": 74,
|
||||
"wins": 30,
|
||||
"wr": 40.5
|
||||
},
|
||||
"DOT-USD": {
|
||||
"pnl": 182.6,
|
||||
"trades": 97,
|
||||
"wins": 38,
|
||||
"wr": 39.2
|
||||
},
|
||||
"DOGE-USD": {
|
||||
"pnl": 157.41,
|
||||
"trades": 116,
|
||||
"wins": 49,
|
||||
"wr": 42.2
|
||||
},
|
||||
"SOL-USD": {
|
||||
"pnl": 102.91,
|
||||
"trades": 201,
|
||||
"wins": 79,
|
||||
"wr": 39.3
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "C_aggr_wt",
|
||||
"stop_scale": 0.5,
|
||||
"final_equity": 1226.66,
|
||||
"total_pnl": 972.66,
|
||||
"total_ret": 382.9,
|
||||
"sharpe": 3.13,
|
||||
"max_dd": 10.7,
|
||||
"trades": 707,
|
||||
"wins": 289,
|
||||
"wr": 40.9,
|
||||
"commission": 273.22,
|
||||
"interest": 8.46,
|
||||
"skipped": {
|
||||
"margin": 0,
|
||||
"cooldown": 723,
|
||||
"corr": 161,
|
||||
"short": 947,
|
||||
"imr": 35
|
||||
},
|
||||
"per_asset": {
|
||||
"BTC-USD": {
|
||||
"pnl": 48.97,
|
||||
"trades": 68,
|
||||
"wins": 29,
|
||||
"wr": 42.6
|
||||
},
|
||||
"ETH-USD": {
|
||||
"pnl": 54.8,
|
||||
"trades": 158,
|
||||
"wins": 66,
|
||||
"wr": 41.8
|
||||
},
|
||||
"ADA-USD": {
|
||||
"pnl": 248.3,
|
||||
"trades": 74,
|
||||
"wins": 30,
|
||||
"wr": 40.5
|
||||
},
|
||||
"DOT-USD": {
|
||||
"pnl": 238.59,
|
||||
"trades": 97,
|
||||
"wins": 38,
|
||||
"wr": 39.2
|
||||
},
|
||||
"DOGE-USD": {
|
||||
"pnl": 266.43,
|
||||
"trades": 116,
|
||||
"wins": 49,
|
||||
"wr": 42.2
|
||||
},
|
||||
"SOL-USD": {
|
||||
"pnl": 115.58,
|
||||
"trades": 194,
|
||||
"wins": 77,
|
||||
"wr": 39.7
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "D_ss075_btc3x",
|
||||
"stop_scale": 0.75,
|
||||
"final_equity": 774.66,
|
||||
"total_pnl": 520.66,
|
||||
"total_ret": 205.0,
|
||||
"sharpe": 2.36,
|
||||
"max_dd": 11.8,
|
||||
"trades": 664,
|
||||
"wins": 250,
|
||||
"wr": 37.7,
|
||||
"commission": 216.93,
|
||||
"interest": 10.45,
|
||||
"skipped": {
|
||||
"margin": 0,
|
||||
"cooldown": 708,
|
||||
"corr": 177,
|
||||
"short": 916,
|
||||
"imr": 23
|
||||
},
|
||||
"per_asset": {
|
||||
"BTC-USD": {
|
||||
"pnl": 100.76,
|
||||
"trades": 66,
|
||||
"wins": 25,
|
||||
"wr": 37.9
|
||||
},
|
||||
"ETH-USD": {
|
||||
"pnl": -7.55,
|
||||
"trades": 143,
|
||||
"wins": 50,
|
||||
"wr": 35.0
|
||||
},
|
||||
"ADA-USD": {
|
||||
"pnl": 109.65,
|
||||
"trades": 65,
|
||||
"wins": 24,
|
||||
"wr": 36.9
|
||||
},
|
||||
"DOT-USD": {
|
||||
"pnl": 143.81,
|
||||
"trades": 93,
|
||||
"wins": 39,
|
||||
"wr": 41.9
|
||||
},
|
||||
"DOGE-USD": {
|
||||
"pnl": 92.42,
|
||||
"trades": 113,
|
||||
"wins": 43,
|
||||
"wr": 38.1
|
||||
},
|
||||
"SOL-USD": {
|
||||
"pnl": 81.56,
|
||||
"trades": 184,
|
||||
"wins": 69,
|
||||
"wr": 37.5
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+798
@@ -0,0 +1,798 @@
|
||||
{
|
||||
"configs": {
|
||||
"BASELINE": {
|
||||
"stop_scale": 0.5,
|
||||
"assets": [
|
||||
{
|
||||
"ticker": "BTC-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.241,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "ETH-USD",
|
||||
"tf": "2h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.158,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "ADA-USD",
|
||||
"tf": "4h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "DOT-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "DOGE-USD",
|
||||
"tf": "4h",
|
||||
"ws": 48,
|
||||
"leverage": 2,
|
||||
"weight": 0.127,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "SOL-USD",
|
||||
"tf": "2h",
|
||||
"ws": 128,
|
||||
"leverage": 2,
|
||||
"weight": 0.108,
|
||||
"K": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
"A_ss075": {
|
||||
"stop_scale": 0.75,
|
||||
"assets": [
|
||||
{
|
||||
"ticker": "BTC-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.241,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "ETH-USD",
|
||||
"tf": "2h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.158,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "ADA-USD",
|
||||
"tf": "4h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "DOT-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "DOGE-USD",
|
||||
"tf": "4h",
|
||||
"ws": 48,
|
||||
"leverage": 2,
|
||||
"weight": 0.127,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "SOL-USD",
|
||||
"tf": "2h",
|
||||
"ws": 128,
|
||||
"leverage": 2,
|
||||
"weight": 0.108,
|
||||
"K": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
"B_btc3x": {
|
||||
"stop_scale": 0.5,
|
||||
"assets": [
|
||||
{
|
||||
"ticker": "BTC-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 3,
|
||||
"weight": 0.241,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "ETH-USD",
|
||||
"tf": "2h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.158,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "ADA-USD",
|
||||
"tf": "4h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "DOT-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "DOGE-USD",
|
||||
"tf": "4h",
|
||||
"ws": 48,
|
||||
"leverage": 2,
|
||||
"weight": 0.127,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "SOL-USD",
|
||||
"tf": "2h",
|
||||
"ws": 128,
|
||||
"leverage": 2,
|
||||
"weight": 0.108,
|
||||
"K": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
"C_aggr_wt": {
|
||||
"stop_scale": 0.5,
|
||||
"assets": [
|
||||
{
|
||||
"ticker": "BTC-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.15,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "ETH-USD",
|
||||
"tf": "2h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.1,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "ADA-USD",
|
||||
"tf": "4h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.22,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "DOT-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.22,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "DOGE-USD",
|
||||
"tf": "4h",
|
||||
"ws": 48,
|
||||
"leverage": 2,
|
||||
"weight": 0.2,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "SOL-USD",
|
||||
"tf": "2h",
|
||||
"ws": 128,
|
||||
"leverage": 2,
|
||||
"weight": 0.11,
|
||||
"K": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
"D_ss075_btc3x": {
|
||||
"stop_scale": 0.75,
|
||||
"assets": [
|
||||
{
|
||||
"ticker": "BTC-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 3,
|
||||
"weight": 0.241,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "ETH-USD",
|
||||
"tf": "2h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.158,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "ADA-USD",
|
||||
"tf": "4h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "DOT-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "DOGE-USD",
|
||||
"tf": "4h",
|
||||
"ws": 48,
|
||||
"leverage": 2,
|
||||
"weight": 0.127,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "SOL-USD",
|
||||
"tf": "2h",
|
||||
"ws": 128,
|
||||
"leverage": 2,
|
||||
"weight": 0.108,
|
||||
"K": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
"CTRL_ss05_te": {
|
||||
"stop_scale": 0.5,
|
||||
"time_exit": true,
|
||||
"assets": [
|
||||
{
|
||||
"ticker": "BTC-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.241,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "ETH-USD",
|
||||
"tf": "2h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.158,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "ADA-USD",
|
||||
"tf": "4h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "DOT-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "DOGE-USD",
|
||||
"tf": "4h",
|
||||
"ws": 48,
|
||||
"leverage": 2,
|
||||
"weight": 0.127,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "SOL-USD",
|
||||
"tf": "2h",
|
||||
"ws": 128,
|
||||
"leverage": 2,
|
||||
"weight": 0.108,
|
||||
"K": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
"CTRL_ss10_no": {
|
||||
"stop_scale": 1.0,
|
||||
"assets": [
|
||||
{
|
||||
"ticker": "BTC-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.241,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "ETH-USD",
|
||||
"tf": "2h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.158,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "ADA-USD",
|
||||
"tf": "4h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "DOT-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "DOGE-USD",
|
||||
"tf": "4h",
|
||||
"ws": 48,
|
||||
"leverage": 2,
|
||||
"weight": 0.127,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "SOL-USD",
|
||||
"tf": "2h",
|
||||
"ws": 128,
|
||||
"leverage": 2,
|
||||
"weight": 0.108,
|
||||
"K": 2
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"results": [
|
||||
{
|
||||
"config": "BASELINE",
|
||||
"stop_scale": 0.5,
|
||||
"time_exit": false,
|
||||
"final_equity": 1045.79,
|
||||
"total_pnl": 791.79,
|
||||
"total_ret": 311.7,
|
||||
"sharpe": 3.14,
|
||||
"max_dd": 9.1,
|
||||
"trades": 718,
|
||||
"wins": 293,
|
||||
"wr": 40.8,
|
||||
"commission": 252.0,
|
||||
"interest": 7.53,
|
||||
"skipped": {
|
||||
"margin": 0,
|
||||
"cooldown": 730,
|
||||
"corr": 163,
|
||||
"short": 947,
|
||||
"imr": 18
|
||||
},
|
||||
"per_asset": {
|
||||
"BTC-USD": {
|
||||
"pnl": 71.54,
|
||||
"trades": 70,
|
||||
"wins": 30,
|
||||
"wr": 42.9
|
||||
},
|
||||
"ETH-USD": {
|
||||
"pnl": 85.5,
|
||||
"trades": 160,
|
||||
"wins": 67,
|
||||
"wr": 41.9
|
||||
},
|
||||
"ADA-USD": {
|
||||
"pnl": 197.81,
|
||||
"trades": 74,
|
||||
"wins": 30,
|
||||
"wr": 40.5
|
||||
},
|
||||
"DOT-USD": {
|
||||
"pnl": 180.26,
|
||||
"trades": 97,
|
||||
"wins": 38,
|
||||
"wr": 39.2
|
||||
},
|
||||
"DOGE-USD": {
|
||||
"pnl": 155.7,
|
||||
"trades": 116,
|
||||
"wins": 49,
|
||||
"wr": 42.2
|
||||
},
|
||||
"SOL-USD": {
|
||||
"pnl": 100.98,
|
||||
"trades": 201,
|
||||
"wins": 79,
|
||||
"wr": 39.3
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "A_ss075",
|
||||
"stop_scale": 0.75,
|
||||
"time_exit": false,
|
||||
"final_equity": 732.89,
|
||||
"total_pnl": 478.89,
|
||||
"total_ret": 188.5,
|
||||
"sharpe": 2.32,
|
||||
"max_dd": 11.2,
|
||||
"trades": 664,
|
||||
"wins": 251,
|
||||
"wr": 37.8,
|
||||
"commission": 195.61,
|
||||
"interest": 8.43,
|
||||
"skipped": {
|
||||
"margin": 0,
|
||||
"cooldown": 708,
|
||||
"corr": 177,
|
||||
"short": 916,
|
||||
"imr": 23
|
||||
},
|
||||
"per_asset": {
|
||||
"BTC-USD": {
|
||||
"pnl": 66.53,
|
||||
"trades": 66,
|
||||
"wins": 26,
|
||||
"wr": 39.4
|
||||
},
|
||||
"ETH-USD": {
|
||||
"pnl": -6.02,
|
||||
"trades": 143,
|
||||
"wins": 50,
|
||||
"wr": 35.0
|
||||
},
|
||||
"ADA-USD": {
|
||||
"pnl": 107.78,
|
||||
"trades": 65,
|
||||
"wins": 24,
|
||||
"wr": 36.9
|
||||
},
|
||||
"DOT-USD": {
|
||||
"pnl": 140.39,
|
||||
"trades": 93,
|
||||
"wins": 39,
|
||||
"wr": 41.9
|
||||
},
|
||||
"DOGE-USD": {
|
||||
"pnl": 90.78,
|
||||
"trades": 113,
|
||||
"wins": 43,
|
||||
"wr": 38.1
|
||||
},
|
||||
"SOL-USD": {
|
||||
"pnl": 79.42,
|
||||
"trades": 184,
|
||||
"wins": 69,
|
||||
"wr": 37.5
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "B_btc3x",
|
||||
"stop_scale": 0.5,
|
||||
"time_exit": false,
|
||||
"final_equity": 1090.29,
|
||||
"total_pnl": 836.29,
|
||||
"total_ret": 329.2,
|
||||
"sharpe": 3.18,
|
||||
"max_dd": 9.2,
|
||||
"trades": 718,
|
||||
"wins": 293,
|
||||
"wr": 40.8,
|
||||
"commission": 275.7,
|
||||
"interest": 9.17,
|
||||
"skipped": {
|
||||
"margin": 0,
|
||||
"cooldown": 730,
|
||||
"corr": 163,
|
||||
"short": 947,
|
||||
"imr": 18
|
||||
},
|
||||
"per_asset": {
|
||||
"BTC-USD": {
|
||||
"pnl": 108.04,
|
||||
"trades": 70,
|
||||
"wins": 30,
|
||||
"wr": 42.9
|
||||
},
|
||||
"ETH-USD": {
|
||||
"pnl": 85.58,
|
||||
"trades": 160,
|
||||
"wins": 67,
|
||||
"wr": 41.9
|
||||
},
|
||||
"ADA-USD": {
|
||||
"pnl": 199.74,
|
||||
"trades": 74,
|
||||
"wins": 30,
|
||||
"wr": 40.5
|
||||
},
|
||||
"DOT-USD": {
|
||||
"pnl": 182.6,
|
||||
"trades": 97,
|
||||
"wins": 38,
|
||||
"wr": 39.2
|
||||
},
|
||||
"DOGE-USD": {
|
||||
"pnl": 157.41,
|
||||
"trades": 116,
|
||||
"wins": 49,
|
||||
"wr": 42.2
|
||||
},
|
||||
"SOL-USD": {
|
||||
"pnl": 102.91,
|
||||
"trades": 201,
|
||||
"wins": 79,
|
||||
"wr": 39.3
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "C_aggr_wt",
|
||||
"stop_scale": 0.5,
|
||||
"time_exit": false,
|
||||
"final_equity": 1226.66,
|
||||
"total_pnl": 972.66,
|
||||
"total_ret": 382.9,
|
||||
"sharpe": 3.13,
|
||||
"max_dd": 10.7,
|
||||
"trades": 707,
|
||||
"wins": 289,
|
||||
"wr": 40.9,
|
||||
"commission": 273.22,
|
||||
"interest": 8.46,
|
||||
"skipped": {
|
||||
"margin": 0,
|
||||
"cooldown": 723,
|
||||
"corr": 161,
|
||||
"short": 947,
|
||||
"imr": 35
|
||||
},
|
||||
"per_asset": {
|
||||
"BTC-USD": {
|
||||
"pnl": 48.97,
|
||||
"trades": 68,
|
||||
"wins": 29,
|
||||
"wr": 42.6
|
||||
},
|
||||
"ETH-USD": {
|
||||
"pnl": 54.8,
|
||||
"trades": 158,
|
||||
"wins": 66,
|
||||
"wr": 41.8
|
||||
},
|
||||
"ADA-USD": {
|
||||
"pnl": 248.3,
|
||||
"trades": 74,
|
||||
"wins": 30,
|
||||
"wr": 40.5
|
||||
},
|
||||
"DOT-USD": {
|
||||
"pnl": 238.59,
|
||||
"trades": 97,
|
||||
"wins": 38,
|
||||
"wr": 39.2
|
||||
},
|
||||
"DOGE-USD": {
|
||||
"pnl": 266.43,
|
||||
"trades": 116,
|
||||
"wins": 49,
|
||||
"wr": 42.2
|
||||
},
|
||||
"SOL-USD": {
|
||||
"pnl": 115.58,
|
||||
"trades": 194,
|
||||
"wins": 77,
|
||||
"wr": 39.7
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "D_ss075_btc3x",
|
||||
"stop_scale": 0.75,
|
||||
"time_exit": false,
|
||||
"final_equity": 774.66,
|
||||
"total_pnl": 520.66,
|
||||
"total_ret": 205.0,
|
||||
"sharpe": 2.36,
|
||||
"max_dd": 11.8,
|
||||
"trades": 664,
|
||||
"wins": 250,
|
||||
"wr": 37.7,
|
||||
"commission": 216.93,
|
||||
"interest": 10.45,
|
||||
"skipped": {
|
||||
"margin": 0,
|
||||
"cooldown": 708,
|
||||
"corr": 177,
|
||||
"short": 916,
|
||||
"imr": 23
|
||||
},
|
||||
"per_asset": {
|
||||
"BTC-USD": {
|
||||
"pnl": 100.76,
|
||||
"trades": 66,
|
||||
"wins": 25,
|
||||
"wr": 37.9
|
||||
},
|
||||
"ETH-USD": {
|
||||
"pnl": -7.55,
|
||||
"trades": 143,
|
||||
"wins": 50,
|
||||
"wr": 35.0
|
||||
},
|
||||
"ADA-USD": {
|
||||
"pnl": 109.65,
|
||||
"trades": 65,
|
||||
"wins": 24,
|
||||
"wr": 36.9
|
||||
},
|
||||
"DOT-USD": {
|
||||
"pnl": 143.81,
|
||||
"trades": 93,
|
||||
"wins": 39,
|
||||
"wr": 41.9
|
||||
},
|
||||
"DOGE-USD": {
|
||||
"pnl": 92.42,
|
||||
"trades": 113,
|
||||
"wins": 43,
|
||||
"wr": 38.1
|
||||
},
|
||||
"SOL-USD": {
|
||||
"pnl": 81.56,
|
||||
"trades": 184,
|
||||
"wins": 69,
|
||||
"wr": 37.5
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "CTRL_ss05_te",
|
||||
"stop_scale": 0.5,
|
||||
"time_exit": true,
|
||||
"final_equity": 841.65,
|
||||
"total_pnl": 587.65,
|
||||
"total_ret": 231.4,
|
||||
"sharpe": 3.05,
|
||||
"max_dd": 7.6,
|
||||
"trades": 827,
|
||||
"wins": 356,
|
||||
"wr": 43.0,
|
||||
"commission": 249.1,
|
||||
"interest": 5.1,
|
||||
"skipped": {
|
||||
"margin": 0,
|
||||
"cooldown": 525,
|
||||
"corr": 154,
|
||||
"short": 1009,
|
||||
"imr": 19
|
||||
},
|
||||
"per_asset": {
|
||||
"BTC-USD": {
|
||||
"pnl": 56.68,
|
||||
"trades": 79,
|
||||
"wins": 31,
|
||||
"wr": 39.2
|
||||
},
|
||||
"ETH-USD": {
|
||||
"pnl": 51.84,
|
||||
"trades": 189,
|
||||
"wins": 84,
|
||||
"wr": 44.4
|
||||
},
|
||||
"ADA-USD": {
|
||||
"pnl": 144.0,
|
||||
"trades": 82,
|
||||
"wins": 36,
|
||||
"wr": 43.9
|
||||
},
|
||||
"DOT-USD": {
|
||||
"pnl": 122.35,
|
||||
"trades": 111,
|
||||
"wins": 44,
|
||||
"wr": 39.6
|
||||
},
|
||||
"DOGE-USD": {
|
||||
"pnl": 126.52,
|
||||
"trades": 136,
|
||||
"wins": 60,
|
||||
"wr": 44.1
|
||||
},
|
||||
"SOL-USD": {
|
||||
"pnl": 86.24,
|
||||
"trades": 230,
|
||||
"wins": 101,
|
||||
"wr": 43.9
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "CTRL_ss10_no",
|
||||
"stop_scale": 1.0,
|
||||
"time_exit": false,
|
||||
"final_equity": 671.24,
|
||||
"total_pnl": 417.24,
|
||||
"total_ret": 164.3,
|
||||
"sharpe": 2.11,
|
||||
"max_dd": 14.1,
|
||||
"trades": 611,
|
||||
"wins": 233,
|
||||
"wr": 38.1,
|
||||
"commission": 170.32,
|
||||
"interest": 10.36,
|
||||
"skipped": {
|
||||
"margin": 0,
|
||||
"cooldown": 670,
|
||||
"corr": 181,
|
||||
"short": 868,
|
||||
"imr": 29
|
||||
},
|
||||
"per_asset": {
|
||||
"BTC-USD": {
|
||||
"pnl": 54.53,
|
||||
"trades": 59,
|
||||
"wins": 25,
|
||||
"wr": 42.4
|
||||
},
|
||||
"ETH-USD": {
|
||||
"pnl": -2.36,
|
||||
"trades": 138,
|
||||
"wins": 50,
|
||||
"wr": 36.2
|
||||
},
|
||||
"ADA-USD": {
|
||||
"pnl": 111.95,
|
||||
"trades": 62,
|
||||
"wins": 24,
|
||||
"wr": 38.7
|
||||
},
|
||||
"DOT-USD": {
|
||||
"pnl": 97.22,
|
||||
"trades": 87,
|
||||
"wins": 34,
|
||||
"wr": 39.1
|
||||
},
|
||||
"DOGE-USD": {
|
||||
"pnl": 83.75,
|
||||
"trades": 107,
|
||||
"wins": 41,
|
||||
"wr": 38.3
|
||||
},
|
||||
"SOL-USD": {
|
||||
"pnl": 72.14,
|
||||
"trades": 158,
|
||||
"wins": 59,
|
||||
"wr": 37.3
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+798
@@ -0,0 +1,798 @@
|
||||
{
|
||||
"configs": {
|
||||
"BASELINE": {
|
||||
"stop_scale": 0.5,
|
||||
"assets": [
|
||||
{
|
||||
"ticker": "BTC-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.241,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "ETH-USD",
|
||||
"tf": "2h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.158,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "ADA-USD",
|
||||
"tf": "4h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "DOT-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "DOGE-USD",
|
||||
"tf": "4h",
|
||||
"ws": 48,
|
||||
"leverage": 2,
|
||||
"weight": 0.127,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "SOL-USD",
|
||||
"tf": "2h",
|
||||
"ws": 128,
|
||||
"leverage": 2,
|
||||
"weight": 0.108,
|
||||
"K": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
"A_ss075": {
|
||||
"stop_scale": 0.75,
|
||||
"assets": [
|
||||
{
|
||||
"ticker": "BTC-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.241,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "ETH-USD",
|
||||
"tf": "2h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.158,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "ADA-USD",
|
||||
"tf": "4h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "DOT-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "DOGE-USD",
|
||||
"tf": "4h",
|
||||
"ws": 48,
|
||||
"leverage": 2,
|
||||
"weight": 0.127,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "SOL-USD",
|
||||
"tf": "2h",
|
||||
"ws": 128,
|
||||
"leverage": 2,
|
||||
"weight": 0.108,
|
||||
"K": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
"B_btc3x": {
|
||||
"stop_scale": 0.5,
|
||||
"assets": [
|
||||
{
|
||||
"ticker": "BTC-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 3,
|
||||
"weight": 0.241,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "ETH-USD",
|
||||
"tf": "2h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.158,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "ADA-USD",
|
||||
"tf": "4h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "DOT-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "DOGE-USD",
|
||||
"tf": "4h",
|
||||
"ws": 48,
|
||||
"leverage": 2,
|
||||
"weight": 0.127,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "SOL-USD",
|
||||
"tf": "2h",
|
||||
"ws": 128,
|
||||
"leverage": 2,
|
||||
"weight": 0.108,
|
||||
"K": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
"C_aggr_wt": {
|
||||
"stop_scale": 0.5,
|
||||
"assets": [
|
||||
{
|
||||
"ticker": "BTC-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.15,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "ETH-USD",
|
||||
"tf": "2h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.1,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "ADA-USD",
|
||||
"tf": "4h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.22,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "DOT-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.22,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "DOGE-USD",
|
||||
"tf": "4h",
|
||||
"ws": 48,
|
||||
"leverage": 2,
|
||||
"weight": 0.2,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "SOL-USD",
|
||||
"tf": "2h",
|
||||
"ws": 128,
|
||||
"leverage": 2,
|
||||
"weight": 0.11,
|
||||
"K": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
"D_ss075_btc3x": {
|
||||
"stop_scale": 0.75,
|
||||
"assets": [
|
||||
{
|
||||
"ticker": "BTC-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 3,
|
||||
"weight": 0.241,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "ETH-USD",
|
||||
"tf": "2h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.158,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "ADA-USD",
|
||||
"tf": "4h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "DOT-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "DOGE-USD",
|
||||
"tf": "4h",
|
||||
"ws": 48,
|
||||
"leverage": 2,
|
||||
"weight": 0.127,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "SOL-USD",
|
||||
"tf": "2h",
|
||||
"ws": 128,
|
||||
"leverage": 2,
|
||||
"weight": 0.108,
|
||||
"K": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
"CTRL_ss05_te": {
|
||||
"stop_scale": 0.5,
|
||||
"time_exit": true,
|
||||
"assets": [
|
||||
{
|
||||
"ticker": "BTC-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.241,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "ETH-USD",
|
||||
"tf": "2h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.158,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "ADA-USD",
|
||||
"tf": "4h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "DOT-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "DOGE-USD",
|
||||
"tf": "4h",
|
||||
"ws": 48,
|
||||
"leverage": 2,
|
||||
"weight": 0.127,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "SOL-USD",
|
||||
"tf": "2h",
|
||||
"ws": 128,
|
||||
"leverage": 2,
|
||||
"weight": 0.108,
|
||||
"K": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
"CTRL_ss10_no": {
|
||||
"stop_scale": 1.0,
|
||||
"assets": [
|
||||
{
|
||||
"ticker": "BTC-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.241,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "ETH-USD",
|
||||
"tf": "2h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.158,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "ADA-USD",
|
||||
"tf": "4h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "DOT-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "DOGE-USD",
|
||||
"tf": "4h",
|
||||
"ws": 48,
|
||||
"leverage": 2,
|
||||
"weight": 0.127,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "SOL-USD",
|
||||
"tf": "2h",
|
||||
"ws": 128,
|
||||
"leverage": 2,
|
||||
"weight": 0.108,
|
||||
"K": 2
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"results": [
|
||||
{
|
||||
"config": "BASELINE",
|
||||
"stop_scale": 0.5,
|
||||
"time_exit": false,
|
||||
"final_equity": 151.86,
|
||||
"total_pnl": -102.14,
|
||||
"total_ret": -40.2,
|
||||
"sharpe": -0.52,
|
||||
"max_dd": 62.9,
|
||||
"trades": 487,
|
||||
"wins": 165,
|
||||
"wr": 33.9,
|
||||
"commission": 79.22,
|
||||
"interest": 9.69,
|
||||
"skipped": {
|
||||
"margin": 0,
|
||||
"cooldown": 784,
|
||||
"corr": 191,
|
||||
"short": 773,
|
||||
"imr": 37
|
||||
},
|
||||
"per_asset": {
|
||||
"BTC-USD": {
|
||||
"pnl": -15.35,
|
||||
"trades": 49,
|
||||
"wins": 19,
|
||||
"wr": 38.8
|
||||
},
|
||||
"ETH-USD": {
|
||||
"pnl": -41.58,
|
||||
"trades": 104,
|
||||
"wins": 35,
|
||||
"wr": 33.7
|
||||
},
|
||||
"ADA-USD": {
|
||||
"pnl": -23.06,
|
||||
"trades": 54,
|
||||
"wins": 20,
|
||||
"wr": 37.0
|
||||
},
|
||||
"DOT-USD": {
|
||||
"pnl": 11.01,
|
||||
"trades": 69,
|
||||
"wins": 21,
|
||||
"wr": 30.4
|
||||
},
|
||||
"DOGE-USD": {
|
||||
"pnl": -18.89,
|
||||
"trades": 79,
|
||||
"wins": 24,
|
||||
"wr": 30.4
|
||||
},
|
||||
"SOL-USD": {
|
||||
"pnl": -14.27,
|
||||
"trades": 132,
|
||||
"wins": 46,
|
||||
"wr": 34.8
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "A_ss075",
|
||||
"stop_scale": 0.75,
|
||||
"time_exit": false,
|
||||
"final_equity": 132.52,
|
||||
"total_pnl": -121.48,
|
||||
"total_ret": -47.8,
|
||||
"sharpe": -0.77,
|
||||
"max_dd": 66.8,
|
||||
"trades": 459,
|
||||
"wins": 155,
|
||||
"wr": 33.8,
|
||||
"commission": 70.67,
|
||||
"interest": 10.03,
|
||||
"skipped": {
|
||||
"margin": 0,
|
||||
"cooldown": 724,
|
||||
"corr": 204,
|
||||
"short": 735,
|
||||
"imr": 35
|
||||
},
|
||||
"per_asset": {
|
||||
"BTC-USD": {
|
||||
"pnl": 14.83,
|
||||
"trades": 46,
|
||||
"wins": 19,
|
||||
"wr": 41.3
|
||||
},
|
||||
"ETH-USD": {
|
||||
"pnl": -67.19,
|
||||
"trades": 100,
|
||||
"wins": 31,
|
||||
"wr": 31.0
|
||||
},
|
||||
"ADA-USD": {
|
||||
"pnl": -24.48,
|
||||
"trades": 48,
|
||||
"wins": 19,
|
||||
"wr": 39.6
|
||||
},
|
||||
"DOT-USD": {
|
||||
"pnl": -16.08,
|
||||
"trades": 63,
|
||||
"wins": 18,
|
||||
"wr": 28.6
|
||||
},
|
||||
"DOGE-USD": {
|
||||
"pnl": -17.01,
|
||||
"trades": 75,
|
||||
"wins": 24,
|
||||
"wr": 32.0
|
||||
},
|
||||
"SOL-USD": {
|
||||
"pnl": -11.55,
|
||||
"trades": 127,
|
||||
"wins": 44,
|
||||
"wr": 34.6
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "B_btc3x",
|
||||
"stop_scale": 0.5,
|
||||
"time_exit": false,
|
||||
"final_equity": 147.28,
|
||||
"total_pnl": -106.72,
|
||||
"total_ret": -42.0,
|
||||
"sharpe": -0.52,
|
||||
"max_dd": 66.7,
|
||||
"trades": 487,
|
||||
"wins": 165,
|
||||
"wr": 33.9,
|
||||
"commission": 85.87,
|
||||
"interest": 12.03,
|
||||
"skipped": {
|
||||
"margin": 0,
|
||||
"cooldown": 784,
|
||||
"corr": 191,
|
||||
"short": 773,
|
||||
"imr": 37
|
||||
},
|
||||
"per_asset": {
|
||||
"BTC-USD": {
|
||||
"pnl": -25.33,
|
||||
"trades": 49,
|
||||
"wins": 19,
|
||||
"wr": 38.8
|
||||
},
|
||||
"ETH-USD": {
|
||||
"pnl": -40.45,
|
||||
"trades": 104,
|
||||
"wins": 35,
|
||||
"wr": 33.7
|
||||
},
|
||||
"ADA-USD": {
|
||||
"pnl": -21.76,
|
||||
"trades": 54,
|
||||
"wins": 20,
|
||||
"wr": 37.0
|
||||
},
|
||||
"DOT-USD": {
|
||||
"pnl": 13.63,
|
||||
"trades": 69,
|
||||
"wins": 21,
|
||||
"wr": 30.4
|
||||
},
|
||||
"DOGE-USD": {
|
||||
"pnl": -19.88,
|
||||
"trades": 79,
|
||||
"wins": 24,
|
||||
"wr": 30.4
|
||||
},
|
||||
"SOL-USD": {
|
||||
"pnl": -12.95,
|
||||
"trades": 132,
|
||||
"wins": 46,
|
||||
"wr": 34.8
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "C_aggr_wt",
|
||||
"stop_scale": 0.5,
|
||||
"time_exit": false,
|
||||
"final_equity": 131.14,
|
||||
"total_pnl": -122.86,
|
||||
"total_ret": -48.4,
|
||||
"sharpe": -0.77,
|
||||
"max_dd": 64.3,
|
||||
"trades": 485,
|
||||
"wins": 165,
|
||||
"wr": 34.0,
|
||||
"commission": 71.58,
|
||||
"interest": 8.94,
|
||||
"skipped": {
|
||||
"margin": 0,
|
||||
"cooldown": 784,
|
||||
"corr": 190,
|
||||
"short": 768,
|
||||
"imr": 45
|
||||
},
|
||||
"per_asset": {
|
||||
"BTC-USD": {
|
||||
"pnl": -5.86,
|
||||
"trades": 48,
|
||||
"wins": 19,
|
||||
"wr": 39.6
|
||||
},
|
||||
"ETH-USD": {
|
||||
"pnl": -22.55,
|
||||
"trades": 104,
|
||||
"wins": 35,
|
||||
"wr": 33.7
|
||||
},
|
||||
"ADA-USD": {
|
||||
"pnl": -62.11,
|
||||
"trades": 58,
|
||||
"wins": 20,
|
||||
"wr": 34.5
|
||||
},
|
||||
"DOT-USD": {
|
||||
"pnl": 21.13,
|
||||
"trades": 70,
|
||||
"wins": 22,
|
||||
"wr": 31.4
|
||||
},
|
||||
"DOGE-USD": {
|
||||
"pnl": -25.24,
|
||||
"trades": 79,
|
||||
"wins": 24,
|
||||
"wr": 30.4
|
||||
},
|
||||
"SOL-USD": {
|
||||
"pnl": -28.23,
|
||||
"trades": 126,
|
||||
"wins": 45,
|
||||
"wr": 35.7
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "D_ss075_btc3x",
|
||||
"stop_scale": 0.75,
|
||||
"time_exit": false,
|
||||
"final_equity": 134.7,
|
||||
"total_pnl": -119.3,
|
||||
"total_ret": -47.0,
|
||||
"sharpe": -0.72,
|
||||
"max_dd": 66.9,
|
||||
"trades": 458,
|
||||
"wins": 155,
|
||||
"wr": 33.8,
|
||||
"commission": 76.27,
|
||||
"interest": 12.33,
|
||||
"skipped": {
|
||||
"margin": 0,
|
||||
"cooldown": 722,
|
||||
"corr": 203,
|
||||
"short": 737,
|
||||
"imr": 37
|
||||
},
|
||||
"per_asset": {
|
||||
"BTC-USD": {
|
||||
"pnl": 19.84,
|
||||
"trades": 46,
|
||||
"wins": 19,
|
||||
"wr": 41.3
|
||||
},
|
||||
"ETH-USD": {
|
||||
"pnl": -68.51,
|
||||
"trades": 100,
|
||||
"wins": 31,
|
||||
"wr": 31.0
|
||||
},
|
||||
"ADA-USD": {
|
||||
"pnl": -24.68,
|
||||
"trades": 48,
|
||||
"wins": 19,
|
||||
"wr": 39.6
|
||||
},
|
||||
"DOT-USD": {
|
||||
"pnl": -16.45,
|
||||
"trades": 62,
|
||||
"wins": 18,
|
||||
"wr": 29.0
|
||||
},
|
||||
"DOGE-USD": {
|
||||
"pnl": -18.1,
|
||||
"trades": 75,
|
||||
"wins": 24,
|
||||
"wr": 32.0
|
||||
},
|
||||
"SOL-USD": {
|
||||
"pnl": -11.39,
|
||||
"trades": 127,
|
||||
"wins": 44,
|
||||
"wr": 34.6
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "CTRL_ss05_te",
|
||||
"stop_scale": 0.5,
|
||||
"time_exit": true,
|
||||
"final_equity": 126.8,
|
||||
"total_pnl": -127.2,
|
||||
"total_ret": -50.1,
|
||||
"sharpe": -1.23,
|
||||
"max_dd": 62.0,
|
||||
"trades": 848,
|
||||
"wins": 375,
|
||||
"wr": 44.2,
|
||||
"commission": 114.53,
|
||||
"interest": 5.28,
|
||||
"skipped": {
|
||||
"margin": 0,
|
||||
"cooldown": 514,
|
||||
"corr": 157,
|
||||
"short": 1028,
|
||||
"imr": 20
|
||||
},
|
||||
"per_asset": {
|
||||
"BTC-USD": {
|
||||
"pnl": -8.09,
|
||||
"trades": 89,
|
||||
"wins": 42,
|
||||
"wr": 47.2
|
||||
},
|
||||
"ETH-USD": {
|
||||
"pnl": -58.55,
|
||||
"trades": 183,
|
||||
"wins": 78,
|
||||
"wr": 42.6
|
||||
},
|
||||
"ADA-USD": {
|
||||
"pnl": -16.75,
|
||||
"trades": 94,
|
||||
"wins": 40,
|
||||
"wr": 42.6
|
||||
},
|
||||
"DOT-USD": {
|
||||
"pnl": 30.53,
|
||||
"trades": 111,
|
||||
"wins": 58,
|
||||
"wr": 52.3
|
||||
},
|
||||
"DOGE-USD": {
|
||||
"pnl": -27.93,
|
||||
"trades": 136,
|
||||
"wins": 57,
|
||||
"wr": 41.9
|
||||
},
|
||||
"SOL-USD": {
|
||||
"pnl": -46.41,
|
||||
"trades": 235,
|
||||
"wins": 100,
|
||||
"wr": 42.6
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "CTRL_ss10_no",
|
||||
"stop_scale": 1.0,
|
||||
"time_exit": false,
|
||||
"final_equity": 181.32,
|
||||
"total_pnl": -72.68,
|
||||
"total_ret": -28.6,
|
||||
"sharpe": -0.25,
|
||||
"max_dd": 61.4,
|
||||
"trades": 416,
|
||||
"wins": 150,
|
||||
"wr": 36.1,
|
||||
"commission": 74.37,
|
||||
"interest": 13.2,
|
||||
"skipped": {
|
||||
"margin": 0,
|
||||
"cooldown": 649,
|
||||
"corr": 214,
|
||||
"short": 694,
|
||||
"imr": 43
|
||||
},
|
||||
"per_asset": {
|
||||
"BTC-USD": {
|
||||
"pnl": 63.35,
|
||||
"trades": 38,
|
||||
"wins": 17,
|
||||
"wr": 44.7
|
||||
},
|
||||
"ETH-USD": {
|
||||
"pnl": -79.47,
|
||||
"trades": 94,
|
||||
"wins": 30,
|
||||
"wr": 31.9
|
||||
},
|
||||
"ADA-USD": {
|
||||
"pnl": -15.65,
|
||||
"trades": 49,
|
||||
"wins": 22,
|
||||
"wr": 44.9
|
||||
},
|
||||
"DOT-USD": {
|
||||
"pnl": -34.64,
|
||||
"trades": 52,
|
||||
"wins": 16,
|
||||
"wr": 30.8
|
||||
},
|
||||
"DOGE-USD": {
|
||||
"pnl": -5.9,
|
||||
"trades": 69,
|
||||
"wins": 23,
|
||||
"wr": 33.3
|
||||
},
|
||||
"SOL-USD": {
|
||||
"pnl": -0.36,
|
||||
"trades": 114,
|
||||
"wins": 42,
|
||||
"wr": 36.8
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+798
@@ -0,0 +1,798 @@
|
||||
{
|
||||
"configs": {
|
||||
"BASELINE": {
|
||||
"stop_scale": 0.5,
|
||||
"assets": [
|
||||
{
|
||||
"ticker": "BTC-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.241,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "ETH-USD",
|
||||
"tf": "2h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.158,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "ADA-USD",
|
||||
"tf": "4h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "DOT-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "DOGE-USD",
|
||||
"tf": "4h",
|
||||
"ws": 48,
|
||||
"leverage": 2,
|
||||
"weight": 0.127,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "SOL-USD",
|
||||
"tf": "2h",
|
||||
"ws": 128,
|
||||
"leverage": 2,
|
||||
"weight": 0.108,
|
||||
"K": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
"A_ss075": {
|
||||
"stop_scale": 0.75,
|
||||
"assets": [
|
||||
{
|
||||
"ticker": "BTC-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.241,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "ETH-USD",
|
||||
"tf": "2h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.158,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "ADA-USD",
|
||||
"tf": "4h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "DOT-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "DOGE-USD",
|
||||
"tf": "4h",
|
||||
"ws": 48,
|
||||
"leverage": 2,
|
||||
"weight": 0.127,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "SOL-USD",
|
||||
"tf": "2h",
|
||||
"ws": 128,
|
||||
"leverage": 2,
|
||||
"weight": 0.108,
|
||||
"K": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
"B_btc3x": {
|
||||
"stop_scale": 0.5,
|
||||
"assets": [
|
||||
{
|
||||
"ticker": "BTC-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 3,
|
||||
"weight": 0.241,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "ETH-USD",
|
||||
"tf": "2h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.158,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "ADA-USD",
|
||||
"tf": "4h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "DOT-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "DOGE-USD",
|
||||
"tf": "4h",
|
||||
"ws": 48,
|
||||
"leverage": 2,
|
||||
"weight": 0.127,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "SOL-USD",
|
||||
"tf": "2h",
|
||||
"ws": 128,
|
||||
"leverage": 2,
|
||||
"weight": 0.108,
|
||||
"K": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
"C_aggr_wt": {
|
||||
"stop_scale": 0.5,
|
||||
"assets": [
|
||||
{
|
||||
"ticker": "BTC-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.15,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "ETH-USD",
|
||||
"tf": "2h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.1,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "ADA-USD",
|
||||
"tf": "4h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.22,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "DOT-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.22,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "DOGE-USD",
|
||||
"tf": "4h",
|
||||
"ws": 48,
|
||||
"leverage": 2,
|
||||
"weight": 0.2,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "SOL-USD",
|
||||
"tf": "2h",
|
||||
"ws": 128,
|
||||
"leverage": 2,
|
||||
"weight": 0.11,
|
||||
"K": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
"D_ss075_btc3x": {
|
||||
"stop_scale": 0.75,
|
||||
"assets": [
|
||||
{
|
||||
"ticker": "BTC-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 3,
|
||||
"weight": 0.241,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "ETH-USD",
|
||||
"tf": "2h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.158,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "ADA-USD",
|
||||
"tf": "4h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "DOT-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "DOGE-USD",
|
||||
"tf": "4h",
|
||||
"ws": 48,
|
||||
"leverage": 2,
|
||||
"weight": 0.127,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "SOL-USD",
|
||||
"tf": "2h",
|
||||
"ws": 128,
|
||||
"leverage": 2,
|
||||
"weight": 0.108,
|
||||
"K": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
"CTRL_ss05_te": {
|
||||
"stop_scale": 0.5,
|
||||
"time_exit": true,
|
||||
"assets": [
|
||||
{
|
||||
"ticker": "BTC-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.241,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "ETH-USD",
|
||||
"tf": "2h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.158,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "ADA-USD",
|
||||
"tf": "4h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "DOT-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "DOGE-USD",
|
||||
"tf": "4h",
|
||||
"ws": 48,
|
||||
"leverage": 2,
|
||||
"weight": 0.127,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "SOL-USD",
|
||||
"tf": "2h",
|
||||
"ws": 128,
|
||||
"leverage": 2,
|
||||
"weight": 0.108,
|
||||
"K": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
"CTRL_ss10_no": {
|
||||
"stop_scale": 1.0,
|
||||
"assets": [
|
||||
{
|
||||
"ticker": "BTC-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.241,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "ETH-USD",
|
||||
"tf": "2h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.158,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "ADA-USD",
|
||||
"tf": "4h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "DOT-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "DOGE-USD",
|
||||
"tf": "4h",
|
||||
"ws": 48,
|
||||
"leverage": 2,
|
||||
"weight": 0.127,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "SOL-USD",
|
||||
"tf": "2h",
|
||||
"ws": 128,
|
||||
"leverage": 2,
|
||||
"weight": 0.108,
|
||||
"K": 2
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"results": [
|
||||
{
|
||||
"config": "BASELINE",
|
||||
"stop_scale": 0.5,
|
||||
"time_exit": false,
|
||||
"final_equity": 137.25,
|
||||
"total_pnl": -116.75,
|
||||
"total_ret": -46.0,
|
||||
"sharpe": -1.27,
|
||||
"max_dd": 47.7,
|
||||
"trades": 718,
|
||||
"wins": 222,
|
||||
"wr": 30.9,
|
||||
"commission": 85.49,
|
||||
"interest": 2.58,
|
||||
"skipped": {
|
||||
"margin": 0,
|
||||
"cooldown": 730,
|
||||
"corr": 163,
|
||||
"short": 947,
|
||||
"imr": 18
|
||||
},
|
||||
"per_asset": {
|
||||
"BTC-USD": {
|
||||
"pnl": -28.46,
|
||||
"trades": 70,
|
||||
"wins": 21,
|
||||
"wr": 30.0
|
||||
},
|
||||
"ETH-USD": {
|
||||
"pnl": -33.08,
|
||||
"trades": 160,
|
||||
"wins": 50,
|
||||
"wr": 31.2
|
||||
},
|
||||
"ADA-USD": {
|
||||
"pnl": 18.68,
|
||||
"trades": 74,
|
||||
"wins": 24,
|
||||
"wr": 32.4
|
||||
},
|
||||
"DOT-USD": {
|
||||
"pnl": -19.94,
|
||||
"trades": 97,
|
||||
"wins": 28,
|
||||
"wr": 28.9
|
||||
},
|
||||
"DOGE-USD": {
|
||||
"pnl": -20.65,
|
||||
"trades": 116,
|
||||
"wins": 40,
|
||||
"wr": 34.5
|
||||
},
|
||||
"SOL-USD": {
|
||||
"pnl": -33.3,
|
||||
"trades": 201,
|
||||
"wins": 59,
|
||||
"wr": 29.4
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "A_ss075",
|
||||
"stop_scale": 0.75,
|
||||
"time_exit": false,
|
||||
"final_equity": 116.85,
|
||||
"total_pnl": -137.15,
|
||||
"total_ret": -54.0,
|
||||
"sharpe": -1.49,
|
||||
"max_dd": 55.6,
|
||||
"trades": 664,
|
||||
"wins": 196,
|
||||
"wr": 29.5,
|
||||
"commission": 76.75,
|
||||
"interest": 3.36,
|
||||
"skipped": {
|
||||
"margin": 0,
|
||||
"cooldown": 708,
|
||||
"corr": 177,
|
||||
"short": 916,
|
||||
"imr": 23
|
||||
},
|
||||
"per_asset": {
|
||||
"BTC-USD": {
|
||||
"pnl": -19.67,
|
||||
"trades": 66,
|
||||
"wins": 19,
|
||||
"wr": 28.8
|
||||
},
|
||||
"ETH-USD": {
|
||||
"pnl": -48.2,
|
||||
"trades": 143,
|
||||
"wins": 40,
|
||||
"wr": 28.0
|
||||
},
|
||||
"ADA-USD": {
|
||||
"pnl": 3.58,
|
||||
"trades": 65,
|
||||
"wins": 22,
|
||||
"wr": 33.8
|
||||
},
|
||||
"DOT-USD": {
|
||||
"pnl": -15.41,
|
||||
"trades": 93,
|
||||
"wins": 26,
|
||||
"wr": 28.0
|
||||
},
|
||||
"DOGE-USD": {
|
||||
"pnl": -35.75,
|
||||
"trades": 113,
|
||||
"wins": 35,
|
||||
"wr": 31.0
|
||||
},
|
||||
"SOL-USD": {
|
||||
"pnl": -21.7,
|
||||
"trades": 184,
|
||||
"wins": 54,
|
||||
"wr": 29.3
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "B_btc3x",
|
||||
"stop_scale": 0.5,
|
||||
"time_exit": false,
|
||||
"final_equity": 127.53,
|
||||
"total_pnl": -126.47,
|
||||
"total_ret": -49.8,
|
||||
"sharpe": -1.35,
|
||||
"max_dd": 51.0,
|
||||
"trades": 718,
|
||||
"wins": 222,
|
||||
"wr": 30.9,
|
||||
"commission": 88.23,
|
||||
"interest": 2.95,
|
||||
"skipped": {
|
||||
"margin": 0,
|
||||
"cooldown": 730,
|
||||
"corr": 163,
|
||||
"short": 947,
|
||||
"imr": 18
|
||||
},
|
||||
"per_asset": {
|
||||
"BTC-USD": {
|
||||
"pnl": -41.82,
|
||||
"trades": 70,
|
||||
"wins": 21,
|
||||
"wr": 30.0
|
||||
},
|
||||
"ETH-USD": {
|
||||
"pnl": -31.09,
|
||||
"trades": 160,
|
||||
"wins": 50,
|
||||
"wr": 31.2
|
||||
},
|
||||
"ADA-USD": {
|
||||
"pnl": 18.09,
|
||||
"trades": 74,
|
||||
"wins": 24,
|
||||
"wr": 32.4
|
||||
},
|
||||
"DOT-USD": {
|
||||
"pnl": -19.76,
|
||||
"trades": 97,
|
||||
"wins": 28,
|
||||
"wr": 28.9
|
||||
},
|
||||
"DOGE-USD": {
|
||||
"pnl": -19.84,
|
||||
"trades": 116,
|
||||
"wins": 40,
|
||||
"wr": 34.5
|
||||
},
|
||||
"SOL-USD": {
|
||||
"pnl": -32.05,
|
||||
"trades": 201,
|
||||
"wins": 59,
|
||||
"wr": 29.4
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "C_aggr_wt",
|
||||
"stop_scale": 0.5,
|
||||
"time_exit": false,
|
||||
"final_equity": 144.76,
|
||||
"total_pnl": -109.24,
|
||||
"total_ret": -43.0,
|
||||
"sharpe": -1.23,
|
||||
"max_dd": 46.7,
|
||||
"trades": 707,
|
||||
"wins": 218,
|
||||
"wr": 30.8,
|
||||
"commission": 86.22,
|
||||
"interest": 2.7,
|
||||
"skipped": {
|
||||
"margin": 0,
|
||||
"cooldown": 723,
|
||||
"corr": 161,
|
||||
"short": 947,
|
||||
"imr": 35
|
||||
},
|
||||
"per_asset": {
|
||||
"BTC-USD": {
|
||||
"pnl": -17.86,
|
||||
"trades": 68,
|
||||
"wins": 20,
|
||||
"wr": 29.4
|
||||
},
|
||||
"ETH-USD": {
|
||||
"pnl": -21.69,
|
||||
"trades": 158,
|
||||
"wins": 49,
|
||||
"wr": 31.0
|
||||
},
|
||||
"ADA-USD": {
|
||||
"pnl": 20.8,
|
||||
"trades": 74,
|
||||
"wins": 24,
|
||||
"wr": 32.4
|
||||
},
|
||||
"DOT-USD": {
|
||||
"pnl": -24.02,
|
||||
"trades": 97,
|
||||
"wins": 28,
|
||||
"wr": 28.9
|
||||
},
|
||||
"DOGE-USD": {
|
||||
"pnl": -34.43,
|
||||
"trades": 116,
|
||||
"wins": 40,
|
||||
"wr": 34.5
|
||||
},
|
||||
"SOL-USD": {
|
||||
"pnl": -32.05,
|
||||
"trades": 194,
|
||||
"wins": 57,
|
||||
"wr": 29.4
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "D_ss075_btc3x",
|
||||
"stop_scale": 0.75,
|
||||
"time_exit": false,
|
||||
"final_equity": 110.45,
|
||||
"total_pnl": -143.55,
|
||||
"total_ret": -56.5,
|
||||
"sharpe": -1.54,
|
||||
"max_dd": 58.2,
|
||||
"trades": 664,
|
||||
"wins": 196,
|
||||
"wr": 29.5,
|
||||
"commission": 80.08,
|
||||
"interest": 3.94,
|
||||
"skipped": {
|
||||
"margin": 0,
|
||||
"cooldown": 708,
|
||||
"corr": 177,
|
||||
"short": 916,
|
||||
"imr": 23
|
||||
},
|
||||
"per_asset": {
|
||||
"BTC-USD": {
|
||||
"pnl": -29.65,
|
||||
"trades": 66,
|
||||
"wins": 19,
|
||||
"wr": 28.8
|
||||
},
|
||||
"ETH-USD": {
|
||||
"pnl": -46.27,
|
||||
"trades": 143,
|
||||
"wins": 40,
|
||||
"wr": 28.0
|
||||
},
|
||||
"ADA-USD": {
|
||||
"pnl": 3.73,
|
||||
"trades": 65,
|
||||
"wins": 22,
|
||||
"wr": 33.8
|
||||
},
|
||||
"DOT-USD": {
|
||||
"pnl": -15.3,
|
||||
"trades": 93,
|
||||
"wins": 26,
|
||||
"wr": 28.0
|
||||
},
|
||||
"DOGE-USD": {
|
||||
"pnl": -35.0,
|
||||
"trades": 113,
|
||||
"wins": 35,
|
||||
"wr": 31.0
|
||||
},
|
||||
"SOL-USD": {
|
||||
"pnl": -21.06,
|
||||
"trades": 184,
|
||||
"wins": 54,
|
||||
"wr": 29.3
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "CTRL_ss05_te",
|
||||
"stop_scale": 0.5,
|
||||
"time_exit": true,
|
||||
"final_equity": 176.6,
|
||||
"total_pnl": -77.4,
|
||||
"total_ret": -30.5,
|
||||
"sharpe": -0.73,
|
||||
"max_dd": 33.8,
|
||||
"trades": 827,
|
||||
"wins": 305,
|
||||
"wr": 36.9,
|
||||
"commission": 109.0,
|
||||
"interest": 2.22,
|
||||
"skipped": {
|
||||
"margin": 0,
|
||||
"cooldown": 525,
|
||||
"corr": 154,
|
||||
"short": 1009,
|
||||
"imr": 19
|
||||
},
|
||||
"per_asset": {
|
||||
"BTC-USD": {
|
||||
"pnl": -11.87,
|
||||
"trades": 79,
|
||||
"wins": 25,
|
||||
"wr": 31.6
|
||||
},
|
||||
"ETH-USD": {
|
||||
"pnl": -27.69,
|
||||
"trades": 189,
|
||||
"wins": 76,
|
||||
"wr": 40.2
|
||||
},
|
||||
"ADA-USD": {
|
||||
"pnl": 24.88,
|
||||
"trades": 82,
|
||||
"wins": 31,
|
||||
"wr": 37.8
|
||||
},
|
||||
"DOT-USD": {
|
||||
"pnl": -28.81,
|
||||
"trades": 111,
|
||||
"wins": 36,
|
||||
"wr": 32.4
|
||||
},
|
||||
"DOGE-USD": {
|
||||
"pnl": -15.37,
|
||||
"trades": 136,
|
||||
"wins": 54,
|
||||
"wr": 39.7
|
||||
},
|
||||
"SOL-USD": {
|
||||
"pnl": -18.54,
|
||||
"trades": 230,
|
||||
"wins": 83,
|
||||
"wr": 36.1
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "CTRL_ss10_no",
|
||||
"stop_scale": 1.0,
|
||||
"time_exit": false,
|
||||
"final_equity": 115.2,
|
||||
"total_pnl": -138.8,
|
||||
"total_ret": -54.6,
|
||||
"sharpe": -1.4,
|
||||
"max_dd": 56.3,
|
||||
"trades": 611,
|
||||
"wins": 194,
|
||||
"wr": 31.8,
|
||||
"commission": 70.43,
|
||||
"interest": 4.31,
|
||||
"skipped": {
|
||||
"margin": 0,
|
||||
"cooldown": 670,
|
||||
"corr": 181,
|
||||
"short": 868,
|
||||
"imr": 29
|
||||
},
|
||||
"per_asset": {
|
||||
"BTC-USD": {
|
||||
"pnl": -21.67,
|
||||
"trades": 59,
|
||||
"wins": 18,
|
||||
"wr": 30.5
|
||||
},
|
||||
"ETH-USD": {
|
||||
"pnl": -41.01,
|
||||
"trades": 138,
|
||||
"wins": 46,
|
||||
"wr": 33.3
|
||||
},
|
||||
"ADA-USD": {
|
||||
"pnl": 8.3,
|
||||
"trades": 62,
|
||||
"wins": 21,
|
||||
"wr": 33.9
|
||||
},
|
||||
"DOT-USD": {
|
||||
"pnl": -32.32,
|
||||
"trades": 87,
|
||||
"wins": 24,
|
||||
"wr": 27.6
|
||||
},
|
||||
"DOGE-USD": {
|
||||
"pnl": -29.71,
|
||||
"trades": 107,
|
||||
"wins": 36,
|
||||
"wr": 33.6
|
||||
},
|
||||
"SOL-USD": {
|
||||
"pnl": -22.4,
|
||||
"trades": 158,
|
||||
"wins": 49,
|
||||
"wr": 31.0
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+798
@@ -0,0 +1,798 @@
|
||||
{
|
||||
"configs": {
|
||||
"BASELINE": {
|
||||
"stop_scale": 0.5,
|
||||
"assets": [
|
||||
{
|
||||
"ticker": "BTC-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.241,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "ETH-USD",
|
||||
"tf": "2h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.158,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "ADA-USD",
|
||||
"tf": "4h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "DOT-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "DOGE-USD",
|
||||
"tf": "4h",
|
||||
"ws": 48,
|
||||
"leverage": 2,
|
||||
"weight": 0.127,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "SOL-USD",
|
||||
"tf": "2h",
|
||||
"ws": 128,
|
||||
"leverage": 2,
|
||||
"weight": 0.108,
|
||||
"K": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
"A_ss075": {
|
||||
"stop_scale": 0.75,
|
||||
"assets": [
|
||||
{
|
||||
"ticker": "BTC-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.241,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "ETH-USD",
|
||||
"tf": "2h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.158,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "ADA-USD",
|
||||
"tf": "4h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "DOT-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "DOGE-USD",
|
||||
"tf": "4h",
|
||||
"ws": 48,
|
||||
"leverage": 2,
|
||||
"weight": 0.127,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "SOL-USD",
|
||||
"tf": "2h",
|
||||
"ws": 128,
|
||||
"leverage": 2,
|
||||
"weight": 0.108,
|
||||
"K": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
"B_btc3x": {
|
||||
"stop_scale": 0.5,
|
||||
"assets": [
|
||||
{
|
||||
"ticker": "BTC-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 3,
|
||||
"weight": 0.241,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "ETH-USD",
|
||||
"tf": "2h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.158,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "ADA-USD",
|
||||
"tf": "4h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "DOT-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "DOGE-USD",
|
||||
"tf": "4h",
|
||||
"ws": 48,
|
||||
"leverage": 2,
|
||||
"weight": 0.127,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "SOL-USD",
|
||||
"tf": "2h",
|
||||
"ws": 128,
|
||||
"leverage": 2,
|
||||
"weight": 0.108,
|
||||
"K": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
"C_aggr_wt": {
|
||||
"stop_scale": 0.5,
|
||||
"assets": [
|
||||
{
|
||||
"ticker": "BTC-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.15,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "ETH-USD",
|
||||
"tf": "2h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.1,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "ADA-USD",
|
||||
"tf": "4h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.22,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "DOT-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.22,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "DOGE-USD",
|
||||
"tf": "4h",
|
||||
"ws": 48,
|
||||
"leverage": 2,
|
||||
"weight": 0.2,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "SOL-USD",
|
||||
"tf": "2h",
|
||||
"ws": 128,
|
||||
"leverage": 2,
|
||||
"weight": 0.11,
|
||||
"K": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
"D_ss075_btc3x": {
|
||||
"stop_scale": 0.75,
|
||||
"assets": [
|
||||
{
|
||||
"ticker": "BTC-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 3,
|
||||
"weight": 0.241,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "ETH-USD",
|
||||
"tf": "2h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.158,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "ADA-USD",
|
||||
"tf": "4h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "DOT-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "DOGE-USD",
|
||||
"tf": "4h",
|
||||
"ws": 48,
|
||||
"leverage": 2,
|
||||
"weight": 0.127,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "SOL-USD",
|
||||
"tf": "2h",
|
||||
"ws": 128,
|
||||
"leverage": 2,
|
||||
"weight": 0.108,
|
||||
"K": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
"CTRL_ss05_te": {
|
||||
"stop_scale": 0.5,
|
||||
"time_exit": true,
|
||||
"assets": [
|
||||
{
|
||||
"ticker": "BTC-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.241,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "ETH-USD",
|
||||
"tf": "2h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.158,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "ADA-USD",
|
||||
"tf": "4h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "DOT-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "DOGE-USD",
|
||||
"tf": "4h",
|
||||
"ws": 48,
|
||||
"leverage": 2,
|
||||
"weight": 0.127,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "SOL-USD",
|
||||
"tf": "2h",
|
||||
"ws": 128,
|
||||
"leverage": 2,
|
||||
"weight": 0.108,
|
||||
"K": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
"CTRL_ss10_no": {
|
||||
"stop_scale": 1.0,
|
||||
"assets": [
|
||||
{
|
||||
"ticker": "BTC-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.241,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "ETH-USD",
|
||||
"tf": "2h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.158,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "ADA-USD",
|
||||
"tf": "4h",
|
||||
"ws": 64,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 3
|
||||
},
|
||||
{
|
||||
"ticker": "DOT-USD",
|
||||
"tf": "4h",
|
||||
"ws": 32,
|
||||
"leverage": 2,
|
||||
"weight": 0.183,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "DOGE-USD",
|
||||
"tf": "4h",
|
||||
"ws": 48,
|
||||
"leverage": 2,
|
||||
"weight": 0.127,
|
||||
"K": 2
|
||||
},
|
||||
{
|
||||
"ticker": "SOL-USD",
|
||||
"tf": "2h",
|
||||
"ws": 128,
|
||||
"leverage": 2,
|
||||
"weight": 0.108,
|
||||
"K": 2
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"results": [
|
||||
{
|
||||
"config": "BASELINE",
|
||||
"stop_scale": 0.5,
|
||||
"time_exit": false,
|
||||
"final_equity": 380.1,
|
||||
"total_pnl": 126.1,
|
||||
"total_ret": 49.6,
|
||||
"sharpe": 0.98,
|
||||
"max_dd": 20.2,
|
||||
"trades": 718,
|
||||
"wins": 253,
|
||||
"wr": 35.2,
|
||||
"commission": 140.53,
|
||||
"interest": 4.22,
|
||||
"skipped": {
|
||||
"margin": 0,
|
||||
"cooldown": 730,
|
||||
"corr": 163,
|
||||
"short": 947,
|
||||
"imr": 18
|
||||
},
|
||||
"per_asset": {
|
||||
"BTC-USD": {
|
||||
"pnl": -3.52,
|
||||
"trades": 70,
|
||||
"wins": 25,
|
||||
"wr": 35.7
|
||||
},
|
||||
"ETH-USD": {
|
||||
"pnl": -2.49,
|
||||
"trades": 160,
|
||||
"wins": 59,
|
||||
"wr": 36.9
|
||||
},
|
||||
"ADA-USD": {
|
||||
"pnl": 70.47,
|
||||
"trades": 74,
|
||||
"wins": 27,
|
||||
"wr": 36.5
|
||||
},
|
||||
"DOT-USD": {
|
||||
"pnl": 36.22,
|
||||
"trades": 97,
|
||||
"wins": 31,
|
||||
"wr": 32.0
|
||||
},
|
||||
"DOGE-USD": {
|
||||
"pnl": 24.55,
|
||||
"trades": 116,
|
||||
"wins": 44,
|
||||
"wr": 37.9
|
||||
},
|
||||
"SOL-USD": {
|
||||
"pnl": 0.88,
|
||||
"trades": 201,
|
||||
"wins": 67,
|
||||
"wr": 33.3
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "A_ss075",
|
||||
"stop_scale": 0.75,
|
||||
"time_exit": false,
|
||||
"final_equity": 293.49,
|
||||
"total_pnl": 39.49,
|
||||
"total_ret": 15.5,
|
||||
"sharpe": 0.43,
|
||||
"max_dd": 23.5,
|
||||
"trades": 664,
|
||||
"wins": 220,
|
||||
"wr": 33.1,
|
||||
"commission": 118.47,
|
||||
"interest": 5.14,
|
||||
"skipped": {
|
||||
"margin": 0,
|
||||
"cooldown": 708,
|
||||
"corr": 177,
|
||||
"short": 916,
|
||||
"imr": 23
|
||||
},
|
||||
"per_asset": {
|
||||
"BTC-USD": {
|
||||
"pnl": 5.59,
|
||||
"trades": 66,
|
||||
"wins": 22,
|
||||
"wr": 33.3
|
||||
},
|
||||
"ETH-USD": {
|
||||
"pnl": -38.19,
|
||||
"trades": 143,
|
||||
"wins": 46,
|
||||
"wr": 32.2
|
||||
},
|
||||
"ADA-USD": {
|
||||
"pnl": 32.41,
|
||||
"trades": 65,
|
||||
"wins": 24,
|
||||
"wr": 36.9
|
||||
},
|
||||
"DOT-USD": {
|
||||
"pnl": 32.58,
|
||||
"trades": 93,
|
||||
"wins": 31,
|
||||
"wr": 33.3
|
||||
},
|
||||
"DOGE-USD": {
|
||||
"pnl": -0.87,
|
||||
"trades": 113,
|
||||
"wins": 37,
|
||||
"wr": 32.7
|
||||
},
|
||||
"SOL-USD": {
|
||||
"pnl": 7.97,
|
||||
"trades": 184,
|
||||
"wins": 60,
|
||||
"wr": 32.6
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "B_btc3x",
|
||||
"stop_scale": 0.5,
|
||||
"time_exit": false,
|
||||
"final_equity": 374.29,
|
||||
"total_pnl": 120.29,
|
||||
"total_ret": 47.4,
|
||||
"sharpe": 0.95,
|
||||
"max_dd": 21.2,
|
||||
"trades": 718,
|
||||
"wins": 253,
|
||||
"wr": 35.2,
|
||||
"commission": 148.57,
|
||||
"interest": 4.96,
|
||||
"skipped": {
|
||||
"margin": 0,
|
||||
"cooldown": 730,
|
||||
"corr": 163,
|
||||
"short": 947,
|
||||
"imr": 18
|
||||
},
|
||||
"per_asset": {
|
||||
"BTC-USD": {
|
||||
"pnl": -6.2,
|
||||
"trades": 70,
|
||||
"wins": 25,
|
||||
"wr": 35.7
|
||||
},
|
||||
"ETH-USD": {
|
||||
"pnl": -2.19,
|
||||
"trades": 160,
|
||||
"wins": 59,
|
||||
"wr": 36.9
|
||||
},
|
||||
"ADA-USD": {
|
||||
"pnl": 69.07,
|
||||
"trades": 74,
|
||||
"wins": 27,
|
||||
"wr": 36.5
|
||||
},
|
||||
"DOT-USD": {
|
||||
"pnl": 35.16,
|
||||
"trades": 97,
|
||||
"wins": 31,
|
||||
"wr": 32.0
|
||||
},
|
||||
"DOGE-USD": {
|
||||
"pnl": 23.66,
|
||||
"trades": 116,
|
||||
"wins": 44,
|
||||
"wr": 37.9
|
||||
},
|
||||
"SOL-USD": {
|
||||
"pnl": 0.78,
|
||||
"trades": 201,
|
||||
"wins": 67,
|
||||
"wr": 33.3
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "C_aggr_wt",
|
||||
"stop_scale": 0.5,
|
||||
"time_exit": false,
|
||||
"final_equity": 423.1,
|
||||
"total_pnl": 169.1,
|
||||
"total_ret": 66.6,
|
||||
"sharpe": 0.99,
|
||||
"max_dd": 23.8,
|
||||
"trades": 707,
|
||||
"wins": 249,
|
||||
"wr": 35.2,
|
||||
"commission": 146.22,
|
||||
"interest": 4.56,
|
||||
"skipped": {
|
||||
"margin": 0,
|
||||
"cooldown": 723,
|
||||
"corr": 161,
|
||||
"short": 947,
|
||||
"imr": 35
|
||||
},
|
||||
"per_asset": {
|
||||
"BTC-USD": {
|
||||
"pnl": -1.93,
|
||||
"trades": 68,
|
||||
"wins": 24,
|
||||
"wr": 35.3
|
||||
},
|
||||
"ETH-USD": {
|
||||
"pnl": -3.31,
|
||||
"trades": 158,
|
||||
"wins": 58,
|
||||
"wr": 36.7
|
||||
},
|
||||
"ADA-USD": {
|
||||
"pnl": 84.13,
|
||||
"trades": 74,
|
||||
"wins": 27,
|
||||
"wr": 36.5
|
||||
},
|
||||
"DOT-USD": {
|
||||
"pnl": 47.14,
|
||||
"trades": 97,
|
||||
"wins": 31,
|
||||
"wr": 32.0
|
||||
},
|
||||
"DOGE-USD": {
|
||||
"pnl": 39.38,
|
||||
"trades": 116,
|
||||
"wins": 44,
|
||||
"wr": 37.9
|
||||
},
|
||||
"SOL-USD": {
|
||||
"pnl": 3.69,
|
||||
"trades": 194,
|
||||
"wins": 65,
|
||||
"wr": 33.5
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "D_ss075_btc3x",
|
||||
"stop_scale": 0.75,
|
||||
"time_exit": false,
|
||||
"final_equity": 293.47,
|
||||
"total_pnl": 39.47,
|
||||
"total_ret": 15.5,
|
||||
"sharpe": 0.43,
|
||||
"max_dd": 24.8,
|
||||
"trades": 664,
|
||||
"wins": 220,
|
||||
"wr": 33.1,
|
||||
"commission": 126.93,
|
||||
"interest": 6.18,
|
||||
"skipped": {
|
||||
"margin": 0,
|
||||
"cooldown": 708,
|
||||
"corr": 177,
|
||||
"short": 916,
|
||||
"imr": 23
|
||||
},
|
||||
"per_asset": {
|
||||
"BTC-USD": {
|
||||
"pnl": 7.04,
|
||||
"trades": 66,
|
||||
"wins": 22,
|
||||
"wr": 33.3
|
||||
},
|
||||
"ETH-USD": {
|
||||
"pnl": -38.02,
|
||||
"trades": 143,
|
||||
"wins": 46,
|
||||
"wr": 32.2
|
||||
},
|
||||
"ADA-USD": {
|
||||
"pnl": 31.9,
|
||||
"trades": 65,
|
||||
"wins": 24,
|
||||
"wr": 36.9
|
||||
},
|
||||
"DOT-USD": {
|
||||
"pnl": 32.2,
|
||||
"trades": 93,
|
||||
"wins": 31,
|
||||
"wr": 33.3
|
||||
},
|
||||
"DOGE-USD": {
|
||||
"pnl": -1.52,
|
||||
"trades": 113,
|
||||
"wins": 37,
|
||||
"wr": 32.7
|
||||
},
|
||||
"SOL-USD": {
|
||||
"pnl": 7.88,
|
||||
"trades": 184,
|
||||
"wins": 60,
|
||||
"wr": 32.6
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "CTRL_ss05_te",
|
||||
"stop_scale": 0.5,
|
||||
"time_exit": true,
|
||||
"final_equity": 386.33,
|
||||
"total_pnl": 132.33,
|
||||
"total_ret": 52.1,
|
||||
"sharpe": 1.1,
|
||||
"max_dd": 15.7,
|
||||
"trades": 827,
|
||||
"wins": 322,
|
||||
"wr": 38.9,
|
||||
"commission": 160.83,
|
||||
"interest": 3.28,
|
||||
"skipped": {
|
||||
"margin": 0,
|
||||
"cooldown": 525,
|
||||
"corr": 154,
|
||||
"short": 1009,
|
||||
"imr": 19
|
||||
},
|
||||
"per_asset": {
|
||||
"BTC-USD": {
|
||||
"pnl": 8.92,
|
||||
"trades": 79,
|
||||
"wins": 28,
|
||||
"wr": 35.4
|
||||
},
|
||||
"ETH-USD": {
|
||||
"pnl": -3.41,
|
||||
"trades": 189,
|
||||
"wins": 79,
|
||||
"wr": 41.8
|
||||
},
|
||||
"ADA-USD": {
|
||||
"pnl": 65.54,
|
||||
"trades": 82,
|
||||
"wins": 34,
|
||||
"wr": 41.5
|
||||
},
|
||||
"DOT-USD": {
|
||||
"pnl": 20.05,
|
||||
"trades": 111,
|
||||
"wins": 38,
|
||||
"wr": 34.2
|
||||
},
|
||||
"DOGE-USD": {
|
||||
"pnl": 27.22,
|
||||
"trades": 136,
|
||||
"wins": 56,
|
||||
"wr": 41.2
|
||||
},
|
||||
"SOL-USD": {
|
||||
"pnl": 14.02,
|
||||
"trades": 230,
|
||||
"wins": 87,
|
||||
"wr": 37.8
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "CTRL_ss10_no",
|
||||
"stop_scale": 1.0,
|
||||
"time_exit": false,
|
||||
"final_equity": 278.97,
|
||||
"total_pnl": 24.97,
|
||||
"total_ret": 9.8,
|
||||
"sharpe": 0.36,
|
||||
"max_dd": 26.5,
|
||||
"trades": 611,
|
||||
"wins": 216,
|
||||
"wr": 35.4,
|
||||
"commission": 106.14,
|
||||
"interest": 6.47,
|
||||
"skipped": {
|
||||
"margin": 0,
|
||||
"cooldown": 670,
|
||||
"corr": 181,
|
||||
"short": 868,
|
||||
"imr": 29
|
||||
},
|
||||
"per_asset": {
|
||||
"BTC-USD": {
|
||||
"pnl": 2.28,
|
||||
"trades": 59,
|
||||
"wins": 20,
|
||||
"wr": 33.9
|
||||
},
|
||||
"ETH-USD": {
|
||||
"pnl": -32.79,
|
||||
"trades": 138,
|
||||
"wins": 50,
|
||||
"wr": 36.2
|
||||
},
|
||||
"ADA-USD": {
|
||||
"pnl": 38.63,
|
||||
"trades": 62,
|
||||
"wins": 23,
|
||||
"wr": 37.1
|
||||
},
|
||||
"DOT-USD": {
|
||||
"pnl": 8.25,
|
||||
"trades": 87,
|
||||
"wins": 30,
|
||||
"wr": 34.5
|
||||
},
|
||||
"DOGE-USD": {
|
||||
"pnl": 2.95,
|
||||
"trades": 107,
|
||||
"wins": 39,
|
||||
"wr": 36.4
|
||||
},
|
||||
"SOL-USD": {
|
||||
"pnl": 5.64,
|
||||
"trades": 158,
|
||||
"wins": 54,
|
||||
"wr": 34.2
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,601 @@
|
||||
"""Exp20: Re-test rejected ideas on realistic Bybit UTA model.
|
||||
|
||||
Based on exp19 engine with fix: stop_scale was missing in exp19!
|
||||
Exp19 used effective stop_scale=1.0, but prod uses 0.5.
|
||||
|
||||
Configurations tested:
|
||||
BASELINE: exp19 + stop_scale=0.5 (matches prod)
|
||||
A: stop_scale=0.75 (wider stops, fewer triggers)
|
||||
B: BTC leverage=3x (CVR=0.98 allows it)
|
||||
C: aggressive weights (DOGE 20%, DOT 22%, ADA 22%)
|
||||
D: stop_scale=0.75 + BTC 3x (combined)
|
||||
"""
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from dataclasses import dataclass
|
||||
from copy import deepcopy
|
||||
|
||||
sys.path.insert(0, str(Path(__file__).parent.parent.parent / "src"))
|
||||
sys.path.insert(0, str(Path(__file__).parent.parent))
|
||||
|
||||
import numpy as np
|
||||
import torch
|
||||
|
||||
from remizov_trader.core import model as model_mod, signals, risk
|
||||
from remizov_trader.config import ModelConfig
|
||||
from common.metrics import save_results
|
||||
from common.dataset import load_or_fetch, load_cached_model, save_cached_model
|
||||
|
||||
TOTAL_CAPITAL = 254.0
|
||||
CORR_THRESH = 0.5
|
||||
TRAILING_STOP = True
|
||||
TRAIN_RATIO = 0.3
|
||||
SHIFT = 7
|
||||
|
||||
INTEREST_RATE_DAILY = 0.0002
|
||||
COMMISSION = 0.001
|
||||
MARKET_ORDER_BUFFER = 0.02
|
||||
|
||||
COLLATERAL_VALUE_RATIO = {
|
||||
"BTC-USD": 0.98, "ETH-USD": 0.95, "SOL-USD": 0.90,
|
||||
"ADA-USD": 0.90, "DOT-USD": 0.90, "DOGE-USD": 0.90,
|
||||
}
|
||||
SPOT_IM_RATE = {k: 0.05 for k in COLLATERAL_VALUE_RATIO}
|
||||
|
||||
CORRELATED_GROUPS = [
|
||||
{"BTC-USD", "ETH-USD"},
|
||||
{"ADA-USD", "DOT-USD"},
|
||||
]
|
||||
|
||||
# === CONFIGURATIONS TO TEST ===
|
||||
CONFIGS = {
|
||||
"BASELINE": {
|
||||
"stop_scale": 0.5,
|
||||
"assets": [
|
||||
{"ticker": "BTC-USD", "tf": "4h", "ws": 32, "leverage": 2, "weight": 0.241, "K": 3},
|
||||
{"ticker": "ETH-USD", "tf": "2h", "ws": 64, "leverage": 2, "weight": 0.158, "K": 2},
|
||||
{"ticker": "ADA-USD", "tf": "4h", "ws": 64, "leverage": 2, "weight": 0.183, "K": 3},
|
||||
{"ticker": "DOT-USD", "tf": "4h", "ws": 32, "leverage": 2, "weight": 0.183, "K": 2},
|
||||
{"ticker": "DOGE-USD", "tf": "4h", "ws": 48, "leverage": 2, "weight": 0.127, "K": 2},
|
||||
{"ticker": "SOL-USD", "tf": "2h", "ws": 128, "leverage": 2, "weight": 0.108, "K": 2},
|
||||
],
|
||||
},
|
||||
"A_ss075": {
|
||||
"stop_scale": 0.75,
|
||||
"assets": [
|
||||
{"ticker": "BTC-USD", "tf": "4h", "ws": 32, "leverage": 2, "weight": 0.241, "K": 3},
|
||||
{"ticker": "ETH-USD", "tf": "2h", "ws": 64, "leverage": 2, "weight": 0.158, "K": 2},
|
||||
{"ticker": "ADA-USD", "tf": "4h", "ws": 64, "leverage": 2, "weight": 0.183, "K": 3},
|
||||
{"ticker": "DOT-USD", "tf": "4h", "ws": 32, "leverage": 2, "weight": 0.183, "K": 2},
|
||||
{"ticker": "DOGE-USD", "tf": "4h", "ws": 48, "leverage": 2, "weight": 0.127, "K": 2},
|
||||
{"ticker": "SOL-USD", "tf": "2h", "ws": 128, "leverage": 2, "weight": 0.108, "K": 2},
|
||||
],
|
||||
},
|
||||
"B_btc3x": {
|
||||
"stop_scale": 0.5,
|
||||
"assets": [
|
||||
{"ticker": "BTC-USD", "tf": "4h", "ws": 32, "leverage": 3, "weight": 0.241, "K": 3},
|
||||
{"ticker": "ETH-USD", "tf": "2h", "ws": 64, "leverage": 2, "weight": 0.158, "K": 2},
|
||||
{"ticker": "ADA-USD", "tf": "4h", "ws": 64, "leverage": 2, "weight": 0.183, "K": 3},
|
||||
{"ticker": "DOT-USD", "tf": "4h", "ws": 32, "leverage": 2, "weight": 0.183, "K": 2},
|
||||
{"ticker": "DOGE-USD", "tf": "4h", "ws": 48, "leverage": 2, "weight": 0.127, "K": 2},
|
||||
{"ticker": "SOL-USD", "tf": "2h", "ws": 128, "leverage": 2, "weight": 0.108, "K": 2},
|
||||
],
|
||||
},
|
||||
"C_aggr_wt": {
|
||||
"stop_scale": 0.5,
|
||||
"assets": [
|
||||
{"ticker": "BTC-USD", "tf": "4h", "ws": 32, "leverage": 2, "weight": 0.150, "K": 3},
|
||||
{"ticker": "ETH-USD", "tf": "2h", "ws": 64, "leverage": 2, "weight": 0.100, "K": 2},
|
||||
{"ticker": "ADA-USD", "tf": "4h", "ws": 64, "leverage": 2, "weight": 0.220, "K": 3},
|
||||
{"ticker": "DOT-USD", "tf": "4h", "ws": 32, "leverage": 2, "weight": 0.220, "K": 2},
|
||||
{"ticker": "DOGE-USD", "tf": "4h", "ws": 48, "leverage": 2, "weight": 0.200, "K": 2},
|
||||
{"ticker": "SOL-USD", "tf": "2h", "ws": 128, "leverage": 2, "weight": 0.110, "K": 2},
|
||||
],
|
||||
},
|
||||
"D_ss075_btc3x": {
|
||||
"stop_scale": 0.75,
|
||||
"assets": [
|
||||
{"ticker": "BTC-USD", "tf": "4h", "ws": 32, "leverage": 3, "weight": 0.241, "K": 3},
|
||||
{"ticker": "ETH-USD", "tf": "2h", "ws": 64, "leverage": 2, "weight": 0.158, "K": 2},
|
||||
{"ticker": "ADA-USD", "tf": "4h", "ws": 64, "leverage": 2, "weight": 0.183, "K": 3},
|
||||
{"ticker": "DOT-USD", "tf": "4h", "ws": 32, "leverage": 2, "weight": 0.183, "K": 2},
|
||||
{"ticker": "DOGE-USD", "tf": "4h", "ws": 48, "leverage": 2, "weight": 0.127, "K": 2},
|
||||
{"ticker": "SOL-USD", "tf": "2h", "ws": 128, "leverage": 2, "weight": 0.108, "K": 2},
|
||||
],
|
||||
},
|
||||
# Control: isolate stop_scale effect (keep time_exit=ON like exp19)
|
||||
"CTRL_ss05_te": {
|
||||
"stop_scale": 0.5,
|
||||
"time_exit": True,
|
||||
"assets": [
|
||||
{"ticker": "BTC-USD", "tf": "4h", "ws": 32, "leverage": 2, "weight": 0.241, "K": 3},
|
||||
{"ticker": "ETH-USD", "tf": "2h", "ws": 64, "leverage": 2, "weight": 0.158, "K": 2},
|
||||
{"ticker": "ADA-USD", "tf": "4h", "ws": 64, "leverage": 2, "weight": 0.183, "K": 3},
|
||||
{"ticker": "DOT-USD", "tf": "4h", "ws": 32, "leverage": 2, "weight": 0.183, "K": 2},
|
||||
{"ticker": "DOGE-USD", "tf": "4h", "ws": 48, "leverage": 2, "weight": 0.127, "K": 2},
|
||||
{"ticker": "SOL-USD", "tf": "2h", "ws": 128, "leverage": 2, "weight": 0.108, "K": 2},
|
||||
],
|
||||
},
|
||||
# Control: isolate time_exit effect (keep stop_scale=1.0 like exp19)
|
||||
"CTRL_ss10_no": {
|
||||
"stop_scale": 1.0,
|
||||
"assets": [
|
||||
{"ticker": "BTC-USD", "tf": "4h", "ws": 32, "leverage": 2, "weight": 0.241, "K": 3},
|
||||
{"ticker": "ETH-USD", "tf": "2h", "ws": 64, "leverage": 2, "weight": 0.158, "K": 2},
|
||||
{"ticker": "ADA-USD", "tf": "4h", "ws": 64, "leverage": 2, "weight": 0.183, "K": 3},
|
||||
{"ticker": "DOT-USD", "tf": "4h", "ws": 32, "leverage": 2, "weight": 0.183, "K": 2},
|
||||
{"ticker": "DOGE-USD", "tf": "4h", "ws": 48, "leverage": 2, "weight": 0.127, "K": 2},
|
||||
{"ticker": "SOL-USD", "tf": "2h", "ws": 128, "leverage": 2, "weight": 0.108, "K": 2},
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@dataclass
|
||||
class Position:
|
||||
ticker: str
|
||||
direction: int
|
||||
entry_price: float
|
||||
entry_date: str
|
||||
stop_price: float
|
||||
stop_dist: float
|
||||
best_price: float
|
||||
pos_size: float
|
||||
pos_value: float
|
||||
margin_locked: float
|
||||
borrowed: float
|
||||
haircut_loss: float
|
||||
spot_im: float
|
||||
k_used: int
|
||||
entry_bar: int
|
||||
|
||||
|
||||
def calc_available_balance(free_usdc, open_positions):
|
||||
total_haircut = sum(p.haircut_loss for p in open_positions.values())
|
||||
total_spot_im = sum(p.spot_im for p in open_positions.values())
|
||||
return free_usdc - total_haircut - total_spot_im
|
||||
|
||||
|
||||
def calc_account_imr(free_usdc, open_positions):
|
||||
total_equity = free_usdc + sum(p.margin_locked for p in open_positions.values())
|
||||
if total_equity <= 0:
|
||||
return 1.0
|
||||
total_im = sum(p.margin_locked + p.spot_im for p in open_positions.values())
|
||||
return total_im / total_equity
|
||||
|
||||
|
||||
def calc_required_capital(pos_value, leverage, ticker):
|
||||
margin_needed = pos_value / leverage
|
||||
borrowed = pos_value - margin_needed
|
||||
cvr = COLLATERAL_VALUE_RATIO.get(ticker, 0.80)
|
||||
haircut = (1.0 - cvr) * pos_value
|
||||
spot_im = borrowed * SPOT_IM_RATE.get(ticker, 0.15)
|
||||
buffer = pos_value * MARKET_ORDER_BUFFER
|
||||
return {
|
||||
"margin_needed": margin_needed, "borrowed": borrowed,
|
||||
"haircut": haircut, "spot_im": spot_im, "buffer": buffer,
|
||||
"total_frozen": margin_needed + haircut + spot_im + buffer,
|
||||
}
|
||||
|
||||
|
||||
def check_correlation_conflict(open_positions, ticker, direction):
|
||||
for g in CORRELATED_GROUPS:
|
||||
if ticker not in g:
|
||||
continue
|
||||
for other in g:
|
||||
if other != ticker and other in open_positions:
|
||||
if open_positions[other].direction == direction:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
def run_simulation(config_name, cfg, asset_data, events):
|
||||
"""Run one simulation variant. Returns results dict."""
|
||||
stop_scale = cfg["stop_scale"]
|
||||
use_time_exit = cfg.get("time_exit", False)
|
||||
assets = {a["ticker"]: a for a in cfg["assets"]}
|
||||
|
||||
tf_hours = {"1h": 1, "2h": 2, "4h": 4, "6h": 6, "12h": 12, "1d": 24}
|
||||
free_usdc = TOTAL_CAPITAL
|
||||
open_positions = {}
|
||||
all_trades = []
|
||||
per_asset_trades = {t: [] for t in asset_data}
|
||||
last_stop_date = {}
|
||||
skipped = {"margin": 0, "cooldown": 0, "corr": 0, "short": 0, "imr": 0}
|
||||
peak_equity = TOTAL_CAPITAL
|
||||
max_drawdown = 0.0
|
||||
total_interest = 0.0
|
||||
|
||||
for date, ticker, window in events:
|
||||
if ticker not in assets:
|
||||
continue
|
||||
a = assets[ticker]
|
||||
ad = asset_data[ticker]
|
||||
prices = ad["prices"]
|
||||
price_idx = window["price_idx"]
|
||||
current_price = float(prices[price_idx])
|
||||
leverage = a["leverage"]
|
||||
weight = a["weight"]
|
||||
asset_k = a.get("K", 2)
|
||||
|
||||
# --- Check open position ---
|
||||
# Prod checks every cycle (= every bar). Iterate bars since last check.
|
||||
# Key fix: exit at bar_price (market price), NOT stop_price (ideal).
|
||||
if ticker in open_positions:
|
||||
pos = open_positions[ticker]
|
||||
bar_hours = tf_hours.get(ad["tf"], 4)
|
||||
|
||||
check_from = max(pos.entry_bar + 1, price_idx - SHIFT + 1)
|
||||
for bar_idx in range(check_from, price_idx + 1):
|
||||
if bar_idx >= len(prices):
|
||||
break
|
||||
bar_price = float(prices[bar_idx])
|
||||
|
||||
if TRAILING_STOP:
|
||||
pos.best_price, pos.stop_price = risk.update_trailing_stop(
|
||||
bar_price, pos.best_price, pos.stop_price,
|
||||
pos.stop_dist, pos.direction)
|
||||
|
||||
stopped = risk.is_stopped(bar_price, pos.stop_price, pos.direction)
|
||||
bars_held = bar_idx - pos.entry_bar
|
||||
time_exit = use_time_exit and bars_held >= (SHIFT - pos.k_used)
|
||||
|
||||
if stopped or time_exit:
|
||||
# Realistic exit: between stop_price and bar_price
|
||||
# Prod uses stop_price (optimistic), real market is bar_price
|
||||
# Model: 50% slippage from stop to bar close
|
||||
if stopped:
|
||||
exit_price = (pos.stop_price + bar_price) / 2
|
||||
else:
|
||||
exit_price = bar_price
|
||||
pnl_gross = pos.pos_size * (exit_price - pos.entry_price) * pos.direction
|
||||
commission_cost = pos.pos_value * COMMISSION * 2
|
||||
hold_hours = bars_held * bar_hours
|
||||
trade_interest = pos.borrowed * INTEREST_RATE_DAILY * hold_hours / 24
|
||||
total_interest += trade_interest
|
||||
pnl_net = pnl_gross - commission_cost - trade_interest
|
||||
|
||||
free_usdc += pos.margin_locked + pnl_net
|
||||
del open_positions[ticker]
|
||||
|
||||
exit_date = str(ad["dates"][bar_idx]) if bar_idx < len(ad["dates"]) else date
|
||||
trade = {
|
||||
"ticker": ticker, "pnl_net": pnl_net,
|
||||
"exit_reason": "stop" if stopped else "time",
|
||||
"bars_held": bars_held,
|
||||
"equity_at_entry": pos.margin_locked,
|
||||
"haircut": pos.haircut_loss, "spot_im": pos.spot_im,
|
||||
"commission": commission_cost, "interest": trade_interest,
|
||||
}
|
||||
all_trades.append(trade)
|
||||
per_asset_trades[ticker].append(trade)
|
||||
if stopped:
|
||||
last_stop_date[ticker] = exit_date
|
||||
|
||||
total_equity = free_usdc + sum(
|
||||
p.margin_locked for p in open_positions.values())
|
||||
peak_equity = max(peak_equity, total_equity)
|
||||
dd = (peak_equity - total_equity) / peak_equity if peak_equity > 0 else 0
|
||||
max_drawdown = max(max_drawdown, dd)
|
||||
break
|
||||
|
||||
# --- New signal ---
|
||||
if ticker not in open_positions and price_idx >= ad["ws"] + asset_k:
|
||||
# Cooldown
|
||||
if ticker in last_stop_date:
|
||||
from datetime import date as d
|
||||
days_since = (d.fromisoformat(date[:10]) -
|
||||
d.fromisoformat(last_stop_date[ticker][:10])).days
|
||||
bar_h = tf_hours.get(ad["tf"], 4)
|
||||
if days_since * 24 // bar_h < SHIFT:
|
||||
skipped["cooldown"] += 1
|
||||
continue
|
||||
|
||||
# Signal
|
||||
w = prices[price_idx - ad["ws"] - asset_k:price_idx - asset_k].copy()
|
||||
confirm = prices[price_idx - asset_k:price_idx].copy()
|
||||
mu, std = w.mean(), w.std()
|
||||
if std < 1e-10:
|
||||
continue
|
||||
|
||||
norm_input = (w - mu) / std
|
||||
pred = model_mod.predict(ad["model"], norm_input)
|
||||
pred_new = pred[-SHIFT:]
|
||||
corr, confirmed = signals.check_shape_confirmation(
|
||||
pred_new, confirm, mu, std, asset_k, CORR_THRESH)
|
||||
|
||||
if not confirmed:
|
||||
continue
|
||||
|
||||
direction = signals.get_direction(pred_new, asset_k)
|
||||
if direction is None:
|
||||
continue
|
||||
if direction == -1:
|
||||
skipped["short"] += 1
|
||||
continue
|
||||
|
||||
if check_correlation_conflict(open_positions, ticker, direction):
|
||||
skipped["corr"] += 1
|
||||
continue
|
||||
|
||||
# Max open positions (like prod)
|
||||
if len(open_positions) >= 6:
|
||||
continue
|
||||
|
||||
# IMR check
|
||||
imr = calc_account_imr(free_usdc, open_positions)
|
||||
if imr >= (leverage - 1) / leverage:
|
||||
skipped["imr"] += 1
|
||||
continue
|
||||
|
||||
# Position sizing
|
||||
total_equity = free_usdc + sum(
|
||||
p.margin_locked for p in open_positions.values())
|
||||
pos_value = total_equity * weight * leverage
|
||||
if pos_value < 5.0:
|
||||
continue
|
||||
|
||||
req = calc_required_capital(pos_value, leverage, ticker)
|
||||
available = calc_available_balance(free_usdc, open_positions)
|
||||
|
||||
if available < req["total_frozen"]:
|
||||
cvr = COLLATERAL_VALUE_RATIO.get(ticker, 0.80)
|
||||
im_rate = SPOT_IM_RATE.get(ticker, 0.15)
|
||||
freeze_per_dollar = (1/leverage + (1 - cvr)
|
||||
+ (1 - 1/leverage) * im_rate
|
||||
+ MARKET_ORDER_BUFFER)
|
||||
max_pv = available / freeze_per_dollar
|
||||
if max_pv < 5.0:
|
||||
skipped["margin"] += 1
|
||||
continue
|
||||
pos_value = max_pv
|
||||
req = calc_required_capital(pos_value, leverage, ticker)
|
||||
|
||||
pos_size = pos_value / current_price
|
||||
|
||||
k_adj, stop_mult = risk.regime_adaptive_params(prices, price_idx, asset_k)
|
||||
atr = risk.compute_atr(prices, price_idx)
|
||||
# FIX: apply stop_scale (was missing in exp19!)
|
||||
stop_dist = max(atr * stop_mult * stop_scale, current_price * 0.005)
|
||||
|
||||
free_usdc -= req["margin_needed"]
|
||||
|
||||
open_positions[ticker] = Position(
|
||||
ticker=ticker, direction=direction,
|
||||
entry_price=current_price, entry_date=date,
|
||||
stop_price=current_price - direction * stop_dist,
|
||||
stop_dist=stop_dist, best_price=current_price,
|
||||
pos_size=pos_size, pos_value=pos_value,
|
||||
margin_locked=req["margin_needed"],
|
||||
borrowed=req["borrowed"],
|
||||
haircut_loss=req["haircut"],
|
||||
spot_im=req["spot_im"],
|
||||
k_used=k_adj, entry_bar=price_idx,
|
||||
)
|
||||
|
||||
# Close remaining
|
||||
for ticker, pos in list(open_positions.items()):
|
||||
ad = asset_data[ticker]
|
||||
last_price = float(ad["prices"][-1])
|
||||
pnl_gross = pos.pos_size * (last_price - pos.entry_price) * pos.direction
|
||||
commission_cost = pos.pos_value * COMMISSION * 2
|
||||
last_bar = ad["test_data"][-1]["price_idx"]
|
||||
bars_held = last_bar - pos.entry_bar
|
||||
bar_hours = tf_hours.get(ad["tf"], 4)
|
||||
trade_interest = pos.borrowed * INTEREST_RATE_DAILY * bars_held * bar_hours / 24
|
||||
pnl_net = pnl_gross - commission_cost - trade_interest
|
||||
|
||||
free_usdc += pos.margin_locked + pnl_net
|
||||
trade = {
|
||||
"ticker": ticker, "pnl_net": pnl_net,
|
||||
"exit_reason": "end", "bars_held": bars_held,
|
||||
"equity_at_entry": pos.margin_locked,
|
||||
"haircut": pos.haircut_loss, "spot_im": pos.spot_im,
|
||||
"commission": commission_cost, "interest": trade_interest,
|
||||
}
|
||||
all_trades.append(trade)
|
||||
per_asset_trades[ticker].append(trade)
|
||||
|
||||
final_equity = free_usdc
|
||||
total_pnl = final_equity - TOTAL_CAPITAL
|
||||
wins = [t for t in all_trades if t["pnl_net"] > 0]
|
||||
|
||||
# Sharpe
|
||||
sharpe = 0.0
|
||||
if len(all_trades) > 1:
|
||||
returns = np.array([t["pnl_net"] / t["equity_at_entry"]
|
||||
for t in all_trades if t["equity_at_entry"] > 0])
|
||||
if len(returns) > 1 and np.std(returns) > 0:
|
||||
from datetime import date as d
|
||||
first = d.fromisoformat(events[0][0][:10])
|
||||
last = d.fromisoformat(events[-1][0][:10])
|
||||
years = max((last - first).days / 365.25, 0.1)
|
||||
tpy = len(all_trades) / years
|
||||
sharpe = float(np.mean(returns) / np.std(returns) * np.sqrt(tpy))
|
||||
|
||||
# Per-asset PnL
|
||||
asset_pnl = {}
|
||||
for ticker, trades in per_asset_trades.items():
|
||||
if trades:
|
||||
pnl = sum(t["pnl_net"] for t in trades)
|
||||
w = [t for t in trades if t["pnl_net"] > 0]
|
||||
asset_pnl[ticker] = {
|
||||
"pnl": round(pnl, 2),
|
||||
"trades": len(trades),
|
||||
"wins": len(w),
|
||||
"wr": round(len(w) / len(trades) * 100, 1),
|
||||
}
|
||||
|
||||
return {
|
||||
"config": config_name,
|
||||
"stop_scale": stop_scale,
|
||||
"time_exit": use_time_exit,
|
||||
"final_equity": round(final_equity, 2),
|
||||
"total_pnl": round(total_pnl, 2),
|
||||
"total_ret": round(total_pnl / TOTAL_CAPITAL * 100, 1),
|
||||
"sharpe": round(sharpe, 2),
|
||||
"max_dd": round(max_drawdown * 100, 1),
|
||||
"trades": len(all_trades),
|
||||
"wins": len(wins),
|
||||
"wr": round(len(wins) / len(all_trades) * 100, 1) if all_trades else 0,
|
||||
"commission": round(sum(t["commission"] for t in all_trades), 2),
|
||||
"interest": round(total_interest, 2),
|
||||
"skipped": skipped,
|
||||
"per_asset": asset_pnl,
|
||||
}
|
||||
|
||||
|
||||
def main():
|
||||
results_dir = Path(__file__).parent / "results"
|
||||
|
||||
print(f"{'='*80}")
|
||||
print("EXP20: RE-TEST REJECTED IDEAS ON BYBIT UTA MODEL")
|
||||
print(f"{'='*80}")
|
||||
print(f"Capital: ${TOTAL_CAPITAL} | FIX: stop_scale now applied (was missing in exp19)")
|
||||
print()
|
||||
|
||||
# Load data + models (shared across all configs)
|
||||
dataset = load_or_fetch("default")
|
||||
asset_data = {}
|
||||
|
||||
# Use all tickers from any config
|
||||
all_tickers = {}
|
||||
for cfg in CONFIGS.values():
|
||||
for a in cfg["assets"]:
|
||||
if a["ticker"] not in all_tickers:
|
||||
all_tickers[a["ticker"]] = a
|
||||
|
||||
for ticker, a in all_tickers.items():
|
||||
tf, ws = a["tf"], a["ws"]
|
||||
asset_k = a.get("K", 2)
|
||||
print(f" {ticker} ({tf}, ws={ws}, K={asset_k})...", end=" ", flush=True)
|
||||
|
||||
if ticker not in dataset:
|
||||
print("not in dataset")
|
||||
continue
|
||||
|
||||
prices = dataset[ticker]["prices"]
|
||||
dates = dataset[ticker]["dates"]
|
||||
|
||||
if len(prices) < ws + asset_k + SHIFT + 30:
|
||||
print("not enough data")
|
||||
continue
|
||||
|
||||
data = signals.prepare_windows(prices, ws, SHIFT)
|
||||
if len(data) < 30:
|
||||
print(f"only {len(data)} windows")
|
||||
continue
|
||||
|
||||
n_train = max(int(len(data) * TRAIN_RATIO), 20)
|
||||
test_data = data[n_train:]
|
||||
|
||||
model_cfg = ModelConfig(
|
||||
window_size=ws, n_steps=20, total_time=0.5,
|
||||
shift=SHIFT, epochs=200, finetune_epochs=50, lr=0.003,
|
||||
)
|
||||
|
||||
mdl = load_cached_model(model_cfg, ticker, ws, SHIFT, TRAIN_RATIO)
|
||||
if mdl is not None:
|
||||
print(f"(cached) ", end="")
|
||||
else:
|
||||
train_data = data[:n_train]
|
||||
torch.manual_seed(42)
|
||||
np.random.seed(42)
|
||||
mdl = model_mod.create_model(model_cfg)
|
||||
windows_arr = np.array([d["norm_input"] for d in train_data])
|
||||
targets_arr = np.array([d["norm_target"] for d in train_data])
|
||||
model_mod.train(mdl, windows_arr, targets_arr, 200, 0.003)
|
||||
save_cached_model(mdl, ticker, ws, SHIFT, TRAIN_RATIO)
|
||||
|
||||
asset_data[ticker] = {
|
||||
"prices": prices, "dates": dates, "tf": tf,
|
||||
"model": mdl, "test_data": test_data,
|
||||
"ws": ws, "K": asset_k,
|
||||
}
|
||||
print(f"{len(prices)} bars, {len(test_data)} test")
|
||||
|
||||
# Build events
|
||||
events = []
|
||||
for ticker, ad in asset_data.items():
|
||||
for d in ad["test_data"]:
|
||||
price_idx = d["price_idx"]
|
||||
date = str(ad["dates"][price_idx])
|
||||
events.append((date, ticker, d))
|
||||
events.sort(key=lambda x: x[0])
|
||||
|
||||
print(f"\n Events: {len(events)} | Range: {events[0][0]} → {events[-1][0]}")
|
||||
|
||||
# Run all configs
|
||||
print(f"\n{'='*80}")
|
||||
print("RUNNING CONFIGURATIONS")
|
||||
print(f"{'='*80}\n")
|
||||
|
||||
all_results = []
|
||||
for name, cfg in CONFIGS.items():
|
||||
print(f" {name}...", end=" ", flush=True)
|
||||
r = run_simulation(name, cfg, asset_data, events)
|
||||
all_results.append(r)
|
||||
print(f"PnL ${r['total_pnl']:+.0f} ({r['total_ret']:+.1f}%) "
|
||||
f"Sharpe {r['sharpe']:.2f} DD {r['max_dd']:.1f}% "
|
||||
f"WR {r['wr']:.1f}% ({r['trades']} trades)")
|
||||
|
||||
# Comparison table
|
||||
print(f"\n{'='*80}")
|
||||
print("COMPARISON TABLE")
|
||||
print(f"{'='*80}\n")
|
||||
|
||||
header = f" {'Config':<16s} {'SS':>4s} {'TE':>3s} {'PnL':>8s} {'Ret%':>6s} {'Sharpe':>6s} " \
|
||||
f"{'DD%':>5s} {'Trds':>5s} {'WR%':>5s} {'Comm$':>6s}"
|
||||
print(header)
|
||||
print(f" {'-'*67}")
|
||||
|
||||
for r in all_results:
|
||||
te = "ON" if r.get("time_exit", False) else "OFF"
|
||||
print(f" {r['config']:<16s} {r['stop_scale']:>4.2f} {te:>3s} "
|
||||
f"${r['total_pnl']:>+7.0f} {r['total_ret']:>+5.1f}% "
|
||||
f"{r['sharpe']:>6.2f} {r['max_dd']:>4.1f}% "
|
||||
f"{r['trades']:>5d} {r['wr']:>4.1f}% "
|
||||
f"${r['commission']:>5.0f}")
|
||||
|
||||
# Per-asset breakdown for each config
|
||||
print(f"\n{'='*80}")
|
||||
print("PER-ASSET PnL BY CONFIG")
|
||||
print(f"{'='*80}\n")
|
||||
|
||||
tickers = list(asset_data.keys())
|
||||
header = f" {'Config':<16s}" + "".join(f" {t[:4]:>7s}" for t in tickers)
|
||||
print(header)
|
||||
print(f" {'-'*(16 + 8 * len(tickers))}")
|
||||
|
||||
for r in all_results:
|
||||
row = f" {r['config']:<16s}"
|
||||
for t in tickers:
|
||||
if t in r["per_asset"]:
|
||||
pnl = r["per_asset"][t]["pnl"]
|
||||
row += f" ${pnl:>+5.0f}"
|
||||
else:
|
||||
row += f" {'n/a':>6s}"
|
||||
print(row)
|
||||
|
||||
# Best config
|
||||
best = max(all_results, key=lambda r: r["sharpe"])
|
||||
print(f"\n BEST by Sharpe: {best['config']} "
|
||||
f"(Sharpe {best['sharpe']:.2f}, PnL ${best['total_pnl']:+.0f})")
|
||||
|
||||
best_pnl = max(all_results, key=lambda r: r["total_pnl"])
|
||||
if best_pnl["config"] != best["config"]:
|
||||
print(f" BEST by PnL: {best_pnl['config']} "
|
||||
f"(PnL ${best_pnl['total_pnl']:+.0f}, Sharpe {best_pnl['sharpe']:.2f})")
|
||||
|
||||
# Save
|
||||
save_data = {
|
||||
"configs": CONFIGS,
|
||||
"results": all_results,
|
||||
}
|
||||
path = save_results(save_data, results_dir, "exp20_retest_rejected")
|
||||
print(f"\nSaved: {path}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -263,7 +263,7 @@ def _check_position(conn, pos, prices, dates, asset, asset_cfg, cfg):
|
||||
time_exit = days_held >= max_hold
|
||||
|
||||
if stopped or time_exit:
|
||||
exit_price = stop_price if stopped else last_price
|
||||
exit_price = last_price # always use market price (stop_price was optimistic)
|
||||
exit_reason = "stop" if stopped else "time"
|
||||
|
||||
pnl_net, pnl_pct = risk.calculate_pnl(
|
||||
|
||||
Reference in New Issue
Block a user