mirror of
https://github.com/jaxperro/winning-wallet-finder.git
synced 2026-08-02 10:47:46 +00:00
cf9465f38a
leanbot: orders_matched inventory tracking on the nightly-published screened set (box never screens itself), frozen $150-500 one-sided crossing, paper FAK $100 capped at print+3c, complement routing for net-short leans, MAX_PER_EVENT=2, premium logged on every attempt. guards.py: ex-best-day / ex-top5 / top-event share — the cuts that caught both studies today, now machinery every grader reports nightly. grade_lag: v2 band arm (15-40c, forward-only from V2_FREEZE_TS, bar +$8) + three report-only control bands. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
54 lines
1.8 KiB
Python
54 lines
1.8 KiB
Python
#!/usr/bin/env python3
|
|
"""Publish the walk-forward screened maker-sharp set for wwf-leanbot (#26).
|
|
|
|
The bot must NEVER screen on its own live data — that is how a study
|
|
starts selecting the wallets that happened to win during its own window.
|
|
So the set is computed here, on tape strictly BEFORE today, exactly as
|
|
maker_lean.py's screen_asof does (the frozen #22 method), and published
|
|
to research/params/maker_set.json for the box to fetch.
|
|
|
|
Wired into nightly.sh before the graders. Same contract as
|
|
informed_set.py (surgebot's input): committed file = frozen input.
|
|
"""
|
|
import json
|
|
import os
|
|
import sys
|
|
import time
|
|
|
|
HERE = os.path.dirname(os.path.abspath(__file__))
|
|
sys.path.insert(0, HERE)
|
|
import tape # noqa: E402
|
|
import maker_lean as ml # noqa: E402
|
|
|
|
OUT = os.path.join(HERE, "params", "maker_set.json")
|
|
|
|
|
|
def main():
|
|
db = tape.connect()
|
|
# midnight UTC today — the set may only see strictly-prior tape
|
|
t_cut = int(time.time() // 86400) * 86400
|
|
sharps = ml.screen_asof(db, t_cut)
|
|
db.close()
|
|
out = {
|
|
"computed_at": int(time.time()),
|
|
"as_of": t_cut,
|
|
"method": "maker_lean.screen_asof (z>=2.5, >=6 resolved maker bets, "
|
|
"pnl>0) on orders_matched strictly before as_of",
|
|
"frozen_params": {"lean_usd": [ml.LEAN_USD, 500.0],
|
|
"net_gross": ml.NET_GROSS, "band": list(ml.BAND)},
|
|
"n": len(sharps),
|
|
"wallets": sorted(sharps),
|
|
}
|
|
os.makedirs(os.path.dirname(OUT), exist_ok=True)
|
|
tmp = OUT + ".tmp"
|
|
json.dump(out, open(tmp, "w"), indent=1)
|
|
os.replace(tmp, OUT)
|
|
print(f"[maker_set] {len(sharps)} wallets as-of "
|
|
f"{time.strftime('%F', time.gmtime(t_cut))} -> params/maker_set.json",
|
|
flush=True)
|
|
return 0
|
|
|
|
|
|
if __name__ == "__main__":
|
|
sys.exit(main())
|