Do you use trade prices or quote prices to trigger strategies in back testing and live trading?

Discussion in 'Automated Trading' started by pmuvb, Apr 29, 2021.

  1. pmuvb

    pmuvb

    As my question goes, do you use trade prices or quote prices (probably NBBO) to trigger strategies in back testing and live trading and what is the rationale behind your decision?



    I am planning to start the algotrading with using 1-min and daily OHLCV bars to back test my day trading strategies but, well, should it be trades or quotes bars. Is the last trade price a good enough approximation of a price that my trade would be executed? Or I should use NBBO. Comparing to charts, those are showing trades.



    I imagine whatever price you use, quote or trade, the same price you use for back testing and live trading.

    tx
     
    murray t turtle likes this.
  2. guru

    guru

    I doubt many people even have access to 1-min intraday quote data for the past 15+ years, so 99.9% people can't use quote prices by default.
     
    murray t turtle likes this.
  3. dholliday

    dholliday

    Live, I use price to trigger a trade and the bid/ask to guess what price I should/may get.
    Testing, I use price and subtract 0.3% for slippage. It averages out.
     
  4. %%
    About 97% prices /variety of candle charts;
    bid/ask spread may not be accurate @ all sometime i have cancel my own orders....................................................................................... Others do also.
    Mostly true; except for ETFs split + semi liquid stuff ..............................................................
     
  5. pmuvb

    pmuvb

    that's the answers I got on a different forum:

    "if you are taking liquidity, then using best bid/offer is probably best. the last traded price may reflect dark/midpoint trades, but you don't know whether that liquidity is available. also note that if you're just getting last traded price, obviously you need your algo to trade at the ask if you're buying and bid if you're selling, so last traded price will not necessarily be the right price.

    if you are providing liquidity, then you likely want to use traded prices to estimate the probability of your limit order being filled."

    and

    "Run your strategy with different assumptions - do one with quotes, one with NBBO. The most pessimistic one would be fill longs at the minute high and shorts at the minute low. You can then relax assumptions from there."
     
  6. guru

    guru


    Your original question was “do you use trade prices or quote prices”, so most people can’t answer your question because they can’t get years worth of intraday quite data for backtesting. Therefore the answer is “99.9% of people can’t use quotes and therefore don’t use them.”.
    Though there are additional reasons such as quotes don’t tell you the volume, quotes can be manipulated/withdrawn, the accuracy of even the trade data is sometimes so bad that cleaning the invalid trade prices can take years (if you go through flash crashes, outside rth, dark pools, etc), so imagine cleaning the quote data as well. Finally, you won’t see any quotes from dark pools, as well as won’t be able to simulate various pricing algos that play cat and mouse with traders, sometimes just to discover hidden liquidity.
    Anyway, the answer may be a bit different from each person, but ultimately the reasons should be logical and you must be able to perform basic logical exercise (for your specific trading style, goals and strategy) and make such decision.
     
  7. pmuvb

    pmuvb

    I thought I'd use only one year worth of daily and 1-min bars.
     
  8. %%
    Good , even if i get more slippage......................................................................