Skip to content

Kaleb0719/funding-timestamp-event-study

Repository files navigation

Binance USD-M Funding Timestamp Event Study

Research only. No live trading. No execution. No orders. No account access. Not financial advice. The observed funding-timestamp effect did not remain stable in larger samples.

TL;DR

A weak positive drift appeared in the initial 30-day sample, but it weakened in the 90-day expansion and turned slightly negative across the main horizons in the 180-day sample. The hypothesis was not robust enough to justify strategy development or deployment.

The value of this project is the validation process: define an event, expand the sample, test stability, and reject a weak result before treating it as an edge.

Table of Contents

1. Project Summary

This repository is a research-only event study of Binance USD-M perpetual funding settlement timestamps. It tests whether short-horizon price behavior around settlement remains stable when an initial 30-day observation is expanded to 90-day and 180-day samples.

The larger samples did not confirm the initial positive drift. This is a negative-result case study, not a trading system, signal service, or claim of profitability.

2. Research Question

Do funding settlement timestamps create stable short-term price distortions in Binance USD-M perpetual markets?

3. Hypothesis

The research hypothesis was that funding settlement could create measurable short-horizon price drift, potentially with stronger effects when absolute funding rates were unusually large.

The hypothesis required stability across longer samples and symbols before it could justify deeper strategy research. That stability was not observed.

4. Dataset

  • Exchange: Binance USD-M perpetuals
  • Symbols: BTCUSDT, ETHUSDT, SOLUSDT
  • Inputs: historical funding rates and 1-minute OHLCV
  • Event: each funding settlement timestamp
  • Event window: 30 minutes before through 30 minutes after settlement
  • Return horizons: 1, 5, 15, and 30 minutes after settlement
Sample Observation window (UTC) Analyzed events Skipped events
30d 2026-04-04 16:00 to 2026-05-04 00:00 267 3
90d 2026-02-03 16:00 to 2026-05-04 08:00 810 0
180d 2025-11-05 16:00 to 2026-05-04 08:00 1,620 0

Large raw OHLCV files and expanded event-window datasets are intentionally excluded from the public package. Compact historical outputs remain under data/outputs/.

5. Methodology

  1. Retrieve and validate public funding-rate and 1-minute kline data.
  2. Align funding settlements to the kline timeline.
  3. Construct event windows from t-30m through t+30m.
  4. Calculate pre- and post-settlement returns.
  5. Group results by symbol, funding direction, and absolute-funding bucket.
  6. Compare the 30-day, 90-day, and 180-day samples.
  7. Publish summary tables, diagnostic charts, and research conclusions.

The code uses public market-data endpoints only. It contains no authenticated exchange access or order submission.

6. Validation Design

The 30-day MVP was treated as a preliminary observation. The same event-study structure was then evaluated over broader 90-day and 180-day windows to test whether the direction and magnitude remained stable.

This is a sample-expansion stability test, not a claim of formal production readiness. A result had to remain directionally coherent, economically meaningful, and plausible after costs before further strategy work could be justified.

7. Results

Sample Events Skipped post_1m_mean post_5m_mean post_15m_mean post_30m_mean Machine label
30d 267 3 0.0234% 0.0288% 0.0008% 0.0189% weak_pattern
90d 810 0 -0.0044% 0.0028% -0.0124% 0.0091% weak_pattern
180d 1,620 0 -0.0054% -0.0084% -0.0228% -0.0057% weak_pattern

The initial positive means did not remain stable:

  • The 90-day result weakened toward zero and mixed signs.
  • The 180-day result was slightly negative across the main post-funding horizons.
  • Extreme-funding groups produced larger magnitudes, but not a consistently favorable direction.
  • The observed means were too small and unstable to support an actionable conclusion.

The full historical comparison is preserved in reports/sample_expansion_final_report.md and data/outputs/sample_expansion_comparison.csv.

8. Why This Was Not Deployed

The funding-timestamp effect failed the sample-stability test. The expanded evidence did not support treating the 30-day observation as a repeatable edge.

The study also does not model transaction costs, bid/ask spread, slippage, order-book behavior, or fill probability. Deploying or promoting a strategy from this evidence would go beyond the research result.

No deployment, account, position-management, or execution capability is included.

9. Lessons Learned

  • A short sample can produce a coherent-looking effect that disappears with more data.
  • Sample expansion is a necessary falsification step, not a confirmation exercise.
  • Statistical direction alone is insufficient when the magnitude is economically small.
  • Extreme-event subgroups require adequate sample sizes and consistent signs.
  • Rejecting an unstable hypothesis is a valid research outcome.

10. Selected Charts

Sample stability comparison

Sample Window Comparison

This diagnostic compares the 30-day, 90-day, and 180-day post-funding means and makes the loss of directional stability visible. It supports rejection, not deployment.

Average event path in the 180-day sample

Average Event Path 180d

This diagnostic shows the average price path around funding settlement in the largest sample. A descriptive average path does not establish a tradable effect.

Post-funding return distribution in the 180-day sample

Post-funding Return Distribution 180d

This figure shows dispersion around the post-funding returns. The distribution highlights why small sample means should not be interpreted as reliable alpha.

Grouped return comparison in the 180-day sample

Grouped Return Comparison 180d

This diagnostic compares funding-direction and extreme-funding groups. Larger subgroup magnitudes were not consistently favorable and do not imply deployable alpha.

11. Reproducibility Scope

Install dependencies:

python -m pip install -r requirements.txt

Run the 30-day research workflow:

python src/main.py

Run the expanded samples:

python src/sample_expansion.py --lookback both

The data-fetching code uses unauthenticated Binance public-market endpoints. Running it can create a new local raw-data cache and regenerated outputs.

Compact historical summaries, reports, and selected charts are included. The exact raw snapshots and expanded event-window datasets used for the archived results are stored outside the public package. Complete byte-for-byte historical regeneration from this repository alone is therefore not claimed. See data/manifests/EXTERNAL_DATA_MANIFEST.md.

No automated test suite is included in this documentation-only release.

12. Repository Structure

  • src/: public-data retrieval, event alignment, event-study calculations, and report generation
  • reports/: 30-day, 90-day, 180-day, and sample-expansion reports
  • charts/: four selected diagnostic figures
  • data/outputs/: compact historical result tables
  • data/processed/: small skipped-event records only
  • data/manifests/: public-package inventory and external-data boundary
  • config.yaml: research scope and path configuration

13. Limitations

  • The study covers only BTCUSDT, ETHUSDT, and SOLUSDT on Binance USD-M.
  • The longest sample spans 180 days, not multiple market cycles.
  • Transaction costs, spread, slippage, order-book behavior, and fill probability are not modeled.
  • Historical final funding rates are used rather than predicted rates before settlement.
  • Extreme-funding groups can have small sample sizes.
  • Raw data and expanded event-window datasets are excluded from the public package.
  • Complete byte-for-byte historical regeneration is not claimed.
  • The findings do not establish a profitable or deployable strategy.

14. Future Research

These are research directions, not strategy promises:

  • Extend the observation window across multiple market regimes.
  • Compare predicted funding before settlement with final funding rates.
  • Add spread and order-book diagnostics around settlement.
  • Test economic significance after realistic transaction costs.
  • Compare settlement behavior across exchanges after the single-exchange design is stable.

License

Code and documentation are provided under the MIT License. This repository remains a research-only educational case study, not financial advice or a trading deployment.

About

Research-only event study testing whether Binance USD-M funding timestamps produce stable short-horizon price effects across 30-, 90-, and 180-day samples.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages