Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

live (sim) versus backtest

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    live (sim) versus backtest

    Yesterday I had a strategy running in sim the whole day on different instruments, using live IB as datafeed. The executions were recorded and at the end of the day they were saved in a file. The reason is that I wanted to compare today these executions with the executions in the backtest including yesterday.

    That is what I did this morning but I made another observation.
    Some trades executed yesterday in sim on live data in real time were not the same as the trades in the backtest.
    The results are the following

    Number of trades
    Dax........... sim 7 backtest 5
    Euro(6E)..... sim 5 backtest 3
    ER2............ sim 2 backtest 1
    NQ............. sim 2 backtest 4
    GBL.............sim 2 backtest 0
    All trades were executed at bar close.

    Does anybody have the same experience- also live trades versus backtest- or can offer an explanation fot this phenomenon.

    #2
    This comparing apples to oranges for many reasons -

    - Bars built from real-time data may be different than historical data loaded from IB's servers (or any other server for that matter)
    - Limit orders execute differently in real-time than in backtest
    - Backtest always run CalculateOnBarClose == true even if set false in which it runs tick by tick in real-time
    RayNinjaTrader Customer Service

    Comment


      #3
      We have so much documentation even I sometimes forget what we have...

      Here is a more detailed explanation.

      RayNinjaTrader Customer Service

      Comment


        #4
        Ray,
        Thanks for the fast answer.
        I had my computer running all day yesterday, and this pricedata is stored at my computer. So I suppose that the pricedata for the backtest is the same.

        I do not use limitorders, just mar****rders.

        The question is : how can I get as near as possible to reality testing a strategy.

        Comment


          #5
          Your question is a one which has been debated for years!
          RayNinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Max238, Today, 01:28 AM
          1 response
          22 views
          0 likes
          Last Post CactusMan  
          Started by giulyko00, Yesterday, 12:03 PM
          2 responses
          10 views
          0 likes
          Last Post giulyko00  
          Started by r68cervera, Today, 05:29 AM
          0 responses
          4 views
          0 likes
          Last Post r68cervera  
          Started by geddyisodin, Today, 05:20 AM
          0 responses
          6 views
          0 likes
          Last Post geddyisodin  
          Started by JonesJoker, 04-22-2024, 12:23 PM
          6 responses
          38 views
          0 likes
          Last Post JonesJoker  
          Working...
          X