Historical derivatives data research guide · By CoinNudge Research · · Guide updated 2026-10-03 · 16 min read
How to join historical funding rates and open interest for backtesting
Join historical funding rates and open interest by exact contract, using the latest eligible OI observation at or before each decision—not a nearest timestamp that can select the future. In our August 2026 audit of 24 Binance perpetual contracts, exact timestamp equality matched 1,200 of 2,232 settlements; backward joins within five minutes matched all 2,232. However, these backfilled records do not establish historical local availability. The result validates a retrospective join, not a tradable funding/OI signal.
Inspect join evidence · Explore data coverage
How do historical funding and open-interest joins affect usable backtest data?
- 2,232 settlements and 214,272 expected five-minute OI slots were checked across a complete calendar month.
- 1,032 exact joins failed because timestamps differed by milliseconds, not because those OI slots were absent.
- Assumed publication delays change the eligible OI observation: a five-minute tolerance passes only 1,200 settlements in the delay stress cases.
- Historical reconstruction, source-public availability and locally observed point-in-time replay are different research claims.
How do I merge funding rates and open interest without look-ahead bias?
Choose the decision clock first. For every exchange and contract, select the latest completed OI observation whose required availability time is no later than the decision. Apply an explicit age limit, retain failures with reasons, and then attach the correct funding record. A backward as-of join solves chronological matching; it does not, by itself, prove that a value had been published or received.
The hypothesis tested here is narrower than profitability: does exact timestamp equality unnecessarily discard usable retrospective pairs, and does that conclusion survive a publication-delay assumption? We freeze a full calendar month and report every retained contract rather than selecting attractive trades. Predictive performance, funding arbitrage and executable P&L are outside this experiment.
| Join choice | What happens | Buyer decision |
|---|---|---|
| Exact timestamp equality | 1,200 / 2,232 settlements match | Too strict for this retrospective cohort |
| Backward as-of; age ≤300 seconds | 2,232 / 2,232 match without a publication delay | Useful historical alignment; availability remains unproven |
| Nearest timestamp | Can select a later observation | Do not use as a default predictive-feature join |
| Local-as-known replay | 0 pairs proven locally known at the historical settlement | Do not advertise these backfills as contemporary local snapshots |
Verify: Download settlement join diagnostics · Backward as-of merge semantics
Which contracts, dates and historical data did we actually test?
The primary window is August 1–31, 2026 UTC: start inclusive, September 1 exclusive. It includes all 24 Binance USD-M perpetual contracts in the frozen funding/OI archive cohort, not every contract Binance listed at that time. A preceding-day OI buffer supports backward joins near the first settlement. File paths and SHA-256 checksums were frozen before aggregation.
The contracts are AAVE, ADA, ARB, ATOM, AVAX, BCH, BNB, BTC, DOGE, DOT, ETC, ETH, FIL, INJ, LINK, LTC, NEAR, OP, SOL, SUI, TRX, UNI, XLM and XRP, all USDT perpetuals. Each has 93 settled funding records and 8,928 five-minute OI slots. That is 2,232 settlements and 214,272 OI slots overall, with zero missing grid slots, off-grid times or duplicate OI rows in this cohort.
Identical per-contract results are summarized once below; the complete 24-row contract file remains downloadable. This avoids presenting repeated values as additional findings. A current archive cohort can exclude older delisted contracts, so this month cannot establish survivorship-free coverage of the entire exchange.
| Audit unit | Per contract | All 24 contracts |
|---|---|---|
| Settled funding records | 93 | 2,232 |
| Expected / present five-minute OI slots | 8,928 / 8,928 | 214,272 / 214,272 |
| Exact timestamp joins | 50 / 93 | 1,200 / 2,232 |
| Backward joins within 300s, zero assumed delay | 93 / 93 | 2,232 / 2,232 |
| Missing / duplicate OI slots | 0 / 0 | 0 / 0 |
Verify: Full contract-by-contract audit · Source files, cohort and aggregate evidence
Which funding-rate and OI units should a backtest preserve?
Keep native and normalized fields together. A funding fraction of 0.0001 is 0.01%, not 0.0001%; a settled rate applies to a particular settlement, not continuously to any arbitrary holding period. Do not assume that every symbol always settles every eight hours. Contract schedules can change, and an interval-aware join must use the source's actual settlement records.
OI quantity and OI notional answer different questions. For a linear BTC contract, a BTC quantity increase describes additional outstanding exposure; USDT notional can also increase simply because BTC's price rose. Positive funding does not identify a buyer, and increasing OI does not reveal whether longs or shorts will win. Both sides exist for every open contract.
| Field contract | Required distinction | Common false inference |
|---|---|---|
| Instrument | Venue + exact contract + spot/perpetual + quote/margin asset | BTC tickers identify interchangeable markets |
| Funding | Fraction, settlement time, applicable native interval | Hourly normalized rate is actual paid funding |
| Open interest | Native quantity and separately valued notional | Higher dollar OI necessarily means new contracts |
| Event / observed / revision time | Market clock, local receipt and version availability | An old event timestamp proves an old local observation |
| Missingness | Absent, stale, invalid and valid zero separately | Missing OI or funding means zero exposure or cost |
Verify: Binance public historical formats · Funding settlement history fields
Why did exact funding/OI joins lose 46.2% of settlements?
Of 2,232 settlements, 1,032 did not equal the five-minute OI timestamp exactly. Their latest eligible OI point was only 1–26 milliseconds earlier. All 24 contracts share the same 50/93 exact-match pattern, suggesting a common timestamp alignment issue in this selected source window, not evidence that 24 separate markets were missing data.
A retrospective backward join recovers those pairs without selecting a future OI row. The gain from 53.8% to 100% is a join-coverage result, not an improvement in strategy returns. Rounding all timestamps down could hide the same problem and accidentally merge other records; preserving native precision and publishing the selected row age is more auditable.
The original three-row BTC example remains useful for arithmetic: OI at 15:55 and 16:00 on August 31 rose from 107,211.911 to 107,256.046 BTC, or 0.04117%. It is not a representative trading outcome. The expanded cohort tests alignment separately from that selected numerical illustration.
Verify: Original three-row arithmetic example · Expanded settlement evidence
What changes if OI becomes available 60 or 300 seconds later?
An assumed 60- or 300-second OI publication delay changes which observation is eligible before a funding settlement. In this frozen August 2026 Binance audit, either stress case retains 1,200 of 2,232 settlements at a literal 300-second maximum age; these are hypothetical availability assumptions, not measured historical exchange latency. The join selects the latest OI no later than settlement time minus the assumed delay.
In both delay scenarios, the selected row ages are 300.000–300.026 seconds. A literal ≤300-second tolerance therefore admits 1,200 pairs, while a ≤900-second tolerance admits all 2,232. The identical 60/300 results follow from five-minute sampling; they do not show that publication latency is irrelevant.
Do not choose 900 seconds merely because it maximizes retention. Decide before seeing strategy returns how old an input your task can tolerate, record precision effects, and test sensitivity. A longer permitted age does not establish source-public or local availability, and a delayed final funding result still cannot be an earlier predictor.
| Assumed OI publication delay | Pairs with OI age ≤300s | Pairs with OI age ≤900s |
|---|---|---|
| 0s retrospective baseline | 2,232 / 2,232 | 2,232 / 2,232 |
| 60s hypothetical stress | 1,200 / 2,232 | 2,232 / 2,232 |
| 300s hypothetical stress | 1,200 / 2,232 | 2,232 / 2,232 |
How do I implement a reproducible funding and OI join?
Partition by venue and exact contract. Preserve numeric timestamp precision, sort ascending on the merge clock, and resolve duplicates according to an explicit version policy. In pandas, use merge_asof with direction='backward', a declared tolerance and contract grouping; verify sorting on the actual time key, not merely a symbol-first sort. Avoid nearest or forward matching for historical input features.
Availability filtering must happen before choosing the latest eligible version. Filtering only after a match can wrongly discard an observation when an older eligible version exists. If you have no authentic publication or receipt clock, label the result retrospective and run explicit delay assumptions rather than manufacturing a timestamp.
Acceptance check: the frozen zero-delay contract cohort should produce 2,232 retained joins, 1,200 exact matches and no negative selected age. A different count means the cohort, precision, ordering or maximum-age policy differs. Stop the feature pipeline, inspect a failing settlement and its eligible OI candidates, and reconcile the rule before adding returns; do not tune the tolerance to obtain a preferred strategy result.
| Step | Required operation | Keep in audit output |
|---|---|---|
| 1 · Freeze | Contract cohort, source file hash, period and decision policy | Version and expected observation count |
| 2 · Validate | Units, native interval, duplicates and completed observation | Exclusion reason rather than silent deletion |
| 3 · Make eligible | Event completed and required availability ≤ decision time | Which availability clock was actually supported |
| 4 · Match backward | Latest eligible OI within declared maximum age | Matched OI time and age |
| 5 · Retain failures | Missing, stale, availability unknown or revision rejected | Denominator before and after filtering |
| 6 · Add outcomes later | Future returns and realized costs outside predictor columns | No forward value in feature selection |
Verify: Public Python diagnostic reproducer · Audit field dictionary
Can I use hourly OI, forward-fill gaps or download more than 30 days?
Hourly OI is the last eligible exposure observation before the hourly decision, not the sum of twelve five-minute OI values; any fill must retain its age and missingness flag. Longer history is a separate coverage question: Binance's recent OI statistics endpoint and downloadable historical archives have different scopes. Check the exact contract-by-date file inventory instead of promising years from the recent endpoint alone.
For five-minute-to-hourly features, require a completed observation under the declared availability clock, select backward, and reject it once its age exceeds the pre-set limit. OI is a stock of open exposure. Funding cash flows, by contrast, aggregate actual held settlements. Preserve bar-open/bar-close conventions so an hourly price bar does not silently select a later OI row.
Forward-filling a missing OI point can be acceptable for a declared slow context feature within a pre-set age limit. It is not evidence of unchanged true exposure. Do not interpolate missing settled funding costs as zero; carry a missing-cost flag or exclude affected P&L observations under a documented rule.
Verify: Binance recent OI statistics scope · Historical archive coverage
How should funding costs and OI signals enter the same experiment?
Use two separate clocks: information available at entry and realized costs after entry. A final settlement can legitimately become a later expense label even when it could not have been an entry feature. For each held settlement, signed cost depends on direction, applicable notional and the actual rate; add fees, slippage and any separate borrow cost without confusing them with funding.
For illustration only, $10,000 notional at a positive 0.01% settlement costs a long $1 and pays a short $1 before other costs. With $500 margin and 20× leverage, that is still a $10,000 notional calculation, not a $500 one. The example is arithmetic, not a recommended position or measured strategy return.
A credible extreme-funding/rising-OI study then needs prior-data thresholds, same-contract comparison periods, volatility and market-state controls, out-of-sample evaluation, overlapping-window treatment and cost sensitivity. The present alignment audit establishes none of those performance results.
Verify: Historical funding cost calculations · Extreme funding and rising OI research
What can I independently reproduce before buying the full data?
Download funding.json, funding-diagnostics.csv and the other two study JSON/diagnostic pairs together with reproduce.py; run python reproduce.py in their directory, or python3 reproduce.py if Python 3 is installed under that command. The standard-library script independently recomputes joins, ages and eligibility counts from the exported diagnostics. The manifest pins bytes and checksums. Contract summaries and the protocol explain the population and stress assumptions.
These files let you verify published diagnostic arithmetic without purchasing raw derivatives values. They do not independently certify the underlying market prices, funding fractions or OI quantities. For that, obtain the official source files identified in funding.json or an authorized evaluation extract and reconcile native fields, checksums and normalization. No confidence interval is attached to this cohort census; generalization to other months requires additional cohorts.
Verify: Study protocol · Reproduce all three diagnostic studies · Evidence manifest
What historical derivatives delivery should a research team request?
Send the supplier your exchanges, exact contracts including delisted instruments, dates, granularity, required availability clocks and intended use. Request a contract-by-month coverage matrix, native field dictionary, gap reasons, revisions and a small extract containing both successful and failed joins. Agree on file formats, update frequency, permissions and acceptance criteria before payment.
Use this report to define an acceptance test, not to infer that all internal data is for sale. CoinNudge now sells one-time fixed-edition research packs with their own reviewed scope. The study evidence here is unchanged; check the single coverage catalogue and pack sample page before purchasing.
Verify: View exact data coverage and delivery status · Inspect a product sample · Read API authentication and request examples · Compare fixed data plans
Take the next step with this evidence.
Choose ongoing Telegram monitoring or inspect structured data in your own research workflow.
Receive qualifying events in Telegram.
Use the ready-made alert checklist, message explanations and daily briefing. Check the supported categories and coins before subscribing; every Research page is not a separate alert category.
Check the alert list · View alert plans
Inspect the data before choosing a pack.
Prepared research packs supply scoped features, separate outcomes where available and quality flags. Buy a fixed edition once and download directly; API use is optional.
Check data pack samples · Explore the full data catalog · Compare data plans
Each purchased pack includes its specified fields and published date range. This page's full dataset is not automatically included. Other data families require coverage, date, field and source-use confirmation before purchase. Telegram Pro is a separate 30-day service; historical packs are one-time purchases.
Frequently asked questions
What is the best way to join historical funding rates and OI?
Use a backward as-of join by exact exchange and contract after filtering observations by the required availability clock. Keep matched row age and missing reasons. Our retrospective month matched 2,232/2,232 within 300 seconds; that does not prove historical local availability.
Why does an exact timestamp join miss Binance funding and OI rows?
In the tested August 2026 cohort, 1,032 settlements differ from their latest OI timestamp by 1–26 milliseconds. Native precision matters; those mismatches were not missing OI grid slots.
Does Binance provide more than 30 days of historical open interest?
The recent statistics endpoint and historical archive files have different scopes. Check archive availability by contract and date; do not infer multi-year completeness from the recent endpoint.
Is rising OI with positive funding a short signal?
Not by itself. OI records exposure on both sides and funding describes transfers. Directional performance needs an independently timed experiment with comparison periods and trading costs.
Can I use settled funding as a backtest feature?
Only once the result was available under your decision clock. Earlier entries need a contemporaneously captured indicative rate. Final settlements may separately be used as later realized costs.
Should I add five-minute OI values to calculate hourly OI?
No. OI is a stock measure. Select a valid last available observation for the hourly decision and retain its age; do not sum repeated exposure.
Does the 60-second delay scenario measure exchange latency?
No. It is a hypothetical sensitivity assumption. The report does not claim authentic historical publication latency.
Are these diagnostic files the paid historical funding/OI dataset?
No. The frozen public files reproduce audit counts and timing checks, not commercial raw rates or OI quantities. Current one-time research packs are separately scoped fixed editions; check the coverage catalogue, samples and purchase terms rather than assuming this audit unlocks the internal derivatives archive.
Sources and verification
- Frozen 24-contract funding/OI auditCohort, file checksums and complete-month diagnostic results.
- Predefined protocol and exclusionsDecision clocks, stress assumptions and public-data limits.
- Binance public historical dataOfficial archive formats and source files.
- pandas merge_asofBackward join, sorting and tolerance definitions.
Specify the clock, contract and gaps your backtest can tolerate.
Use the public diagnostics to prepare an acceptance test, then confirm the exact historical delivery and permitted use.
Check data coverage and delivery