Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

backtesting vs. forward testing like night vs. day

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

    backtesting vs. forward testing like night vs. day

    Hi,

    I have a strategy coded that seems to lose money in forward testing, but makes money in backtesting. (It works on ES). For instance, in the 11-hour period up to 11:00 am today, forward testing indicates a loss of $845, while backtesting indicates a profit of $1200! In 11 hours!

    Now, I understand that back vs. forward testing might not always give exactly the same results, but this is ridiculous. The fill type is set to 'Liberal' in both cases, and the data feed is the same (OpenTick). So, the fills should theoretically be about the same, but they aren't. I'm beginning to think the backtester is useless for all practical purposes. And no, I don't believe it's my code. Any thoughts, anyone?

    #2
    Here are some -

    RayNinjaTrader Customer Service

    Comment


      #3
      I am experiencing the same thing as Andrew, and have read the link provided. Is it a ninja trader issue that the back testing is done on the OHLC rather than tick by tick, or is a data issue (i.e. esignal data not precise enough)? It seems rather restrictive on the types of back testing strategies we can write that will actually have some use (i.e. trailing stops in backtesting useless)...

      Comment


        #4
        What some people have done in the past is generate there strategy as a multi-time framed strategy using 1tick as one of the time frames. This is a very CPU/memory intensive way of trying to backtest like a forward test and is limited by the amount of tick data you can actually get.

        Other than that, there is no real way NinjaTrader or any other program can backtest more realistically simply because of the resolution limitation of the data available.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Thanks for the quick reply Josh. Next Question. Who has the best data? I have heard the mention of tickdata.com and tradestation. Any ideas?

          cheers
          Mat

          Comment


            #6
            Here is the list of all the supported data providers: http://www.ninjatrader-support.com/H...ricalData.html
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              I have written off NT's backtesting as completely useless for my purposes, since it does not support tick-by-tick testing. I had already written my own backtester anyway, in Java, so I just had to re-code my strategy in Java and use that.

              Comment


                #8
                Curious: Why is NT backtesting useless for your purposes? NT supports tick by tick backtesting.

                Comment


                  #9
                  I don't understand this either, as I have found NinjaTrader's tick-by-tick backtesting to be very useful in developing strategies.

                  The only part of it that I find difficult is this... If I backtest with a tick-based timeframe selected, and when done I switch to a chart to see where the trades occurred, if I then change the timeframe of the chart so I can better visualize what's happened, all the trades go away off the chart. (Please feel free to add this to your list of areas for requested improvements.)

                  But other than that, I find the tick-by-tick backtesting very useful.

                  Comment


                    #10
                    Thanks for the suggestion as always KBJ.
                    Josh P.NinjaTrader Customer Service

                    Comment


                      #11
                      Thanks for that Josh and KBJ, thats an interesting approach.

                      But. Which provider offers enough historical tick data that we can test on? I use eSignal and they only offer 2 weeks of historical tick data... I want atleast 1 years worth.

                      Comment


                        #12
                        I believe OpenTick has a bunch. I am not too familiar with the rest so cannot comment.
                        Josh P.NinjaTrader Customer Service

                        Comment


                          #13
                          Note: 1 tick based testing has to deal with memory issues. 150,000 ticks per day * 220 trading days per year * ~25 bytes per tick gives you an idea about NT mem usage. Unfortunately there is no way around it for now. We'll look into potential optimizations for NT7 (end of this year)

                          Comment


                            #14
                            Originally posted by KBJ View Post
                            The only part of it that I find difficult is this... If I backtest with a tick-based timeframe selected, and when done I switch to a chart to see where the trades occurred, if I then change the timeframe of the chart so I can better visualize what's happened, all the trades go away off the chart. (Please feel free to add this to your list of areas for requested improvements.)
                            What I do is have another chart open with the different time frame. Then enable Global Crosshair on both the Strategy Analyzer chart and the new chart. You can then scroll in the SA chart and the other time frame chart will scroll to that point. This is in NT 6.5.
                            RayNinjaTrader Customer Service

                            Comment


                              #15
                              Using esignal as the data source and using the continuous contract symbols in ninja, i can manage to get about 2 weeks tick data for ES and ER.

                              Using open tick i can manage to get 1 week historical tick data for the ES, and about 2 weeks for the ER.

                              What am i doing wrong? Is this all the tick data that is on offer?

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by rtwave, 04-12-2024, 09:30 AM
                              2 responses
                              19 views
                              0 likes
                              Last Post rtwave
                              by rtwave
                               
                              Started by tsantospinto, 04-12-2024, 07:04 PM
                              5 responses
                              67 views
                              0 likes
                              Last Post tsantospinto  
                              Started by cre8able, Today, 03:20 PM
                              0 responses
                              6 views
                              0 likes
                              Last Post cre8able  
                              Started by Fran888, 02-16-2024, 10:48 AM
                              3 responses
                              49 views
                              0 likes
                              Last Post Sam2515
                              by Sam2515
                               
                              Started by martin70, 03-24-2023, 04:58 AM
                              15 responses
                              115 views
                              0 likes
                              Last Post NinjaTrader_Jesse  
                              Working...
                              X