paros

CI License: MIT Prose: CC BY-NC-ND 4.0 Python 3.11+ Ruff

Xylem Group’s applied research arm: prose notes, reproducible notebooks, governance specs, and benchmark data for FLP toxicity measurement, cascade detection, hedging across cascade regimes, and perp-venue parameter calibration. Sister repo to kos

Cross-venue BTC — the headline methodology demo

Hyperliquid BTC vs Binance USDT-M BTCUSDT, same 24h window. Mid path overlay, HL−BN basis in bps, 500-fill markout distribution per venue. Generated by notebooks/cross_venue_btc.ipynb.

Cross-venue BTC mid path and basis

Mean basis −0.65 bps, σ 6.95 bps over 24h — textbook cross-venue arbed BTC. The notebook also runs the markout sweep on each venue’s mid path and overlays the IQR bands; this is the methodology behind the cross-venue benchmarks this repo will publish at scale.

VPIN on real Binance flow

Same headline treatment for VPIN: 2.47M BTCUSDT trades, volume-clock buckets, rolling toxicity, with Binance’s 8-hour funding cycle marked. Generated by notebooks/vpin_btc_binance.ipynb.

VPIN on Binance BTCUSDT with funding markers

Empirical finding for liquid majors: the volume-clock × funding interaction documented in kos/vpin.py doesn’t produce a measurable artifact on BTCUSDT (near-funding VPIN is lower than rest-of-day at 0.73× ratio). VPIN’s volume-bucketing absorbs two-sided rebalancing that wall-clock metrics would flag as a spike. The artifact is likely venue- and asset-conditional; the same notebook on a long altcoin or smaller venue would be the next experiment.

How this repo relates to the rest

xylem-group-website/     ← canonical for prose. The website.
└── content/research/    ← read here as a website.

paros/                   ← THIS REPO. canonical for methodology.
├── notes/               ← mirror of site notes (synced one-way).
├── notebooks/           ← reproducible analyses, importing kos.
├── scripts/             ← data adapters + sync utilities.
├── governance/          ← parameter-calibration specs (planned).
├── benchmarks/          ← benchmark data + result tables (planned).
└── docs/img/            ← rendered hero plots committed for the README.

kos/                     ← the primitives library.
└── kos/{markout,vpin,if_stress}.py

Notes are written and edited on the site. They’re mirrored here on demand via python scripts/sync_notes.py so the repo stays a self-contained research artifact you can clone, read offline, cite, and reproduce. The site is the moving target; this repo is the snapshot.

Quickstart

git clone git@github.com:Xylem-Group/paros.git
cd paros
uv sync --extra dev

# Run a real-data notebook (the headline demo):
uv run jupyter lab notebooks/cross_venue_btc.ipynb

Real-data notebooks fetch one day of Binance BTCUSDT aggTrades on first run (~80 MB, cached under ~/.cache/binance_archive/). HL data is read from ~/data/silver/hl — adjust DEFAULT_ROOT in scripts/data_hl.py for your mount.

Notebooks

Each notebook reproduces a method or applies it to real data. Synthetic-data reproductions are paired with prose notes; real-data demos cite the data sources up top.

Notebook Type Pairs with
notebooks/cross_venue_btc.ipynb real data — HL + Binance USDT-M headline cross-venue methodology
notebooks/vpin_btc_binance.ipynb real data — Binance USDT-M VPIN methodology + funding-event interaction
notebooks/markout_real_aave.ipynb real data — HL L2 (AAVE) sub-second markout walkthrough
notebooks/01_flp_markout_reproduction.py synthetic notes/flp-toxicity-framework.md
notebooks/02_if_stress_sweep.py synthetic notes/gov-param.md, notes/liquidation-engine-designs.md

Scripts

The data adapters in scripts/ are temporary homes for what will eventually live in sigflow-adapters:

When sigflow-adapters lands its production connectors, the notebooks here swap to them with a one-line import change. The contract was designed for that.

Scope and limitations

Licensing

Two licenses, by content type — see NOTICE for the precise terms.