22 Commits

Author SHA1 Message Date
jaxperro 052eda04d1 research: Study C FREEZE — maker inventory-lean pre-registration (follow arm verdict; fade failed its concentration gate)
score_lean wired into the nightly (walk-forward as-of screening, frozen
trigger, chain truth); params/study_lean.json frozen; forward window =
ledger rows dated after this commit. Fade $2k+ arm excluded by the
pre-declared gate (top event 32%, tail net-negative) — tracked
report-only. Follow $150-500: robust across 869 events (top 14%).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-23 15:49:50 -04:00
jaxperro 222a750bd7 docs + audit sweep 2026-07-23: fill-model lesson, five-test day, archive pass
FINDINGS: 'The fill model is the next scorer' section (A2 chain grade
-$7.54/fill x1344 confirms the surge kill; oracle harness chain grade
vetoes the ledger-positive tiers; virtual-book +26% variance footnote;
the five tandem tests and the makers-on-the-wall through-line).
HANDOFF: snapshot -> 07-23 (7-wallet rev 5, dark flags, Friday agenda
incl #20/#21). READMEs: /test consolidation row, measurement-harness
research row, study statuses + new script inventory.
Archive: value/ (closed 07-19) + its test, ETHERSCAN_MIGRATION.md,
order_probe v1 -> archive/; replay_out/ gitignored; links repaired.
Tests: all 7 active scripts pass post-move.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-23 13:55:27 -04:00
jaxperro e6730ef579 research: data-moat hardening — durable settle logs, offline-proof forward backfill, nightly market-metadata snapshot
- surgebot/oraclebot: settles now append-only to /data/*_settles.jsonl
  (SETTLED_TRIM rotation can never lose a settle; graders pull them)
- forward.py: backfills any tape-covered day missing from the ledger —
  a Mac offline gap > RESCORE_DAYS no longer leaves verdict-evidence holes
- meta_snap.py: nightly gzipped snapshot of all active markets (12k, 2MB/d,
  local-only) — end dates make tau knowable at trigger for every tape
  trigger; token->outcome maps kill the label-gap scorer artifact class
- .gitignore: pulled raw streams + meta stay local (re-fetchable, lean repo)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-23 00:43:12 -04:00
jaxperro 5c8ee5961b stage-0 warehouse: recorder folds its own tape to parquet; Mac mirrors every 15 min
The nightly Mac-coupled bulk ingest was the fragile link (today: Mac slept
through 08:00, the pipeline started 09:31, and the sftp bulk pull wedged in
timeout cascades holding the db lock — digest blocked behind it). Stage 0
moves the fold onto the box and reduces the Mac to an incremental mirror:

- recorder/fold.py (sidecar, capture stays PID 1): closed gz segments ->
  zstd parquet /data/parquet/<fam>/date=*/segment.parquet, row-parity
  verified, manifest-logged, THEN gz deleted. Deletion invariant STRONGER:
  raw needs a verified parquet; parquet needs a Mac ACK before the disk
  guard may prune it. duckdb capped 384MB; VM 256MB -> 1GB.
- recorder/sync_tape.py (com.jaxperro.tape-sync every 15 min + daily.sh):
  manifest-driven incremental sftp pull, per-file row verify, append into
  rtds.duckdb NATIVE tables (views-over-parquet rejected: sim's per-asset
  point queries would crawl), segment-keyed idempotence shared with the
  legacy ingest.py (kept as fallback), ack back to the box.
- recorder/bootstrap_parquet.py: pre-fold history exported to the mirror,
  parity OK (13.84M trades + 3.07M aux). live/parquet/ is now the complete
  durable layer Stage 1 (MotherDuck/ClickHouse) would consume.
- research/tape.py connect(): brief retry — the 15-min sync holds the
  write lock for seconds.

First run: backlog folded in <60s on the box, 36/36 files mirrored+
verified, rtds.duckdb 13.8M -> 18.2M trades, tape age 24h+ -> ~15-45 min.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 12:46:54 -04:00
jaxperro 2f4f2ccbbe research silo: edge factory — calibrated sim, Study A/B, forward ledger (#2, #16, #17)
research/ is a hard silo (README rules): read-only tape, no bot imports,
own launchd (com.jaxperro.research-nightly 09:15, after daily ingest).

- tape.py: proxy-resolution (the 742/742-validated method), niche + crypto
  strike/expiry/sprint parsers, tick loaders
- sim.py: FAK execution replayer; hold_s=3 fitted on 29 real labeled live
  attempts (79% fill/miss classification), price noise 2-4c, measured
  OPTIMISM BIAS -2c/fill carried into every verdict threshold
- requote.py: crater refill timing per niche (crypto 94% <4s, esports 83%
  <10s, sports needs ~25s, geo/politics minutes) -> params/requote_timing.json
- study_flow.py + robustness: in-play surge momentum. Identity NULL result:
  10 pooled controls +23.85/fill == informed +23.68 -> hypothesis revised at
  freeze, surge-EV primary, identity secondary (#16)
- study_oracle.py: oracle digital fair value. 86% craters, winner's-curse
  inversion at big edges, nothing frozen (no cell at 30 fills) (#17)
- forward.py + nightly.sh: re-scores frozen studies on last 3 tape days,
  appends forward_ledger.jsonl; verdicts ONLY from post-freeze rows

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-20 17:34:22 -04:00
jaxperro ddf1e97a54 recorder: nightly tape ingest into live/rtds.duckdb (own DB — never contends with the bet cache lock)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-17 13:02:41 -04:00
jaxperro f021e1fe5e edge.py: the bankroll-decision number — parity-era edge vs measured fee hurdle, daily row + digest footer
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-16 18:49:48 -04:00
jaxperro 8958279ee8 cleanup: archive everything the live system no longer touches
- retired-infra/: Railway config, Mac launchd runner, GH-Actions cron
  (worker is Fly.io arn now; Actions cron last fired 2026-07-02)
- live-research/: the June selection experiments (strategy/followability/
  pnl_basket/pnl_focused/backtest_june/clean_test + outputs)
- us-venue/: the scrapped Polymarket-US listability probe (+ its
  env-gated ONLY_CONDS replay filter stays in portfolio.py — generally
  useful for subset replays)
- root sweeps hunt/huntwide/oos/copyback/watch.json -> archive/
- untracked logs/CSVs of dead experiments -> archive/local/ (gitignored)
- READMEs updated: Fly migration, geoblock gotcha, new file map

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 17:18:46 -04:00
jaxperro ee4e1750e6 live pipeline test kit: preflight checker, runbook, tiny-cap config template
preflight_live.py verifies key/auth, USDC balance, market access, and redeem
gas read-only (no orders). LIVE_TEST.md is the supervised $5-trade runbook.
config.live.json + copybot_state.live.json gitignored (key never committed).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 11:18:43 -04:00
jaxperro 716daeccc1 dynamic sizing: 4% of equity per bet, drawdown brake, per-event correlation cap
- engine (copytrade): stake_usd() = bankroll_pct x current equity (cash + open
  cost basis) - Kelly-style compounding both directions - halved while equity
  sits below 80% of its high-water mark; new risk.max_per_event (default 2)
  blocks stacking correlated markets on one real-world event (dated-slug prefix
  grouping; LSB1 once put 6 conviction bets on a single match).
- copybot: feed/summary report the dynamic stake, stake_pct, event_cap, hwm.
- portfolio backtest mirrors the exact same rule (PCT 4%, clamp $5-$150,
  EVENT_CAP 2, brake 80%/half), with per-bet stakes in every table row and a
  persistent CLOB slug cache for event grouping. June backfill: +426% vs +168%
  flat - compounding amplifies the in-sample month; July live is the test.
  Misses fell 62 -> 19 cash-missed (+26 deliberate event-cap skips): smaller
  early stakes capture more signals.
- configs: bankroll_pct 0.04, max_trade/max_position 150 (runaway guards),
  max_per_event 2.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 10:54:07 -04:00
jaxperro 2946ac9170 copybot: 24/7 paper copy-trade test + live dashboard feed
Push-or-poll copy bot (FollowFilter conviction gate + copytrade engine),
cash-gated $1k book, resolution settling, lag/slippage logging, FOK live
orders, on-chain redeem. Runs free 24/7 via GitHub Actions (--poll-once
cron) and publishes live/copybot_live.json for the trading dashboard.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 12:41:56 -06:00
jaxperro 3d0bc7f001 Add live/ skilled-wallet scanner + cache; document clean OOS finding
live/: operationalizes the LBS/Yale "skilled ~3%" result against the live
data-api. Enumerate recent liquid markets -> top traders -> candidate pool;
cache every wallet's resolved bets once in DuckDB (~26k wallets / 12.5M bets,
keyed by per-bet resolution time so any cutoff re-scores in seconds); 5-gate
skill funnel (n>=15, z>0, BH-FDR, split-half OOS, MM/bot cap); dashboard +
daily refresh.

Key finding: copying the high-win-rate "favorite-rider" cohort looks +23.6%
in-sample but loses -7.4% once selected on pre-June-1 data only (99% -> 68%
win rate) — selection bias, reproducing the paper's "lucky winners revert"
result on live data. Win rate != edge, again.

wide/: bulk subgraph->DuckDB scanner (survivorship-bias-free over all wallets),
but the public subgraph is frozen at Jan 2026 -> historical tool only.

Large local data (*.duckdb, candidates.json, *_scored.json, history/) gitignored.
README + FINDINGS updated with the current logic and the clean result.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 11:16:20 -06:00
jaxperro bc09a8231f gitignore generated scan outputs (huntwide.csv, logs) 2026-06-13 16:59:30 -04:00
jaxperro 079fbf1787 Add push-based wallet trade watcher (Alchemy webhook -> Discord)
webhook_receiver.py: zero-dep stdlib HTTP server that receives Alchemy
Address-Activity webhook POSTs, confirms/enriches the trade via Polymarket
data-API, and pushes a Discord alert — fires only on a real trade, no polling.
Cloud-ready: secrets via env (DISCORD_WEBHOOK, ALCHEMY_SIGNING_KEY), non-secret
watch list in committed watch.json, binds to $PORT, /health endpoint,
optional HMAC signature verification, in-memory dedup. Procfile for one-command
deploy. config.json (secrets) stays gitignored.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 16:49:55 -04:00
jaxperro c1265c5461 Add ring-hunt sweep (hunt.py) over news-driven event markets
Sweeps a list of insider-prone markets, scores each market's top traders with
insider.analyze, and runs funding-cluster ring detection. First real hunt
flagged DREAMBIG. (z=8.9, p~2e-19) and qcp14 (z=5.3, p~4e-8) on the Iran
ceasefire-extension market — insider-grade improbability — with no operator
rings (all independently/exchange-funded; exchange-funded wallets aren't
linkable, a known limit).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 13:15:09 -04:00
jaxperro 7536379023 Add cross-venue scanner (xarb.py); verdict: PM<->Kalshi is efficient
xarb.py pulls Polymarket (Gamma) + Kalshi (elections API, ~65k markets),
matches the same contract (token overlap + same resolution month + exact
numeric match on thresholds/scores/dates), and computes both arb directions
with Kalshi's 0.07*P*(1-P) taker fee.

Verified verdict: no retail cross-venue arb. On liquid, identical, cleanly-
matched contracts the venues agree to ~1c and locking both sides costs >$1
after fees (worked example: Brazil-Morocco BTTS, PM 0.46/0.47 vs Kalshi
0.47/0.48 -> every direction negative). The big apparent edges are false
matches, illiquid wide-spread markets, or stale snapshot timing.

README now records the full project conclusion: six systematic public-data
edges tested, all efficient/illusory. Durable edge needs speed/infra, private
information, or liquidity provision -- not a turnkey public-data scanner.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 12:31:34 -04:00
jaxperro a410845fd5 Add paper liquidity-provision loop (lp_paper.py)
Simulates two-sided quoting on the screener's top low-vol markets against the
live order book, tracking net = rewards accrued - adverse-selection bleed.
Clean cash + mark-to-market accounting; fills modeled when midpoint crosses a
resting quote (slightly pessimistic on fill rate); rewards accrue by
score-share of each pool. Discord summaries + state persistence so it can run
for days. This is the decisive, no-money test before any funded/hosted bot.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 11:21:21 -04:00
jaxperro d1ca52a33f Add liquidity-rewards market screener (lp_screener.py)
Ranks Polymarket's ~8000 reward-eligible markets by risk-adjusted LP yield:
reward pool / order-book competition near mid (gross APR for a $1000
two-sided position), penalized by 24h midpoint volatility (adverse-selection
proxy) and time-to-resolution. One-shot snapshot -> lp_markets.csv. README
documents the rewards mechanics, the screener, and the open caveats before
the paper LP loop. Generated data files gitignored.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 11:01:26 -04:00
jaxperro 34b39fa1ba Add edge-research tooling and document the full research log
Adds edge_research.py (scan ~2000 wallets for reliable/copyable weekly edge),
lookback.py (long-window half-split out-of-sample read), and table_77.py
(aggregate a wallet set to CSV). README now leads with a research log
capturing the key findings: win-rate survivorship bias, win-rate != EV,
flat-size copying is -EV, the reliable edge is rare and skews to young
accounts, and ROI is inversely related to bet size. Generated data files are
gitignored.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 00:22:10 -04:00
jaxperro a426b8bb05 Fix survivorship-biased win rate; add backtest, per-position cap, Discord alerts
The scanner measured win rate over /closed-positions only, but Polymarket
only redeems winning shares — losers sit unredeemed in /positions at
curPrice 0 and never enter closed-positions. That made win rates wildly
inflated (e.g. 90.6% vs a true 48.3%). Win rate now unions both endpoints
over a 90-day window. With the honest metric, ~no top wallet exceeds ~60%;
true rates cluster near 50%.

Also:
- backtest.py: replay a watchlist over a recent window, fill at historical
  price, mark outcomes from resolution. A 7d run of 4 top wallets returned
  -48%, confirming flat-size entry-copying is -EV at ~50% hit rates.
- copytrade.py: add max_position_usd cap (proportional adds could otherwise
  balloon one position to the whole exposure limit) and Discord webhook
  alerts on every would-be trade.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 23:25:59 -04:00
jaxperro 8bc0a5c85b Add copy-trade engine: mirror watched wallets' entries and exits
Watches a wallet list and copies trades onto your account: % -of-bankroll
sizing, proportional entry/exit mirroring, 5% price guard, and a no-backfill
rule for positions held before start. Paper mode by default; live trading is
gated behind config + --live + a typed confirmation, with hard risk caps
(per-trade, daily, total exposure, open positions, price bounds). Live
execution via py-clob-client (lazy import). Credentials/state gitignored.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 22:36:22 -04:00
jaxperro 5ed55009b5 Polymarket smart money tracker: find >75% win-rate wallets betting weekly
Dashboard + terminal tool that pulls the 7d/30d/all leaderboards, measures
each wallet's win rate over its most recent resolved bets, and its distinct
markets traded per week. Zero dependencies (Python 3 stdlib only).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 22:03:00 -04:00