# Shadow Run Fee/Funding Review Pattern

Use this when reviewing a 24h paper/shadow crypto trading run, especially Hyperliquid perps.

## Required review steps

1. **Separate closed PnL from open exposure**
   - Report closed trades, win/loss, realized net PnL, and profit factor.
   - Then mark every open paper position to current exchange mid/mark price.
   - State the combined realized + unrealized result. Do not call a run profitable if open positions are carrying uncounted risk.

2. **Compute fee drag explicitly**
   - Show gross PnL before fees and net PnL after fees when available.
   - For small-notional scalps, compare average trade edge against round-trip fees and spread.
   - If gross is flat/slightly positive but net is negative, treat the issue as insufficient edge after costs, not merely bad luck.

3. **Funding is a filter, not the thesis**
   - Query or read current per-coin funding for open/candidate positions.
   - For shorts: positive funding is received; negative funding is paid. For longs, the sign is inverted.
   - Estimate `notional * hourly_funding_rate * hours_held_or_24h` to show scale.
   - Funding on small paper notionals is usually too small to offset fees or adverse price movement; use it as a score/filter, not as a profit engine unless the strategy is explicitly funding-arbitrage with hedges.

4. **Diagnose entry quality before exit tuning**
   - Look for overextended trend-chasing: shorting after a bearish move when RSI/EMA/VWAP suggest bounce risk, or longing after an overextended rally.
   - Prefer adding fee-aware, funding-aware, anti-chase/pullback-confirmation gates over increasing leverage or loosening stops.

5. **User-facing conclusion**
   - Say plainly: live / no-live.
   - If negative after mark-to-market or fees, say the bot is not making money.
   - Keep engineering details out unless asked; summarize as portfolio/risk management.

## Restart gate implication

A shadow run with fewer than ~30 closed trades, profit factor below 1.25, negative net PnL after fees, or open positions that turn the run negative after mark-to-market is **not** a live candidate. Continue paper/shadow with improved gates.
