Skip to content
All library documents

Using Another Exchange’s Data to Backtest Crypto Futures

Article Quant Q&A · Author: jackRoark

Summary

The document considers whether historical futures data from one crypto exchange can support backtests for a strategy traded on another. The motivating issue is a change in listed contracts that leaves little history for the replacement market, prompting the trader to consider a more liquid exchange with longer data coverage.

The response says suitability depends on the strategy’s horizon, costs, liquidity, and simulated order fills. Exchange differences may matter more for short bars, thinly traded assets, and strategies with small per-trade returns; longer bars and smoothed indicators may be less sensitive. It also notes that exchange prices can converge through arbitrage, but timing, fees, and liquidity still affect execution. These are qualitative guidelines rather than measured results, and the answer does not provide a procedure for aligning or validating datasets. Backtests should account for the actual trading venue’s fills and costs, especially when signals or expected returns are small.

Key ideas

  • Cross-exchange price differences can affect backtests even when arbitrage tends to close gaps.
  • Data mismatch matters more for short time bars and less liquid assets.
  • Trading fees and liquidity influence how quickly price gaps close and whether they matter.
  • Indicator smoothing and longer holding horizons may reduce sensitivity to small price differences.
  • Backtest fill assumptions can change the number of trades and the resulting performance.

Tags

Full text
# Backtesting on one exchange, while trading on another?


# Backtesting on one exchange, while trading on another?












I've been trading crypto futures on Phemex as it is one of the only few exchanges where I can do that from a U.S. IP address. I have always kept an up-to-date local database with OHLC/kline data from Phemex to run my backtests off of, and subsequently build my algos from.

Recently, however, Phemex began delisting all of its [coin]/USD pairs and adding new [coin]/USDT replacements. Therefore, kline data on the USD pairs has stopped and the data on the USDT pairs only goes back a few weeks. I don't feel that merging the USD price data for the older dates with the new USDT data for the recent dates is going to be an accurate representation of the market.

So I was thinking about building a whole new database with price data from another exchange with enough history and plenty of volume, like say, Binance, to run my backtests with, while continuing to do the actual trading on Phemex. Unlike the arbitrage opportunities from a while back, price differences across exchanges are minimal nowadays.

Is anyone out there trading on an exchange other than the one they backtest on? Any thoughts at all on the pros/cons would be greatly appreciated!

## Answer by quantinho (score 3, accepted)

https://quant.stackexchange.com/a/75279

This is a common issue in crypto and there are a few factors that you should consider. Although there could be a slight difference in price across the exchanges any price gap will be filled by arbitragers. In doing so, there will be a slight delay, a cost (exchanges have different trading fees) and overall liquidity of the exchange. Also, it depends and what kind of backtests you are running. I will explain each in more detail.

Time: let’s your strategy is based on 1 second bar. There will be a huge difference across exchanges, and this will impact your result. For 1 min bar and liquid tokens, the difference will improve but still it could have some impact. Especially, exchanges like Binance usually lead the moves. However, I wouldn’t be worried if my strategy is using 1h bar or 1D bar. That is because the bar size will be large, and the difference percentage will be small.

Cost: Basically, when the exchange has a high trading cost, slight gaps are ignored, and the delays are longer. Generally speaking, let’s say transaction cost is 10bps and filling the gap will earn you less than that, you probably won’t try to achieve that.

Liquidity: There should be enough liquidity otherwise the difference will be large. I have seen tokens that don’t trade for hours in some exchanges will there are few trades in other. Also, the can be an overreaction which can impact the bar size.

Now, the important factor is how you are using the bar data. If you are using it for technical indicators usually there’s some average going on, so those slight differences do not matter.

How frequently do you trade and what is your average win per trade in bps? – If the average win is over 100bps then the bar difference will have few bps impact so the difference shouldn’t matter. But if it is 5-10 bps then I would be worried.

How is the order filling implemented in your backtest engine? - that is if your order’s limit price is current bar close and you assume filled or you assume you get filled at next bar open. Those will have an impact on number of trades.

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

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