Files
winning-wallet-finder_github/archive
jaxperro 972b32e8f0 CRITICAL: fix their_prev crash that silently killed all new opens since 07-05
_handle_their_buy referenced their_prev in the fresh-OPEN branch but only
assigned it in the is_add branch — every new position crashed with
UnboundLocalError the moment the their-bet ceiling landed 2026-07-06. The
webhook/heartbeat try/except swallowed it as 'handler error', so the bot
logged FOLLOW then silently placed NOTHING (last real fill 07-05 23:17;
live Fly logs show FOLLOW ArbTrader ... -> heartbeat error: their_prev).
This is the primary cause of 'live bot missing bets'. Fix: hoist their_prev
above the if/else so both branches see the signal's prior position.

Also (the user's two asks):
- copybot on_wallet_activity: a QUALIFYING bet we were too slow to catch
  (webhook missed / bot down / fast market resolved before we polled) is now
  recorded as a missed bet 'too slow to follow (Nm late)' instead of silently
  dropped; below-floor dust stays console-only. Filter runs before the stale
  gate so we know if it would have qualified.
- sync_floors.py rewritten: PIN each paper-bot wallet's floor to the trusted
  cache p80 (identical to the backtest's conv_thr), written to
  copybot.paper.json, wired into daily.sh + committed. Kills the boot-time
  data-api floor drift (fortuneking $1,498 boot vs $892 backtest) that made
  the live bot filter out bets the backtest kept.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 11:33:36 -04:00
..

Archive — strategies that didn't work

These tools were built and tested during the research in ../FINDINGS.md. They all proved to be dead ends (the market is efficient / the metric was biased), so they're archived here for reference rather than deleted. Each one works as written — it's the strategy that didn't clear. They import smart_money/copytrade from the repo root, so to run one you'd adjust the import path.

File What it did Why it's here
copytrade.py Paper/live copy-trade engine — mirror a watchlist's entries/exits, % -of-bankroll sizing, price guard, per-position cap, Discord alerts. Copying entries is EV; followed wallets win ~50%. Backtested 48%.
backtest.py Replay a watchlist over a window, mark outcomes from resolution. The tool that proved copy-trading loses.
edge_research.py Scan ~2000 wallets for reliable weekly consistency (% green weeks, profit factor, Sharpe). "Consistent" wallets were mostly young accounts (survivorship); no durable edge.
lookback.py Deep-dive a wallet list over a long window, split into halves for out-of-sample reads. Showed the "best" wallets had <90 days of history.
table_77.py Aggregate a wallet set to CSV (ROI, total staked, consistency). Supported the above; ROI inversely related to size.
lp_screener.py Rank reward-eligible markets by risk-adjusted LP yield. The high APRs were illusory — see lp_paper.
lp_paper.py Paper liquidity-provision loop: simulate quoting, track net = rewards adverse selection. Polymarket refunds unearned reward pool; thin-book "jackpots" don't pay.
xarb.py Cross-venue scanner: match the same event on Polymarket vs Kalshi, flag price gaps. Venues priced efficiently (~1¢); both legs cost >$1 after fees.

The keeper that came out of all this lives at the repo root: insider.py.

Later additions (2026-07-06 cleanup)

Path What it was Why it's here
hunt.py / huntwide.py / oos.py / copyback.py / watch.json pre-live/ research sweeps: candidate hunts, out-of-sample replays, copy-backtests superseded by the live/ selection layer (skill → conviction → validate_timing)
live-research/ the June 2026 selection experiments: strategy.py, followability.py, pnl_basket/focused.py, backtest_june.py, clean_test.sh + their outputs the research is settled (see FINDINGS); the surviving ideas live on in live/
us-venue/ us_listable.py — mapped the replay stream against Polymarket US listings (95/794 matched; US settles off-chain via FCM/clearinghouse, so no wallet tracking) the US move was scrapped 2026-07-06: no on-chain wallets, no copyable signal
retired-infra/ Railway build config (railway.json, nixpacks.toml, .railwayignore, runtime.txt), the Mac launchd runner (com.jaxperro.copybot.plist, run_copybot.sh), the GH-Actions cron (copybot.workflow.yml) the worker now runs on Fly.io arn (see root README); the Actions cron was throttled to uselessness; the Mac poller was replaced by the cloud worker
local/ untracked logs/CSVs/state from the above experiments kept out of git; safe to delete wholesale

Still-live code in this directory: copytrade.py is imported by the root copybot.py as its execution engine (sizing, risk gates, executors) — archived as a strategy (raw copy-trading is EV), kept as a library.