Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

To Backtest or not to with NT

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

    To Backtest or not to with NT

    Hi,

    First of all I'm a beginner and I apologize if any of the issues that I'm going to address here have been already solved(although I've searched and couldn't find anything regarding this).
    After few weeks spent on backtesting and debugging my strategy(which uses over 400 instruments in one list) I have the feel that Backtest feature in NT is not really a backtesting feature(or at least not in the way other trading software have this feature implemented).
    My frustration comes from not being able to control the Account Size, Position Size, Number of Open Positions(for example I want to have no more than 5 open positions at any one time no matter how many instruments I'm using), the way you reinvest the profits, etc, in other words money management, which means that you don't really design a strategy(or a trading system for that matter) and you don't really do BACKTESTING!!! It's like driving a car(which is the strategy or trading system) on a known road(which is historical data) without having a steering wheel(which is the money management thing!)
    Let me explain:
    - it seems to me that Backtesting assumes that my account has unlimited funds which is absurd!!! not having a finite amount of funds in my backtesting account makes almost impossible to gauge the profitability and money management scenarios of my strategy!
    - when you use a list of instruments(in my case over 400 instruments in one list) the backtesting algorithm looks like starts testing the strategy against each instrument for the time frame tested and then moves to the next instrument (that's probably why Performance.AllTrades.Count resets to 0 after each instrument), which is ,IMHO, totally wrong(and far from real thing). Instead you suppose to start with the first day in your time frame and check the strategy against all the instruments from the list and then move to next day and check it against the same instrument list(or at least that's what other backtesting software does and was expecting to have!)

    It seems to me that NT was designed and looks more suitable for features trading and forex than stocks( you can even see that by reading the help that addresses in most cases the futures and the forex!).
    So, is there any hope in the future to have an upgrade that addresses these issues? Did anybody experience the same issues or I'm the only one(Maybe it's just me!)? And if you did, did you find a workaround?

    Thank you for your patience and for your input,

    Dan

    #2
    Originally posted by drusann View Post
    Hi,

    First of all I'm a beginner and I apologize if any of the issues that I'm going to address here have been already solved(although I've searched and couldn't find anything regarding this).
    After few weeks spent on backtesting and debugging my strategy(which uses over 400 instruments in one list) I have the feel that Backtest feature in NT is not really a backtesting feature(or at least not in the way other trading software have this feature implemented).
    My frustration comes from not being able to control the Account Size, Position Size, Number of Open Positions(for example I want to have no more than 5 open positions at any one time no matter how many instruments I'm using), the way you reinvest the profits, etc, in other words money management, which means that you don't really design a strategy(or a trading system for that matter) and you don't really do BACKTESTING!!! It's like driving a car(which is the strategy or trading system) on a known road(which is historical data) without having a steering wheel(which is the money management thing!)
    Let me explain:
    - it seems to me that Backtesting assumes that my account has unlimited funds which is absurd!!! not having a finite amount of funds in my backtesting account makes almost impossible to gauge the profitability and money management scenarios of my strategy!
    - when you use a list of instruments(in my case over 400 instruments in one list) the backtesting algorithm looks like starts testing the strategy against each instrument for the time frame tested and then moves to the next instrument (that's probably why Performance.AllTrades.Count resets to 0 after each instrument), which is ,IMHO, totally wrong(and far from real thing). Instead you suppose to start with the first day in your time frame and check the strategy against all the instruments from the list and then move to next day and check it against the same instrument list(or at least that's what other backtesting software does and was expecting to have!)

    It seems to me that NT was designed and looks more suitable for features trading and forex than stocks( you can even see that by reading the help that addresses in most cases the futures and the forex!).
    So, is there any hope in the future to have an upgrade that addresses these issues? Did anybody experience the same issues or I'm the only one(Maybe it's just me!)? And if you did, did you find a workaround?

    Thank you for your patience and for your input,

    Dan
    NinjaScript is just a fancy wrapper around C#. There is nothing here that cannot be coded, but yes, you do have to code it.

    Comment


      #3
      Hello drusann,

      Thank you for your post.

      A basket test of instruments (testing an instrument list) will reset the values for each run on a new instrument. If you wish to include each instrument into one test for all values then you can manually add each instrument via your strategy code. For information on multiple instruments and time frames in your code please visit the following link: http://www.ninjatrader.com/support/h...nstruments.htm

      Please let me know if you have any questions.
      Last edited by NinjaTrader_PatrickH; 07-09-2013, 06:33 AM.

      Comment


        #4
        koganam,

        Remember good old days with win32 api and c++? there were not many programmers taking that road, and microsoft didn't sell to many licenses. Few years passes by, microsoft comes with VB and suddenly lots of people start programming(and buying more licenses!). I'm guessing that that business model was more profitable for microsoft. When you have to spend more money on the tools to design the car than building the car itself something is wrong with that business model! Yes, you can rebuild VB using win32 api but at what cost? same thing with NT! if you have to spend more time programming the strategy(indicator) than designing the strategy itself something is wrong! The goal here(IMHO) is to spend more time on designing, backtesting and then going live with a winning strategy and not programming the strategy. You might know how to program the strategy but if the strategy doesn't make you any money who cares how good of a programmer you are?

        Comment


          #5
          Hello NinjaTrader_PatrickH,

          The point was the backtesting feature and not multi-frame nor multiple instruments.Although I consider myself a beginner I have a good amount of hours spent on this issue(multi-time frame and instruments) and the reference to Performance.AllTrades.Count might be a hint for you that I spent some hours on this issue. I don't want to sound mean but the bottom line is you didn't address any of my issues. Just because you referenced a help item doesn't mean you offered help. I don't see any connection between your suggested reading and the issues raised in my post. Could you please read my post again and if you have an answer please post it(but please don't send me again another link to some help guide items).

          Thank you in advance,

          Dan

          Comment


            #6
            Hello Dan,

            Thank you for your response.

            I will try to detail this further for you here. You run your test on a basket of instruments (a list of instruments). Each run on an instrument the Performance values are reset to start anew on that instrument.

            So this would technically be considered multiple instruments. Thus, a suitable work around for your concern/inquiry would be to add the instruments you test into the strategy. This would allow for the Performance items to be accessed for all instruments in the strategy within one run of the strategy.

            You can view an example of multiple instruments in a strategy by going to Tools > Edit NinjaScript > Strategy > SampleMultiInstrument > OK.

            Please let me know if I may be of further assistance.

            Comment


              #7
              Originally posted by drusann View Post
              koganam,

              Remember good old days with win32 api and c++? there were not many programmers taking that road, and microsoft didn't sell to many licenses. Few years passes by, microsoft comes with VB and suddenly lots of people start programming(and buying more licenses!). I'm guessing that that business model was more profitable for microsoft. When you have to spend more money on the tools to design the car than building the car itself something is wrong with that business model! Yes, you can rebuild VB using win32 api but at what cost? same thing with NT! if you have to spend more time programming the strategy(indicator) than designing the strategy itself something is wrong! The goal here(IMHO) is to spend more time on designing, backtesting and then going live with a winning strategy and not programming the strategy. You might know how to program the strategy but if the strategy doesn't make you any money who cares how good of a programmer you are?
              Ah, the awful days of generic.c?

              Well, better tools may make it easier, but one still has to do the programming regardless, and IMHO NT does a very good job of providing a wrapper around C# that gets the job done. Unfortunately, even frameworks have limitations, simply because there is no framework that can satisfy all conditions. Even, if there were, it would be so unwieldy as to be nearly impossible to use in its entirety.

              All programming, and writing an NT strategy is no different, is:

              Design; code; test run; observe/analyze; refine/correct, either or both of design, and code.

              Wash, rinse, repeat.
              C# may make the job easier, but if you want the power, then you have to use the power.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by ScottWalsh, Today, 06:52 PM
              3 responses
              19 views
              0 likes
              Last Post NinjaTrader_Manfred  
              Started by trilliantrader, Today, 03:01 PM
              2 responses
              18 views
              0 likes
              Last Post helpwanted  
              Started by cre8able, Today, 07:24 PM
              0 responses
              1 view
              0 likes
              Last Post cre8able  
              Started by Haiasi, Today, 06:53 PM
              1 response
              4 views
              0 likes
              Last Post NinjaTrader_Manfred  
              Started by ScottW, Today, 06:09 PM
              1 response
              7 views
              0 likes
              Last Post NinjaTrader_Manfred  
              Working...
              X