In my tick feed I get real-time bid and ask prices like below from oanda.

My question is this. Lets assume I build a time series model to buy eur/usd in the Oanda UI manually. If I were to build that time series model do I use bids or asks? If I were to build a backtester do I evaluate on bid or ask? If I sell then do I use the ask series to build a model?

So I posit this assuming I make a 5-minute forecast with a 1-minute rolling window:

  • build a time series model from bids data
  • given the current minute forecast 5 minutes ahead
  • if my models predict to buy because I forecast a 10 pip increase I set e.g. a take profit and a stop loss
  • look at the max high over the future 5 minutes and test if my take profit or stop loss was triggered using the high and low in the OHLC data.

In sum so I build and evaluate models based on bid, ask or test both? Really interested only in what the consensus is for using bid or ask data. Or there some smoothing that's take some weights avg of the two?


    "type": "PRICE",
    "time": "2020-03-09T16:00:00.865263948Z",
    "bids": [{
        "price": "1.14197",
        "liquidity": 10000000
    "asks": [{
        "price": "1.14210",
        "liquidity": 10000000
    "closeoutBid": "1.14197",
    "closeoutAsk": "1.14210",
    "status": "tradeable",
    "tradeable": true,
    "instrument": "EUR_USD",
    "message_counter": 19924,
    "CLOCK": 1583769601.01953

1 Answer 1


Assume that you collect only bid price. For some time period, you may find that bid price does not move while ask price does. In other words, if your purpose is collecting market movement, then by collecing just one of bid or ask would not generate data you want. Perhaps mid price would be better, or micro price to include some bidq and askq information.

For backtest, if you only consider to buy at ask and sell at bid, you can match with them but you need to consider available amount at bidq and askq when lastq changes. However, you should remind that successful backtest does not always perform well in the real market, because there is latency in network or your code is not fast enough to send order before the price changes. Also, it is very hard to backtest market impact generated by your orders.


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.