Fix dashboard backtest detail, deterministic backtest seeds, paper trader fees, live node crash guard
Backtest detail: openDetail() now fetches full backtest JSON from the API instead of showing "Full trade data not in summary". Renders equity curve chart + full trade history table with 100 rows. Backtest reproducibility: replaced hash(key) with fixed per-strategy seeds. Python's hash() is randomized per process (PYTHONHASHSEED), causing wildly different results for same strategy across runs. Now deterministic. Server: added total_trades and sortino to /api/backtests summary response. Paper trader: fixed Avellaneda-Stoikov simulate using TAKER_FEE instead of MAKER_FEE. Lowered OBI signal threshold from 5bps to 1.5bps for flat markets. Live node: added None-guard in get_mark_prices — Hyperliquid testnet API sometimes returns null, crashing the node. Wrapped in try/except.
This commit is contained in:
@@ -174,9 +174,11 @@ async def list_backtests():
|
||||
"start": data.get("start_time"),
|
||||
"end": data.get("end_time"),
|
||||
"sharpe": data.get("sharpe", 0),
|
||||
"sortino": data.get("sortino", 0),
|
||||
"pnl_pct": data.get("pnl_pct", 0),
|
||||
"max_dd": data.get("max_dd", 0),
|
||||
"win_rate": data.get("win_rate", 0),
|
||||
"total_trades": data.get("total_trades", 0),
|
||||
})
|
||||
except (json.JSONDecodeError, IOError):
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user