OctopusTakopi GitHub avatar

squeeze-tail-risk-benchmark

OctopusTakopi

This repository benchmarks four tail-risk optimization objectives (CVaR, spectral, distributionally robust CVaR, entropic VaR) against hard-coded threshold rules for protecting a diversified short book from intraday squeezes in Binance USD-M perpetual futures, finding that optimizer structure and recovery policy matter far more than the choice of risk functional.

Stars

13

7-day growth

No data

Forks

2

Open issues

0

License

MIT

Last updated

2026-07-29

AI repository intelligence
FR-AI / ANALYSIS

Why it is worth attention

The study provides a fully causal, reproducible pipeline with open code and data, revealing that the optimizer's recovery path dominates risk functional choice, and that tuning parameters on pre-incident data collapses protection for the fastest squeezes—a critical warning for quantitative risk management.

Who it is for

  • Quantitative traders and risk managers in crypto markets
  • Researchers studying tail-risk measures and volatility forecasting
  • Systematic hedge fund strategists designing intraday hedging overlays
  • Data scientists building causally validated backtesting frameworks

Use cases

  • Designing intraday short-squeeze protection for crypto perpetual futures portfolios
  • Comparing coherent risk measures (CVaR, EVaR, etc.) on a realistic backtest with execution costs
  • Evaluating the trade-off between protection, turnover cost, and net utility in tail-risk hedging
  • Testing walk-forward tuning pitfalls when rare events are absent from the calibration window

Strengths

  • Fully causal, next-bar execution with exact cost accounting (20 bps one-way) and a public data pipeline
  • Rigorous walk-forward tuning experiment showing that tuning on ordinary data cannot price cut speed for unseen fast squeezes
  • Detailed incident-level protection (e.g., 99.4% PIEVERSE protection for CVaR vs 76.5% threshold) with robustness across bootstrap seeds
  • Explicit falsification of extensions (curvature filtering, flow-based gates) with statistical uncertainty

Considerations

  • Limited to one three-month window and a single venue (Binance USD-M perpetuals); results may not generalize to other markets or periods
  • Stress-book incidents are ex-post conditioned, so per-squeeze protection fractions are single-event case studies, not population estimates
  • Unit-beta BTC-residualization is crude for low-beta names, and no funding, spread, impact, or liquidation models are included

README quick start

Benchmarking Tail-Risk Objectives for Intraday Short-Squeeze Protection in Binance Perpetual Futures

A study report benchmarking exposure-control objectives (CVaR, spectral risk measures, distributionally robust CVaR, entropic value-at-risk) against a hard-coded threshold rule for protecting a diversified short book from parabolic intraday moves in Binance USD-M perpetual futures. The motivating discussion is preserved with full attribution in SOURCE.md.

Note: every policy is scored on the same three axes: protection (fraction of peak squeeze loss avoided), cost (execution and turnover drag), and utility (net result once cost is set against protection). The universally optimal hedging design remains open. The full pipeline is published so every number can be checked; corrections are welcome.


Abstract

Background. A short book in crypto perpetuals carries unbounded right-tail risk. A small-cap contract can multiply intraday on no news, and a daily rebalance leaves the original short size exposed for hours; the July 26 PIEVERSE pump, during which realized volatility reached twice its forecast within ten minutes, is the motivating incident. Open design issues include the choice of intraday lookback, the turnover cost of reacting quickly, the documented upward bias of five-minute volatility forecasts, and the rule by which falling volatility should rebuild a reduced position.

Methods. The sample covers all 697 Binance USD-M perpetuals with complete history from May through July 2026, resampled to 5-minute bars. A two-horizon volatility-acceleration score (100-minute against 48-hour RMS volatility, computed on BTC-residualized returns) triggers either a hysteretic threshold overlay or one of four tail-risk optimizers over drift-conditioned scenarios: CVaR, a spectral Kusuoka mixture, Wasserstein distributionally robust CVaR, and entropic value-at-risk. Execution is causal (next bar) and charged 20 bps one-way. June selects the lookback; July 1–8 calibrates thresholds; July 8–22 is the untouched test window; July 22–28 contains the verified incidents.

Results. The 20-bar window maximizes forecast rank correlation with next-25-minute realized volatility (median pair-level Spearman 0.49 in selection, 0.41 out of sample). Threshold rules protect 70.3–73.9% of aggregate peak episode loss where price rose at least 10% after t

Related repositories

Similar projects matched by category, topics, and programming language.

lopopolo
Featured
lopopolo GitHub avatar

harness-engineering

Harness Engineering is a methodology for improving coding agent outputs by carefully crafting the environment around them—providing curated context, tools, and executable constraints that encode an organization’s nonfunctional requirements and cumulative lessons.

AI & Machine LearningAI Agents
2,390
slvDev
Featured
slvDev GitHub avatar

esp32-ai

A 28.9 million parameter language model runs on an $8 ESP32-S3 microcontroller entirely on-device, generating simple stories at about 9.5 tokens per second.

AI & Machine LearningLarge Language Models
1,960
littledivy
Featured
littledivy GitHub avatar

mimic

mimic captures traffic from any iOS or web app and automatically generates a Python client library that lets you call the app's API like a regular library.

AI & Machine Learning
1,482