"""Vendored surfer PoC (crypto cross-sectional momentum + tail-managed VRP sleeve).

Provenance: copied verbatim from foxhunt `scripts/surfer/{signal_sweep,pit_sweep,surfer_poc}.py`.

ONLY edits applied (no algorithm / math / constant changes):
  * `sys.path.insert(...)` + bare sibling imports rewritten as package-relative
    (`from fxhnt.vendor.surfer.signal_sweep import ...`, `from fxhnt.vendor.surfer import pit_sweep`).
  * data root made configurable via `$FXHNT_SURFER_DATA_DIR` (default `/data/surfer`):
    `pit_sweep.load()` reads `$FXHNT_SURFER_DATA_DIR/crypto_pit/*.npz`; `surfer_poc` resolves
    `STATE` and the dvol cache under `$FXHNT_SURFER_DATA_DIR`.
  * `surfer_poc.paper_step(cfg, state)` added: a value-returning refactor of `paper()` for the
    fxhnt ForwardTracker (same mark / weekly-rebalance / VRP-scaling math, no file IO / printing).

torch is imported at module level (used in `signal_sweep.sharpe_t`/`validate` and `surfer_poc.backtest`)
and is kept — this is a faithful port, not a numpy reimplementation.
"""
