fix: maker+taker fee во всех backtest скриптах и test_live
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+2
-1
@@ -17,6 +17,7 @@ NY = ZoneInfo("America/New_York")
|
||||
|
||||
INITIAL_CAPITAL = 1_000.0
|
||||
RISK_PCT = 0.02
|
||||
MAKER_FEE = 0.0002
|
||||
TAKER_FEE = 0.00055
|
||||
LEVERAGE = 10
|
||||
TRAIN_RATIO = 0.5
|
||||
@@ -53,7 +54,7 @@ def trades_to_pnl(trades: list[Trade], capital: float) -> list[dict]:
|
||||
gross = pos_size * (t.exit_price - t.entry)
|
||||
else:
|
||||
gross = pos_size * (t.entry - t.exit_price)
|
||||
commission = pos_value * TAKER_FEE * 2
|
||||
commission = pos_value * (MAKER_FEE + TAKER_FEE)
|
||||
pnl_net = gross - commission
|
||||
equity += pnl_net
|
||||
results.append({
|
||||
|
||||
Reference in New Issue
Block a user