What causes difference between simulated trades vs. real executed trades?

Discussion in 'Automated Trading' started by RStrauss, Apr 26, 2024.

  1. RStrauss

    RStrauss

    Fellow traders,

    I have been trying to get an automated trading strategy to work. One of the many challenges I face is that simulated trades may often times differ from trades that are actually executed, in two main aspects:

    1. Simulated trade appears but no actual trade was executed, vice versa (about 5-10% of my trades are like this)

    2. Entry and exit price between simulated trade vs. executed trade is different (i.e. slippage)

    The closer the executed trades are to simulated trades (when re-run using historical data), the more confidence should one have in the backtesting result.

    Do you agree/disagree? Do you share similar challenges? And how do you go about fixing those?

    Thank you.
     
    murray t turtle likes this.
  2. murray t turtle and RStrauss like this.
  3. schizo

    schizo

    I don't quite understand. Are these simulated trades referring to the backtest or paper trades (forward test)? If you're using a backtest, how are you comparing it to the actual trades? Are you referring to the printed quotes?

    In a simulation, I think it's safe to assume that your order is the last one in the queue. Unless the market moves beyond your order price, pretend that it didn't get filled.

    Slippage should be considered for all your trades when simulating. This will obviously give you the worst-case scenario but most realistic outcome. Hence, place your order one tick below the desired price for all your trades.
     
  4. mervyn

    mervyn

    main difference is the fill. sim trade is filled immediately while real trade is in the queue and may not be filled.
     
    murray t turtle and RStrauss like this.
  5. dholliday

    dholliday

    They should average out.
    I believe that Interactive Brokers puts your sim trade on a queue mirroring the real queue. When your sim trade comes up they take the next price/volume of the real queue for your price.
    I have run both real-time and sim (paper trade) at the same time. It averages out. Also, when low liquidity, they can both take a long time to execute (think seconds to hours). If your sim trade fills faster than your live trade you may want to look for a different broker.
    If by sim trade you are using historical data, good luck. When I do back-testing with historical data I use a huge amount for slippage.
    All just my opinion which is subject to change.
     
    RStrauss likes this.
  6. RStrauss

    RStrauss

    I am referring to trades that are simulated real-time and those same trades re-run as historical data.

    I use interactive broker paper trade and I find them acceptable

    got it! tks for the pointers
     
  7. RStrauss

    RStrauss

    yes I find IB paper sim trade quite similar to when done in reality. yup sim trade using historical data assumes position gets filled at the desired price without slippage. i enter position at the open of a candle and I use a fixed TP. the way I account for slippage in real trade is any slippage would eat into my profit, say if the open of a candle is $100 and I would take my profit at $200, if I enter the position at $102 (a $2 slippage), I would still get out of the position at $200 but with a 98$ profit instead of $100.
     
  8. Simulated trading tries to approximate the real life situation.
    But it may fall short.
    I remember having dreams (or better nightmares) of one trading strategy from years ago.
    I probably had margin maintenance calls.
    The dreams involved me going feet first into a woodchipper.
    True story.
    Paper trading is not real trading. Not close.
     
    murray t turtle and RStrauss like this.
  9. RStrauss

    RStrauss

    what's the percentage of match (sim vs real) in your trading setup?
     
  10. Overnight

    Overnight

    Simulated trades using real market data will always be more accurate than historical data.

    Historical data does not record the B/A point at each moment.
     
    #10     Apr 27, 2024
    murray t turtle and RStrauss like this.