# Demo Trading Run History

## Summary

All demo runs conducted on Bybit demo account (`api-demo.bybit.com`).
Start balance: $500 (reset at each run).

**Result across all production runs: 0 profitable sessions.**

| Run | Date | Hours | Trades | Actual PnL | Engine PnL | Gap | Market |
|---|---|---:|---:|---:|---:|---:|---|
| 1 | Apr 7 | 4h | 1 | -$14.38 | -$9.92 | $4.46 | Quiet, rv barely 5 |
| 2 | Apr 7 | 1h | 9 | -$32.19 | -$8.85 | $23.34 | Choppy (relaxed rv gate) |
| 3 | Apr 9 | 4h | 11 | -$42.68 | -$40.97 | $1.71 | Choppy high-vol |
| 4 | Apr 10 | 4h | 13 | -$51.08 | -$46.51 | $4.57 | Ranging high-vol |
| 5 | Apr 10 | 4h | 4 | -$11.82 | -$11.23 | $0.59 | Choppy |
| 6 | Apr 10 | 4h | 7 | -$27.38 | -$29.89 | -$2.51 | Choppy descent |
| 7 | Apr 11 | 4h | 4 | -$11.82 | -$9.19 | $2.63 | Choppy |
| 8 | Apr 11 | 4h | 3 | -$17.75 | -$17.75 | $0.00 | Choppy |
| 9 | Apr 11 | 4h | 7 | -$22.09 | -$27.45 | -$5.36 | Choppy descent |
| 10 | Apr 11-12 | 10.8h | 19 | -$47.33 | -$46.63 | $0.70 | Choppy descent |
| 11 | Apr 12 | 6h+ | 15 | -$43.89 | -$37.50 | $6.39 | Choppy descent |

**Total: 11 runs, ~57 hours, ~93 trades, ~-$322 actual PnL**

---

## Engine-Bybit reconciliation progress

The gap between engine net and actual Bybit balance shrank from $23/run → $0/run as bugs were fixed:

| Fix | Impact on gap |
|---|---|
| rv gate measurement (bar-close vs OB-mid) | Enabled any trades to fire |
| Entry fee missing from engine net | -$1.44/trade overstatement |
| SL exit taker fee assumption (now wasTaker) | -$1.85 on SL exits |
| Non-SL exits not sending Bybit orders | Critical: phantom exits |
| Adverse-drift chase gate | Prevented some bad fills |

**Current: gap = $0.04/trade average (effectively zero).**

---

## Bug discoveries from demo runs

### 1. rv measurement mismatch (critical)
Backtest used multi-venue bar closes; live used Bybit OB mid. Bar-close rv is ~2.9× higher,
so the same 5bps threshold meant "tradeable 34% of time" in backtest but "4.6% of time" live.
Result: 8+ hours with zero trades. Fixed: live now uses bar-close rv.

### 2. Phantom force_close exits
When the maker chase exhausted for non-SL exits, the engine confirmed the exit internally
but never sent an order to Bybit. The engine thought positions were closed; Bybit still held them.
Fixed: maker-exhaust now falls back to market order.

### 3. Entry fee missing from net
Engine `t.net` was `gross - exitFee` only. Bybit `rpnl` = `gross - entryFee - exitFee`.
Engine overstated per-trade net by the entry fee (~2bps × notional ≈ $1.44/trade).
Fixed: `fullNet = gross - entryFee - exitFee - slippage`.

### 4. Assumed taker for all SL exits
Some SL exits fill as maker (PostOnly limit hit when price crosses through stop level).
Engine was charging taker+slippage on all SLs. Fixed: `wasTaker` boolean from actual execution.

---

## What all demo sessions have in common

BTC market during Apr 7-12, 2026:
- Started at ~$73,000, descended to ~$70,700
- No sustained directional move > 100bps
- High bar-to-bar rv (5-7bps) but tight 5-min range (3-15bps)
- Repeated chop pattern: spike → bounce → spike → bounce

This is exactly the regime where the strategy performs worst:
- rv gate opens (high bar-to-bar vol)
- Signals fire (momentum spikes visible)
- Entries fill
- Price reverses 8-15bps immediately (stop-hunt)
- SL or force_close fires
- Direction cooldown blocks re-entry for 300-600s
- By the time re-entry is allowed, the next bounce fires more signals

---

## The 30% WR problem

Demo WR: ~30%. Backtest WR: 67.5%.

The gap is not execution quality (gap is now ~$0) — it's signal quality:
- In the backtest, signal fires during a trending session → trade develops 20-40bps → TP1 or large trail
- In the demo, signal fires during choppy session → trade reverses 8-15bps → SL or force_close

**Zero TP1 exits in 57+ hours of demo trading.** Every backtest TP1 required 20-40bps directional move.
The demo market has not produced a single clean 20bps move in our direction that we captured.

---

## What would validate the strategy

A single session where:
1. BTC makes a 100+ bps directional move
2. Strategy correctly enters and holds
3. TP1 or large trail exit produces +$10-20 net profit
4. Engine and Bybit PnL match within $1

This has not happened yet. The backtest's +$148 is dominated by one session (Apr 5 evening)
that produced +$84 from a +173bps uptrend. Nothing like this has occurred during demo testing.

---

## Honest diagnosis

Three possibilities, in order of likelihood:

### 1. Market regime mismatch (most likely, 60%)
The backtest happened to include one strongly trending session that dominates all results.
That regime is rare — occurring perhaps 1-2 times per week during normal market conditions.
In 57 hours of demo trading, we have simply not encountered it yet.
The strategy is correct but the sample window is wrong.

### 2. Moderate overfitting (30%)
We optimized on ~25 truly independent trades across 2 calendar days.
The trail distance, stop width, secondary entry, and other parameters were all validated
on this small dataset. In out-of-sample live trading, the edge may be smaller or non-existent.
The fact that every single filter change hurt at portfolio level suggests the "optimization"
was fitting to a small specific dataset rather than discovering robust rules.

### 3. Execution edge decay (10%)
The multi-venue tape signal has real predictive power on 10-second bars in recorded data.
But by the time the signal propagates through our pipeline (bar aggregation → signal engine →
entry decision → IPC → benchmark → API → fill), 3-10 seconds have passed. The 10-second
edge may have fully decayed. The backtest's emulated fills happen "instantly" at bar close.

---

## What to do next

**Option A: Keep running and wait (recommended)**
Continue the 24h demo run. With 15+ hours remaining, we may hit a trending session.
One profitable session with TP1 exits would validate the strategy.

**Option B: Record more data first**
Suspend demo trading, run the tape recorder only for 48-72 hours across different market
conditions (downtrend, consolidation, weekend low-vol, news event). Then replay those sessions
to check if the backtest edge holds across a broader dataset before risking more capital.

**Option C: Accept the null hypothesis**
The strategy does not have a replicable edge in live markets at this sample size.
Shut down the demo, document all findings, and start fresh with a different approach.
