Files
winning-wallet-finder/live/daily.sh
T
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

27 lines
1.3 KiB
Bash
Executable File

#!/bin/bash
# Daily skilled-wallet refresh, cache-backed:
# 1) discover — enumerate traders of markets resolved in the last ~14 days,
# merged into the accumulating candidate pool
# 2) freshen — force a re-pull of the current watchlist (forward tracking),
# then top up the cache (collect re-pulls only new + >14d-stale
# wallets, so it's cheap after the initial collection)
# 3) re-score — the 5-gate funnel, instant from cache -> watch_skilled.json
# 4) dashboard — regenerate + snapshot for auditable forward history
#
# Schedule with launchd/cron (Mac must be awake). Logs to daily.log.
set -u
cd "$(dirname "$0")"
echo "[daily] $(date '+%F %T') 1/4 discover (enumerate last 14d)"
python3 enumerate.py 14
echo "[daily] $(date '+%F %T') 2/4 freshen cache (watchlist forced + new wallets)"
python3 -c "import json,os,cache
if os.path.exists('watch_skilled.json'):
cache.invalidate([w['wallet'] for w in json.load(open('watch_skilled.json'))])" 2>/dev/null || true
python3 collect.py
echo "[daily] $(date '+%F %T') 3/4 re-score (cache-backed, instant)"
python3 skill.py
echo "[daily] $(date '+%F %T') 4/4 dashboard"
python3 dashboard.py
mkdir -p history && cp watch_skilled.json "history/watch_$(date '+%Y%m%d').json" 2>/dev/null
echo "[daily] $(date '+%F %T') done -> watch_skilled.json + dashboard.html"