Skip to content
All library documents

Backtesting BitMEX XBTUSD Perpetuals with Historical Funding Fees

Article FMZ forum · Author: Zero

Summary

The document describes a backtesting feature for BitMEX’s XBTUSD perpetual contract that simulates periodic funding payments using historical funding-rate data. It says the feature is available across JavaScript, C++, and Python, and that event logging can show the simulated fee deductions. The post also mentions support for full-period candlestick construction and explains that a backtest-specific position field reports margin occupied by the position.

The stated scope is narrow: only XBTUSD perpetuals are supported, and the risk mechanism for forced position reduction has not been implemented. The claim that funding simulation reproduces real fee collection is descriptive; the document provides no comparison against live records or backtest results. Researchers should account for the missing reduction mechanism and verify how contract settings, margin reporting, and historical rates are handled before interpreting simulated performance.

Key ideas

  • The backtesting feature simulates periodic XBTUSD perpetual funding payments from historical rates.
  • Event logging can display the simulated funding deductions.
  • The described support covers XBTUSD perpetuals and includes full-period candle construction.
  • Forced position reduction is not implemented, which limits risk-mechanism coverage.
  • The document gives no validation results comparing simulations with live trading.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.