• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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.

      http://www.ninjatrader-support.com/H...sBacktest.html
      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 marketorders.

        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 stalt, Today, 07:52 AM
          5 responses
          14 views
          0 likes
          Last Post NinjaTrader_PatrickG  
          Started by im197, 07-30-2019, 12:29 PM
          2 responses
          10 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by 7robert, Today, 08:20 AM
          1 response
          8 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by GARZONJ, Today, 08:06 AM
          1 response
          6 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by MarianApalaghiei, Today, 01:26 AM
          1 response
          18 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Working...
          X