From 7a5fdf2f8da6ab52e868efc9ff0a06003782fafd Mon Sep 17 00:00:00 2001 From: ramseshk Date: Tue, 4 Aug 2026 04:26:38 +0000 Subject: [PATCH] Fix tab switching + $100K paper trading capital Tab IDs now match JavaScript: tab-backtest instead of tab-bt. Paper trading increased to $100,000 ($10K per strategy, $30K reserve). Server default paper metrics updated to $100K. --- dashboard/server.py | 2 +- dashboard/static/index.html | 6 +++--- live/paper_trader.py | 18 +++++++++--------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/dashboard/server.py b/dashboard/server.py index 9f076e9..2eec5d3 100644 --- a/dashboard/server.py +++ b/dashboard/server.py @@ -86,7 +86,7 @@ def read_paper_metrics() -> dict: return json.load(f) except (json.JSONDecodeError, IOError): pass - return {"status": "waiting", "mode": "paper", "strategies": {}, "trades": [], "equity_history": [], "total_pnl": 0, "total_equity": 5000} + return {"status": "waiting", "mode": "paper", "strategies": {}, "trades": [], "equity_history": [], "total_pnl": 0, "total_equity": 100000} # ═══════════════════════════════════════════════════════════ diff --git a/dashboard/static/index.html b/dashboard/static/index.html index f3d17d1..43236c4 100644 --- a/dashboard/static/index.html +++ b/dashboard/static/index.html @@ -84,9 +84,9 @@ footer{text-align:center;padding:20px;font-size:10px;color:#3f3f46}footer a{colo
Portfolio PnL
$0.00
0.00%
- - - + + +
diff --git a/live/paper_trader.py b/live/paper_trader.py index e2d13c7..c260823 100644 --- a/live/paper_trader.py +++ b/live/paper_trader.py @@ -22,8 +22,8 @@ log = logging.getLogger("ftdt-paper") MAINNET_API = "https://api.hyperliquid.xyz/info" METRICS_FILE = "/tmp/ftdt-paper-metrics.json" -STARTING_CAPITAL = 5000.0 # 1000 USDC per strategy × 5 BTC, +500 for ETH -RESERVE = 1000.0 +STARTING_CAPITAL = 100000.0 # $100,000 paper trading capital +RESERVE = 30000.0 TAKER_FEE = 0.0005 # 5 bps taker (realistic for paper fills) SLIPPAGE_BPS = 1.0 # 1 bps slippage @@ -31,49 +31,49 @@ SLIPPAGE_BPS = 1.0 # 1 bps slippage STRATEGIES = { "Order Book Imbalance": { - "allocation": 1000.0, "instrument": "BTC", "pnl": 0.0, + "allocation": 10000.0, "instrument": "BTC", "pnl": 0.0, "trades_today": 0, "wins": 0, "win_rate": 0.0, "status": "idle", "position": 0.0, "entry_price": 0.0, "fee_paid": 0.0, "signals": [], "type": "reversal", "size": 0.002, "description": "L2 bid/ask volume skew — buys when bids dominate, sells when asks dominate. Mean-reverting at volume extremes.", }, "Iceberg Detection": { - "allocation": 1000.0, "instrument": "BTC", "pnl": 0.0, + "allocation": 10000.0, "instrument": "BTC", "pnl": 0.0, "trades_today": 0, "wins": 0, "win_rate": 0.0, "status": "idle", "position": 0.0, "entry_price": 0.0, "fee_paid": 0.0, "signals": [], "type": "momentum", "size": 0.001, "description": "Detects whale accumulation (many small buys over time). Follows the smart money flow.", }, "Funding Rate Arb": { - "allocation": 1000.0, "instrument": "BTC", "pnl": 0.0, + "allocation": 10000.0, "instrument": "BTC", "pnl": 0.0, "trades_today": 0, "wins": 0, "win_rate": 0.0, "status": "idle", "position": 0.0, "entry_price": 0.0, "fee_paid": 0.0, "signals": [], "type": "carry", "size": 0.005, "description": "Delta-neutral carry trade — shorts perp when funding rate is high, collects hourly payments.", }, "Pairs Trading": { - "allocation": 1000.0, "instrument": "ETH", "pnl": 0.0, + "allocation": 10000.0, "instrument": "ETH", "pnl": 0.0, "trades_today": 0, "wins": 0, "win_rate": 0.0, "status": "idle", "position": 0.0, "entry_price": 0.0, "fee_paid": 0.0, "signals": [], "type": "stat_arb", "size": 0.05, "description": "BTC/ETH spread mean reversion — trades when Z-score exceeds 1.5 sigma. Pairs converge back to equilibrium.", }, "Avellaneda-Stoikov": { - "allocation": 1000.0, "instrument": "BTC", "pnl": 0.0, + "allocation": 10000.0, "instrument": "BTC", "pnl": 0.0, "trades_today": 0, "wins": 0, "win_rate": 0.0, "status": "idle", "position": 0.0, "entry_price": 0.0, "fee_paid": 0.0, "signals": [], "type": "market_making", "size": 0.001, "description": "Dual-sided quoting at best bid/ask — captures spread via stochastic control. Simulated fill when spread is crossed.", }, "Momentum Breakout": { - "allocation": 1000.0, "instrument": "BTC", "pnl": 0.0, + "allocation": 10000.0, "instrument": "BTC", "pnl": 0.0, "trades_today": 0, "wins": 0, "win_rate": 0.0, "status": "idle", "position": 0.0, "entry_price": 0.0, "fee_paid": 0.0, "signals": [], "type": "momentum", "size": 0.002, "description": "Bollinger Band (2σ) breakout — enters when price breaks bands with volume confirmation.", }, "Mean Reversion": { - "allocation": 1000.0, "instrument": "BTC", "pnl": 0.0, + "allocation": 10000.0, "instrument": "BTC", "pnl": 0.0, "trades_today": 0, "wins": 0, "win_rate": 0.0, "status": "idle", "position": 0.0, "entry_price": 0.0, "fee_paid": 0.0, "signals": [], "type": "reversal", "size": 0.002,