Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Back test result problem

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

    Back test result problem

    If I run a back test of a strategy from Jan 1 2009 to Auguts 31, 2009 the trades happen till March only. When I run the backtest only for April 2009 2 trades happen. Why are the trades of april not being reflected when I run the full set of data from Jan to August when they appear when I run for one month only.

    #2
    What is the exit date of the last trade when you run a full test? If its today, then you have an error and the strategy terminated at the end of march.

    Baruch

    Comment


      #3
      The last date when I run full test is August 31, 2009 and when I run for April only it is April 30.

      Another strange thing happened when I rum from March 3 to May 1 I get trades in April. When I run from March 4 to May 1 I do not get even 1 trade in April.

      I have reloaded the data on 3 machines and it is giving same results. I have tried on version xxxxx.13 and xxxxx.14

      Originally posted by kassaindia View Post
      If I run a back test of a strategy from Jan 1 2009 to Auguts 31, 2009 the trades happen till March only. When I run the backtest only for April 2009 2 trades happen. Why are the trades of april not being reflected when I run the full set of data from Jan to August when they appear when I run for one month only.

      Comment


        #4
        Hello kassaindia,

        What instrument do you backtest?

        If you click the Chart-tab when using 1/1/2009 - 8/31/2009, do you see all requested historical data?
        JasonNinjaTrader Customer Service

        Comment


          #5
          I use eurodollar (6E). I see all the data for the period on the chart
          Originally posted by NinjaTrader_Jason View Post
          Hello kassaindia,

          What instrument do you backtest?

          If you click the Chart-tab when using 1/1/2009 - 8/31/2009, do you see all requested historical data?

          Comment


            #6
            Do you see trade results after March if you apply the SampleMACrossOver strategy on the same data/instrument?

            Do you backtest the 6E 03-09?
            JasonNinjaTrader Customer Service

            Comment


              #7
              So the last trade strarts in march-april and end in august 31? All other trades strart and end on the same day?
              You have a bug and the strategy terminates!! Then Ninja closes the open trade on the termination of a backtest.

              Baruch

              Comment


                #8
                If I apply Sample MA cross over trades are coming

                I back test 6E09-09 with data merged from Jan 1 2009 to this instrument.

                Originally posted by NinjaTrader_Jason View Post
                Do you see trade results after March if you apply the SampleMACrossOver strategy on the same data/instrument?

                Do you backtest the 6E 03-09?

                Comment


                  #9
                  Hello kassaindia,

                  Could you please check if your strategy contains a bug as Baruch mentioned.

                  1) Open NinjaTrader

                  2) From the Control Center -> Tools -> Edit NinjaScript -> Strategy

                  3) Select any strategy and double click on it.

                  4) A new window will appear and you will need to right click and select 'Compile'. All(!) NinjaScript files will now be compiled.

                  5) At the bottom of the window a new section will appear were you can find the error locations. Double click the error and you will be directed to the location of the error. If not, all files compiled successful.

                  6) From there you have the option to debug it. You can find general debug information at the link below.


                  Baruch, thank you for your input!
                  JasonNinjaTrader Customer Service

                  Comment


                    #10
                    But can a strategy run without it being compiled? When we make a strategy we compile it and it is debugged then if errors come. Else it says strategy generated successfully. Is this correct or I must recompile it again ?

                    Originally posted by NinjaTrader_Jason View Post
                    Hello kassaindia,

                    Could you please check if your strategy contains a bug as Baruch mentioned.

                    1) Open NinjaTrader

                    2) From the Control Center -> Tools -> Edit NinjaScript -> Strategy

                    3) Select any strategy and double click on it.

                    4) A new window will appear and you will need to right click and select 'Compile'. All(!) NinjaScript files will now be compiled.

                    5) At the bottom of the window a new section will appear were you can find the error locations. Double click the error and you will be directed to the location of the error. If not, all files compiled successful.

                    6) From there you have the option to debug it. You can find general debug information at the link below.


                    Baruch, thank you for your input!

                    Comment


                      #11
                      Yes, it will need to be compiled first. Could you please try and check if the strategy contains a bug. Perhaps the strategy code was modified in between.
                      JasonNinjaTrader Customer Service

                      Comment


                        #12
                        I have recompiled it; it shows strategy successfully generated ; error still persists.

                        Originally posted by NinjaTrader_Jason View Post
                        Yes, it will need to be compiled first. Could you please try and check if the strategy contains a bug. Perhaps the strategy code was modified in between.

                        Comment


                          #13
                          If it behaves as I stated, then you have a logical error, not a compilation error. To find it you need to debug it with Visual Studio.

                          Baruch

                          Comment


                            #14
                            Will try to do that. Could there be any other reason ?
                            Originally posted by Baruch View Post
                            If it behaves as I stated, then you have a logical error, not a compilation error. To find it you need to debug it with Visual Studio.

                            Baruch

                            Comment


                              #15
                              Unfortunately I do not see any other reason. The SampleMACrossOver works on the same data set, so the issue must be related to your strategy.
                              JasonNinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by bortz, 11-06-2023, 08:04 AM
                              47 responses
                              1,610 views
                              0 likes
                              Last Post aligator  
                              Started by jaybedreamin, Today, 05:56 PM
                              0 responses
                              9 views
                              0 likes
                              Last Post jaybedreamin  
                              Started by DJ888, 04-16-2024, 06:09 PM
                              6 responses
                              19 views
                              0 likes
                              Last Post DJ888
                              by DJ888
                               
                              Started by Jon17, Today, 04:33 PM
                              0 responses
                              6 views
                              0 likes
                              Last Post Jon17
                              by Jon17
                               
                              Started by Javierw.ok, Today, 04:12 PM
                              0 responses
                              16 views
                              0 likes
                              Last Post Javierw.ok  
                              Working...
                              X