Backtest Tool (ideally in Python) that takes Bid/Ask tick level data as input for Scalping

Discussion in 'Automated Trading' started by Sdoofy, Nov 11, 2020.

  1. Sdoofy

    Sdoofy

    Hello Elite Traders,
    Some of you have rightfully mentioned the need to use BID/ASK at tick level in order to get more realistic backtests when scalping at high frequency.
    That is very much what I am trying to do but couldn t fin any backtest tools (ideally in Python) that would take this type of data as input.
    Perhaps I have been looking in the wrong places and I was wondering whether you could point me in the right direction?
     
  2. lvca

    lvca

    Arcade Trader works at tick level (it's free with the basic plan, but if you do a lot of backtesting you'd need a premium plan or pay for the tokens).

    I personally use Javascript with Arcade Trader just because it's easier for me, but Python is supported. For scalping you absolutely need tick level, otherwise, you end like me 2y ago when my backtesting at the minute level was great and I start losing a lot of money with live trading.

    Sometimes I replay my live trading days with Arcade Trader backtesting at tick level and I have to say the results are 99% the same as live trading.
     
    Sdoofy likes this.
  3. There are a few places:
    quantterminal, quantconnect, quantiacs, quantopian.

    They all have plenty of datasets available to test your algos.

    For scalping, bear in mind that you need a broker that offers a small spread, the smaller the better.
    If you are going to develop your own script in Python add a wide spread to Bid and Ask prices so you can be sure that your algo is efficient in any environment.
     
    Sdoofy and Bad_Badness like this.
  4. 931

    931

    What instrument has so low spread that you would need under 1 sec data?

    +bid-ask tick data takes serious memory, especially if using multiple instruments.

    Used bid-ask data in my project but later rewrote backtester to use mid-price + avg spread table genetated using bid-ask tick data instead.Basically its table of weekdays and daytimes to shift midprice using historical avg spreads.

    Takes ~50% less memory while providing similar backtests to full bid-ask data.
     
    Last edited: Nov 11, 2020
    Sdoofy, traider and fan27 like this.