# BTC-USD perp trade decision (PaperTrade, Hyperliquid mid)

## Decision

```json
{
  "direction": "long",
  "leverage": 800,
  "take_profit_bp": 20,
  "take_profit_price": 81799.77,
  "bust_distance_bp": 7.7,
  "bust_price_estimate": 81573.64,
  "expected_net_return_on_margin_pct": 127.5,
  "confidence": 0.36,
  "regime": "volatile_choppy",
  "key_levels": { "support": 81525, "resistance": 81765 },
  "entry_mid": 81636.5,
  "data_time_utc": "2026-10-16T21:09:23Z",
  "reasoning": "On 15m, momentum is up: EMA9 is rising about 13 bp per 3 bars and price is about 10 bp above the 15m EMA9/21. 1m price just made a high-volume reversal off 81,525 (51.6 BTC rebound bar at 21:04). The perp trades about 3.9 bp below oracle, which shows aggressive selling that has not followed through. In a 1m first-passage backtest over the last ~3h, longs hit their targets far more often than shorts at every leverage/TP pair tested. Every pair had negative expected value, because a bust loses 100% of margin. 800x with a 20 bp target scored least bad (-13.7% EV vs -14 to -22% for the others). It clears most of the haircut (80% kept), and the target sits just above the 60-minute high of 81,765.",
  "risks": "If price retests the 21:03 low at 81,525 (about 14 bp below entry), the trade is liquidated at about 81,574 (7.7 bp down). 1m volatility is about 4 bp per minute and the 90th-percentile 1m downside excursion is about 5 bp, so ordinary noise can trigger the bust, especially in thin Friday-evening liquidity."
}
```

## Facts (observed, Hyperliquid public API `https://api.hyperliquid.xyz/info`, fetched 2026-10-16 21:08–21:09 UTC)

| Item | Value | Source query |
|---|---|---|
| Best bid / ask / mid | 81,636 / 81,637 / **81,636.5** | `l2Book` nSigFigs 5 |
| markPx / oraclePx / premium | 81,636 / 81,669.1 / −0.039% | `metaAndAssetCtxs` |
| Funding (hourly) | +0.00125% (steady over the last 6 h) | `metaAndAssetCtxs`, `fundingHistory` |
| Open interest | 41,221 BTC (41,217 one minute earlier) | `metaAndAssetCtxs` |
| prevDayPx / 24h change | 82,145 / −62 bp | `metaAndAssetCtxs` |
| 24h high / low (15m) | 82,898 / 80,772; range position 0.41 | `candleSnapshot` 15m |
| 6h high / low (5m) | 81,822 / 80,772 | `candleSnapshot` 5m |
| 60m high / low (1m) | 81,765 / 81,525 | `candleSnapshot` 1m |
| 24h VWAP (15m, typical price) | 81,751.7; mid is −14.2 bp from it | computed |
| 1m realized vol, bp/min | 15m 4.1, 30m 4.2, 60m 3.9, 180m 6.5 (contracting vs 3h) | computed |
| 1m excursion from open, median / p90 (up, down) | 1.7/1.0 bp; 6.0/5.0 bp | computed |
| 5m excursion from open, median / p90 (up, down) | 5.3/6.6 bp; 25.1/20.1 bp | computed |
| EMA distance and slope | 1m: flat around EMA9/21/50. 5m: +7.9 bp over EMA21, slope +3.2. 15m: +9.7 bp over EMA9, slope +13 | computed |
| Book imbalance within 10 bp | +0.31 (bid-heavy) at 21:08, then −0.22 (ask-heavy) at 21:09: unstable | `l2Book` |
| recentTrades | Only 10 prints over about 16 s, net +0.09 BTC buy: too thin to use as a signal | `recentTrades` |
| Last 10 × 1m | Sell-off 81,708 → 81,525 (21:00–21:03), then a 51.6 BTC rebound bar to 81,635 and quiet consolidation 81,596–81,650 | `candleSnapshot` 1m |

## Backtest (computed, `tools/analyze.py` + `tools/ev.py`)

Method:
- Entry at each 1m open over the last ~180 minutes, with a 30-bar horizon.
- Bust is counted first when both levels fall inside the same bar, which is conservative.
- Candle highs and lows are trade prices, not BBO mid, which is an approximation.
- Win return uses the exact haircut formula plus the 2% fee; EV = P(win)·return − P(bust)·100%.

| Long setup | P(win) | P(bust) | Win return | EV |
|---|---|---|---|---|
| 750x / 20 bp | 0.351 | 0.563 | 119.5% | −14.3% |
| **800x / 20 bp** | 0.344 | 0.576 | 127.5% | **−13.7%** |
| 800x / 15 bp | 0.411 | 0.543 | 92.6% | −16.2% |
| 750x / 5 bp | 0.689 | 0.311 | 22.8% | −15.4% |
| 1000x / 20 bp | 0.291 | 0.656 | 159.4% | −19.2% |

Shorts did much worse in every cell; for example, 800x / 20 bp short had P(win) 0.18 and P(bust) 0.78.

## Inferences (judgement, not fact)
- **Direction long:**
  - Higher-timeframe (15m) momentum is up.
  - The 21:03 flush was absorbed on heavy volume.
  - The negative premium means the perp trades at a discount to oracle, which tends to mean-revert upward.
  - Funding is too small to matter over 30 min.
  - Against the long: price is below the 24h VWAP and down 62 bp on the day.
- **Leverage/target:**
  - Under these rules, every combination has negative backtested EV.
  - Lower leverage buys bust distance, and larger targets amortize the haircut.
  - 800x / 20 bp was marginally the best cell and pays the largest win among the near-best options.
  - The 20 bp target (81,799.8) sits above the 60m high (81,765) and below the 6h high (81,822). Reaching it requires breaking 81,765.
- **Regime:** volatile_choppy. A 180 bp intraday range has given way to contracting 1m volatility, and the 1m and 15m timeframes disagree.

## Uncertainty
- Confidence is 0.36, roughly the backtested hit rate. Most likely outcome: liquidation, not take-profit.
- The backtest is in-sample, short (about 150 windows, overlapping and therefore correlated), and taken during a 15m uptrend, so it is biased toward longs.
- Book imbalance flipped sign within one minute, so it gives no reliable signal.

## Unanswered questions
- **News and macro:** a web search for 2026-10-16 BTC news returned nothing current. Searched results such as https://www.gamerevolution.com/?p=685699 and https://financefeeds.com/bitcoin-price-today-an-overview-of-current-market-dynamics/ were dated 2022–2025 and are not used. The decision has no news input.
- **Calendar:** 21:09 UTC Friday is after the US equity close. No scheduled US macro release is expected in the next hour, but this was not verified against a calendar.
- **Not fetched:** liquidation heatmaps and other exchanges' order flow.
- **Price drift:** the trade is only valid at the stated entry mid. If the live mid has moved, recompute the TP and bust prices from the new mid.
