Using Bid&Ask Prices vs Only Mid-Price in Backtest

Discussion in 'Strategy Building' started by fintrabuji, Jul 1, 2015.

  1. Hi everyone,

    Just looking for input and recommendations on the topic of using bid&ask prices time series vs mid-price time series. I have written code that outputs signals from both bid&ask time series, however rarely there are differences between the two (signals from bid and signals from ask). The first problem that came to me was that I am not going to see the effect of the spread, although I am not sure.

    Should I just use the midprice time series?

    Would the outcome differ drastically if I used midprices instead of both bid&ask?

    Which time series do your backtesters use?

    Would it be effective if I used midprice series for signal generation, but bid&ask series for calculating portfolio value and returns?

    Note: I am testing strategies that hold positions in the interval of a couple hours to a few weeks, so not high frequency intraday.

    Any comment, recommendation is appreciated. Good luck to you all.
     
  2. Why even bother with bid/ask ? Why not use the actual prints ? For your holding period, I don't think bid/ask makes any sense. For someone who's algo trades for seconds or minutes, then maybe....
    The more important question is what type and what level of aggregation are you going to employe...i.e. 1 minute bars, 10 minute bars, 100 tick bars, 1000 tick bars, etc.
     
  3. mid price may represent an unrealistic value that is not traded, while bid/ask may represent values that are not indicative of the current traded market. consider using last traded price.
     
  4. with your indicated holding periods it should not matter whether you compute your signals off mid prices or bid/offer. Hence, I would just use mid prices because it is computationally more efficient unless your backtest streams bids and offers anyway. But even then you won't see much difference, I reckon, in system results, whether you use bids/offers or mid prices.

     
  5. Thank you for the answer. What do you mean by "actual prints"? I am doing multiple time frame analysis with 15-min, 1-hour, 4-hour bars, but may move down to 5-min,15-min,1-hour combination in the future.
     
  6. I am going to use midprice for only signal generation. For portfolio valuation and execution of orders, I am going to use bid&ask series with slippage taken into account.

    As a followup to your recommendation for "last traded price"; is the last traded price series the same as tick data series in FX or time&sales data in equities? If they are, I might use manipulated last traded price series for both signal generation, portfolio valuation and execution purposes.

    Thank you.
     
  7. They were rarely differences in signals where one of ask and bid signaled to buy/sell but the other didn't, thus made me anxious if the difference was drastic. If you would answer this I would be grateful: When would using midprices cause significant differences in the results? For holding positions less than 5 minutes? Thanks for the help.
     
    Last edited: Jul 2, 2015
  8. There is no hard coded answer because it depends on how wide the spread is and it will affect you even if your holding period is years but the effect will be minimal relative to where the majority of pnl is generated. The reason is that the timing of signal trigger will be different as function of the price you input, at least in the way you described it. The higher your trading frequency and the shorter your holding periods the more sensitive your pnl will become as function of input pricing.

     
    fintrabuji likes this.
  9. One thing you did not mention: Your trading platform has your model buying at the Ask and selling at the Bid, correct ? You are using at-market or stop orders ?
     
  10. I want to use at-market orders, so I incorporated slippage as best as I can to the execution model.
     
    #10     Jul 2, 2015