OctopusTakopi GitHub avatar

squeeze-tail-risk-benchmark

OctopusTakopi

该仓库对四种尾部风险优化目标(CVaR、谱风险度量、分布鲁棒CVaR、熵值VaR)与硬编码阈值规则进行了基准测试,旨在保护Binance USD-M永续合约中的分散空头头寸免受日内轧空影响,发现优化器的结构与恢复策略远比风险泛函的选择更为关键。

Stars

13

7 天增长

暂无数据

Fork 数

2

开放 Issue

0

开源协议

MIT

最近更新

2026-07-29

AI 仓库情报摘要
FR-AI / ANALYSIS

为什么值得关注

研究提供了完全因果、可复现的流程(开放代码与数据),揭示优化器的恢复路径主导了风险泛函的选择,并且在事前数据上调参会导致对最快轧空的保护崩溃——这对量化风险管理是重要的警示。

适合谁使用

  • 加密货币市场的量化交易员与风险管理人员
  • 研究尾部风险度量与波动率预测的研究人员
  • 设计日内对冲覆盖层的系统化对冲基金策略师
  • 构建因果验证回测框架的数据科学家

典型使用场景

  • 为加密货币永续合约组合设计日内轧空保护
  • 在包含执行成本的真实回测中比较不同一致性风险度量(CVaR、EVaR等)
  • 评估尾部风险对冲中保护、换手成本与净效用的权衡
  • 测试当罕见事件不在校准窗口内时,滚动调参的陷阱

项目优势

  • 完全因果的下一根K线执行,精确计及交易成本(单边20基点),并公开数据管道
  • 严格的滚动调参实验表明,在普通数据上调参无法为不可见的快速轧空定价切割速度
  • 详细的单个事件保护率(如CVaR对PIEVERSE保护99.4%对比阈值76.5%),且对bootstrap随机种子稳健
  • 明确反驳了扩展方案(曲率过滤、基于流量的方向门控),并附有统计不确定性

使用前须知

  • 仅覆盖三个月窗口与单一交易所(Binance USD-M永续合约),结果可能不适用于其他市场或时期
  • 压力书中的事件是事后条件化的,每个轧空的保护率是单样本案例研究,不是总体估计
  • 对低beta品种使用单位beta的BTC残差化过于粗糙,且未考虑资金费率、价差、冲击成本或清算模型

README 快速开始

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

相关仓库与替代方案

根据分类、Topic 和编程语言匹配的相似项目。

lopopolo
精选
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 与机器学习AI 智能体
2,390
slvDev
精选
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 与机器学习大语言模型
1,960
littledivy
精选
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 与机器学习
1,482