docs: P&L survivorship correction + Set D follow set (FINDINGS + README)

FINDINGS: new sections on the realizedPnl backbone (killed 4 P&L bugs) and
the anti-survivorship abandoned-loser fold-in (PM /profit is itself biased;
our All-Time is the honest number where it reads below PM), plus the Set D
follow-set selection by simulation. README: follow set is now Set D (6
moderate-bet volume wallets); whale follow-all class retired.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
jaxperro
2026-07-07 22:13:43 -04:00
parent 041f1c4291
commit 3adf157f9d
2 changed files with 83 additions and 15 deletions
+65
View File
@@ -288,6 +288,71 @@ weekly; never size as if the 100% win rates are permanent.
trusted rows, judge held edges on windows longer than the wallet's lead time,
and add `z_all` — skill must show in the whole book, not just the big bets.*
## Making P&L equal reality — the survivorship correction, finished (2026-07-08)
The sharps table's All-Time P&L had been a `won × entry × size` reconstruction,
and decomposing it against each wallet's Polymarket profile (lb-api `/profit`,
the **PM P&L** column) exposed it diverging by **up to 10× — and flipping
signs.** Four distinct bugs, each earned by decomposing an outlier:
1. **A 2,000-row pull cap** (`max_pages=40`) truncated high-volume wallets —
ewww1's 4,088 positions ($409k) showed as 740 ($40k).
2. **Both-sides positions double-dropped** — one-per-market dedup kept the
winning leg and silently dropped the paired losing leg (suraxy: +$35k of
phantom profit).
3. **`initialValue = 0`** on big longshot winners mis-sized the reconstruction.
4. **Corrupt near-epoch `res_t`** rows polluted the sums.
**The fix that killed all four at once:** stop reconstructing, and sum
Polymarket's own `realizedPnl` per closed position over the wallet's *full*
history (`cache.closed_exits`, incremental). This is the wallet's realized
track record — what a copier mirroring their buy/sell/hold actually banks — and
it needs no size/entry/timestamp, so both-sides, `iv=0`, and bad `res_t` all
become moot, and it sums to PM by construction.
**Then the deeper one — the founding survivorship bias, live inside PM itself.**
A residual gap remained: PM `/profit` is *itself* survivorship-biased. Bets that
lost, went to $0, and were never redeemed sit in `/positions` at `curPrice 0`
real losses, but PM under-counts them **unevenly** (it subtracts Coteykens'
$52k of abandoned losers to land at $14k = our number, but does *not* subtract
oliman2's $161k, leaving PM at $112k against a true $20k). So `_open_split` now
folds those decided-but-unredeemed positions into the realized total, leaving
only genuinely in-flight positions in a new **Open P&L** column. The result:
**where our All-Time reads below PM, PM is the biased number and ours is the
truth.** oliman2 $181k → **$20k**, JuiceFarm $380k → **$32k** — wallets that
looked elite on redeemed-only P&L are mediocre once you count the bets they
walked away from. Full-list check: 27 of 31 sharps match PM within a few
percent, 4 are honestly-lower, and — the correctness signal — **zero
over-count.**
*Lesson: a wallet's redeemed P&L flatters "sell your winners, abandon your
losers." The honest record counts the abandoned losers; the profile number
doesn't. Rank on realized-including-abandoned, and read the open book as a
separate risk.*
## Choosing the month's follow set from corrected data (Set D, 2026-07-08)
With P&L finally honest, the follow set was rebuilt by simulation. Ranking on
the signals that actually predict forward copy profit — 2-month **Copy P&L**
(validated outside the backtest window), 30-day conviction form, copyable lead
(no sub-hour snipers), a clean open book, and moderate bet size (a $1k book
can't follow a $3k-clip wallet) — then backtesting candidate portfolios:
| set | equity (30d, $1k) | WL | missed |
|-----|-------------------|-----|--------|
| old live set | $15,359 | 25079 | 0 |
| 5 high-lead big-bettors | $3,661 | 4418 | **144** (capital-capped) |
| **Set D (6 moderate-bet)** | **$27,799** | **27975** | **0** |
**Set D = LSB1, imwalkinghere, Kruto2027, 42021, 0xbadaf319, BikesAreTheBikes**
— the sweet spot where return, a 79% decided win rate, full capture (0 missed),
and diversification all peak. Two rules fell out: **moderate-bet wallets beat
big-bettors** on a small book (the whales get capital-capped, 144 missed), and
**imwalkinghere + LSB1 are irreplaceable** (dropping them halves the return).
The backtest is in-sample (a ceiling), but every Set D wallet also clears the
out-of-window Copy P&L signal — that's what separates it from curve-fitting.
The live July book remains the only out-of-sample truth.
## Repo layout
- `insider.py` — the detector: z-score/p-value, timing/freshness/sizing signals,
+18 -15
View File
@@ -30,16 +30,18 @@ Three deployed pieces + one static dashboard:
**The July 2026 live test:** a fresh $1,000 paper book (started 2026-07-02 on
Railway; moved to Fly.io Stockholm 2026-07-06 with the book intact) following
the wallet set in **`live/copybot.paper.json`** — the single
source of truth (currently 5 volume + 3 whale wallets; the dashboard hero lists
them live). Two stake classes: **volume** wallets (4% of equity/bet) are copied
on their **conviction bets only** (auto p80 floor derived at boot); **whale**
wallets (12%/bet) are copied on **every trade** — they're the big-clip informed
holders the trusted-row re-validation surfaced (see FINDINGS "The holder blind
spot"). Every stake is **capped at the signal's own bet size**. Every fill
records detection lag, price slippage, and the taker fee; missed bets are
recorded and settled hypothetically. If this month's *measured* numbers hold
up, real money follows (see [`LIVE_TEST.md`](LIVE_TEST.md)).
the wallet set in **`live/copybot.paper.json`** — the single source of truth.
The follow set is **Set D** (2026-07-08): six moderate-bet, copyable, copy-P&L-
positive wallets — **LSB1, imwalkinghere, Kruto2027, 42021, 0xbadaf319,
BikesAreTheBikes** — chosen by simulation over the corrected data (see FINDINGS
"Choosing the month's follow set"). All are **volume** class: copied on their
**conviction bets only** (top-20%-by-stake, floor pinned daily from the trusted
cache p80 via `sync_floors.py`), 4% of equity/bet, **capped at the signal's own
bet size**. The whale class (12%/bet, follow-all) is retired — those wallets
fell off the sharp list once refunds and abandoned losers were scored honestly.
Every fill records detection lag, price slippage, and the taker fee; missed
bets are recorded and settled hypothetically. If this month's *measured*
numbers hold up, real money follows (see [`LIVE_ROLLOUT.md`](LIVE_ROLLOUT.md)).
```
data layer selection execution display
@@ -186,11 +188,12 @@ backtest and bot share:
and `slippage_pct` are logged, and the backtest applies a +0.5%/~90s
haircut. Poll-era measurements: ~39s avg lag, **4.0% avg slip** (the
asymmetric price guard means better-than-their-price fills are common).
- **Dynamic sizing, two wallet classes, their-bet ceiling**: each bet stakes a
fraction of current working equity set by the followed wallet's class —
**`volume`** (default, 4%, conviction bets only) or **`whale`** (12%, every
trade), fractions in `follow.class_pct` — **and is never larger than the
signal's own position size**: when the percentage works out to more than the
- **Dynamic sizing, their-bet ceiling**: each bet stakes a fraction of current
working equity — **4% for `volume`** wallets (conviction bets only), the
class the whole Set-D follow list now uses; `follow.class_pct` still carries
a `whale` fraction (12%, every trade) for the retired follow-all mode — **and
is never larger than the signal's own position size**: when the percentage
works out to more than the
wallet actually bet, the copy mirrors their exact amount (you can't
out-conviction the signal, and fills stay within size the market demonstrably
absorbed). Stakes compound both ways and halve while equity is below 80% of