Commit Graph

14 Commits

Author SHA1 Message Date
jaxperro ab2f854dcc research: forward ledger 2026-07-22 [skip ci] 2026-07-22 13:11:32 -04:00
jaxperro 2960029145 surgebot: expected-resolution timestamps on positions (end_ts)
Fetched from CLOB end_date_iso at fill time; settle passes backfill
pre-ETA fills. Feeds the /surge Open tab's Resolves column.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 21:27:09 -04:00
jaxperro 1bfc91dd6a surgebot: read-only /feed endpoint for the /surge dashboard
CORS-open GET /feed serving the paper book (equity, counters, open,
settled, skips, informed-set meta) — paper data only, nothing mutable.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 15:29:12 -04:00
jaxperro eeeed39e22 surgebot: Study A paper harness, deploy-ready for the Friday sprint (#16)
Real-time PAPER trader of the FROZEN surge signal on its own Fly app
(wwf-surgebot, recorder-pattern image, no keys, no bot imports):
$100 paper book · 5%-of-equity daily stakes ($1 venue floor) · cash-gated
all-or-nothing · event cap 2 · paper FAK against the live CLOB book inside
p_ref*1.05 · provisional CLOB settles re-graded nightly with CTF payout
vectors (grade_surge.py -> surge_paper_ledger.jsonl). Informed set
published daily (informed_set.py -> params/informed_set.json, frozen
method). Unit-tested: fill/crater/event-cap/cash paths exact; live smoke:
dual sockets + sizing clean. Believing any of it stays gated on the #16
forward verdict.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 15:15:53 -04:00
jaxperro a7a6706365 research: forward ledger 2026-07-21 [skip ci] 2026-07-21 14:57:03 -04:00
jaxperro 2fab0424d0 research: sub-5c surge longshots as an EXPLORATORY forward arm
Same frozen surge signal, band opened to 0.5-5c, all niches, F=$300 —
tracked nightly as flow_sub5c_EXPLORATORY (NOT pre-registered). First
tape scan: they live in in-play sports totals/blowout tails + esports
maps; ~70% crater; 31 resolved fills, 4 wins, EV sign owned entirely by
two lottery hits; sim depth-blind at longshot share counts. Accumulate
to ~100+ resolved fills before any pre-registration or kill.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 14:48:26 -04:00
jaxperro c8118a093e research: forward ledger 2026-07-21 [skip ci] 2026-07-21 13:21:59 -04:00
jaxperro 3f696a2aca research: nightly lock uses an absolute path
First run exited 1 after a successful score: the exit trap's relative
rmdir ran from the repo root (post-cd) — wrong dir, stale lock left in
research/, every future night would have skipped itself.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 13:09:20 -04:00
jaxperro 8edccda58a docs: stage-0 coherence pass across README/HANDOFF/recorder/research
- README: recorder row + architecture diagram reflect fold->parquet->
  15-min mirror (and research/ joins the diagram); cheat-sheet gains a
  'sync the tape now' row
- HANDOFF: snapshot dated 2026-07-21, launchd roster (tape-sync +
  research-nightly wait behavior), #15 back in the open queue, tape ops
  line in quick-reference
- recorder/README: ops block (sync_tape + fold health, deploy gap note),
  storage economics (/mo, mirror as Stage-1 feedstock)
- research/README: nightly.sh wait-for-fresh-tape semantics
- live/tape_sharps.json: refreshed 4-day chain-validated screen (the
  smoke run had briefly left a chain-less version)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 13:07:31 -04:00
jaxperro e3e05d62d1 research: forward ledger 2026-07-21 [skip ci] 2026-07-21 13:06:26 -04:00
jaxperro c18de39b71 research: set-replay harness — sweep wallet-set compositions over the tape
Replays candidate sets through the engine's mirrored mechanics (stake rule
+ DD halving + their-shares ceiling + one-market-one-stake adds + all-or-
nothing cash gate + proportional sell mirror, copytrade.py cited) with the
calibrated sim fill model and tape proxy-resolution. Per-wallet conviction
floors from the paper config's pinned p80s (candidates without pins get
tape-p80, same rule). Outputs per-set×bankroll: realized/open, deployment
stats, miss families (capital/crater/band), capital-miss hypothetical P&L,
per-wallet realized, and --loo leave-one-out marginals at $1k.

Validated against the real paper book on the same window: 33 replay opens
vs 26 real (backfill bias documented — pre-tape positions' adds replay as
opens), capital misses 0 vs 0, peak deploy 62% vs the era's 74%, mean
deployed $297 vs ~$360. SEARCH TOOL ONLY per the silo README — verdicts
stay with forward_ledger.jsonl.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 12:54:35 -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 01cc9e88b5 research: nightly waits for fresh tape + absolute python
2026-07-21 first firing failed two ways: launchd's bare python3 has no
duckdb (framework python does), and 09:15 preceded the sleep-delayed daily
pipeline's tape ingest, so even a clean run would have scored a stale
tape. nightly.sh now uses the framework python and polls tape max-ts until
it is <6h old (15min polls, 8h deadline, then scores anyway and logs the
staleness).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 11:26:26 -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