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 kevinenergy, 02-17-2023, 12:42 PM
          117 responses
          2,766 views
          1 like
          Last Post jculp
          by jculp
           
          Started by Mongo, Today, 11:05 AM
          5 responses
          15 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by SightCareAubetter, Today, 12:55 PM
          0 responses
          4 views
          0 likes
          Last Post SightCareAubetter  
          Started by traderqz, Today, 12:06 AM
          8 responses
          16 views
          0 likes
          Last Post traderqz  
          Started by SightCareAubetter, Today, 12:50 PM
          0 responses
          2 views
          0 likes
          Last Post SightCareAubetter  
          Working...
          X