Skip to content
This repository was archived by the owner on Jun 26, 2026. It is now read-only.

Repository files navigation

Sentiment Liquidity Events

Event study framework for analyzing cryptocurrency market liquidity responses to infrastructure vs regulatory events.

Paper

Sentiment Without Structure: Differential Liquidity Response to Infrastructure vs Regulatory Events in Cryptocurrency Markets

Murad Farzulla (2025)

DOI: 10.5281/zenodo.18099609

Key Finding

Infrastructure events (FTX collapse, Terra/UST) produce significantly larger liquidity deterioration than regulatory events (SEC enforcement, China ban). The Corwin-Schultz spread shows +65.1% for infrastructure vs -11.4% for regulatory events (p=0.0009).

Metrics

Metric Source Description
Funding Rate Binance Futures API Perpetual futures funding rate (market stress indicator)
Amihud Illiquidity Computed from OHLCV Price impact per unit volume
Roll Spread Computed from returns Effective spread from return autocorrelation
Corwin-Schultz Spread Computed from high-low Spread estimation from daily price ranges

Installation

pip install -r requirements.txt

Usage

from event_liquidity_analysis import EventLiquidityStudy

# Define events
events = [
    {"name": "FTX Collapse", "date": "2022-11-10", "type": "Infrastructure"},
    {"name": "SEC Binance Suit", "date": "2023-06-05", "type": "Regulatory"},
]

# Run analysis
study = EventLiquidityStudy(symbols=["BTC", "ETH"], event_window=30)
results = study.run_full_event_study(events)
summary = study.generate_summary_statistics(results)

Modules

  • funding_rate_data.py - Binance perpetual futures funding rate collector
  • liquidity_metrics.py - Amihud, Roll, Corwin-Schultz, Kyle's lambda implementations
  • event_liquidity_analysis.py - Full event study framework
  • config.py - Configuration and event definitions

Data Sources

All data from free Binance APIs:

  • Spot: https://api.binance.com/api/v3/klines
  • Futures: https://fapi.binance.com/fapi/v1/fundingRate

Citation

@misc{farzulla2025sentiment,
  author = {Farzulla, Murad},
  title = {Sentiment Without Structure: Differential Liquidity Response to Infrastructure vs Regulatory Events in Cryptocurrency Markets},
  year = {2025},
  doi = {10.5281/zenodo.18099609},
  publisher = {Zenodo}
}

License

MIT License - see LICENSE

About

Infrastructure vs Regulatory Shocks: Asymmetric Volatility Response in Cryptocurrency Markets — event study code companion (DAI-2506)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages