Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Backtest produce different results

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

    Backtest produce different results

    Hello,

    I backtested a strategy last month on NT7 on a continuous contract (BRN ##-##) from January 2000 to December 2002. When I ran the same backtest last week, I got drastically different results.

    Could you please give me potential reasons why I got different results?

    Thanks,

    Manuel

    #2
    Hello Manuel17,

    Thank you for your post.

    Continuous contracts merge expired contracts into the current contract, in most cases the historical prices are adjusted to create a seamless transition during rollover. This can create a different in backtesting when you expect to see the same values for the prices, as the price may have changed since the last run over the historical data.

    You could run the strategy backtest twice in a row to see if you get different results without waiting a week. I would also verify what aspects of the results are different; is it the prices or is it the executions and trades themselves.

    Comment


      #3
      But profitability of my strategy is very different and I wonder now if all the time spent on this strategy was useless... If I run it twice in a row the results are the same.

      I repaired the database, do you think that it may have affected the values?

      Comment


        #4
        Originally posted by Manuel17 View Post
        But profitability of my strategy is very different and I wonder now if all the time spent on this strategy was useless... If I run it twice in a row the results are the same.

        I repaired the database, do you think that it may have affected the values?
        What are your "Merge policy" settings?

        Comment


          #5
          Thanks Koganam for your reply. I checked "MergeBackAdjusted"

          Comment


            #6
            Originally posted by Manuel17 View Post
            Thanks Koganam for your reply. I checked "MergeBackAdjusted"
            Try it with NonBackAdjusted. That is more realistic in any case. Especially if you are using ExitOnClose, as NonBackAdjusted reflects real trading prices. In real trading, there is no adjustment: you rollover a contract by disposing of the old one at current price and acquiring the new one at the then current price. The price of the current contract should not have any effect on the prices of trades on any previous contracts.
            Last edited by koganam; 01-22-2016, 12:27 PM.

            Comment


              #7
              Thank you Koganam, I am going to rerun the tests accordingly. Do you recommend the use of continuous contracts?

              Comment


                #8
                Originally posted by Manuel17 View Post
                Thank you Koganam, I am going to rerun the tests accordingly. Do you recommend the use of continuous contracts?
                I just use the contract that is current on the last day of my test. There is merging, so it will go back over earlier contracts. It is just that it will use the prices that prevailed on each trade contract, because there is no adjusting of prices. We cannot roll through contracts if we do not merge, hence why I merge, but do not adjust.

                All the best.

                Comment


                  #9
                  Thank you for your help and tips! It is greaty appreciated.

                  Manuel

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by jclose, Today, 09:37 PM
                  0 responses
                  4 views
                  0 likes
                  Last Post jclose
                  by jclose
                   
                  Started by WeyldFalcon, 08-07-2020, 06:13 AM
                  10 responses
                  1,413 views
                  0 likes
                  Last Post Traderontheroad  
                  Started by firefoxforum12, Today, 08:53 PM
                  0 responses
                  9 views
                  0 likes
                  Last Post firefoxforum12  
                  Started by stafe, Today, 08:34 PM
                  0 responses
                  10 views
                  0 likes
                  Last Post stafe
                  by stafe
                   
                  Started by sastrades, 01-31-2024, 10:19 PM
                  11 responses
                  169 views
                  0 likes
                  Last Post NinjaTrader_Manfred  
                  Working...
                  X