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!


1 Answer 1


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.

  • $\begingroup$ If you could elaborate just a bit on the very last point--assume filled at bar close vs. next bar open--I would appreciate it. This wouldn't apply to crypto, though, would it? (btw, excellent answer. much more than I anticipated. thank you so much.) $\endgroup$
    – jackRoark
    Commented Apr 21, 2023 at 19:51
  • $\begingroup$ @jackRoark For the last point, usually the strategy makes decision on bar close and generate an order. What's the price for that order? You can use current bar close price but what if the next bar opens with a gap (open price of the next bar could be higher or lower)?Then your backtest assumes you got filled but in reality you would not. Taking this situations into consideration is important when you are backtesting illiquid assets or strong directional moves (there's more possibility for gap). $\endgroup$
    – quantinho
    Commented Apr 24, 2023 at 0:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.