Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

[NT7.0] Portfolio backtesting workaround?

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

    [NT7.0] Portfolio backtesting workaround?

    Hi NT Support and NT users,

    Even though NinjaTrader 7.0 is a great program, and a big improvement over NT 6.5, I find it somewhat disappointing that there is no option to backtest a portfolio of multiple instruments.

    I know that NT7 provides a ‘combined result’, but this is not a ‘true’ portfolio test. For example, the drawdown reported by the ‘combined result’ is just the average drawdown of the instruments. Off course, in a portfolio all the instruments can be in a drawdown in the same time, so the ‘combined result’ paints a more flattering picture than you would experience in real-time trading.

    Because I’m probably not the only one who misses this feature, I’m wondering if there are any ways to work around this limitation, so that a portfolio of instruments can be backtested?

    As I’ve seen on this forum, other users manually make a Excelsheet with all the individual instruments combined (found here: http://www.ninjatrader.com/support/forum/showthread.php?p=150667#post150667) . That is, I’m afraid, also the way I have to go to use a portfolio backtest. If there are other, better ways, please let me know.

    However, even with that workaround, there are two important features missing: a multi instrument optimization and a multi instrument walk-forward.

    For a multi instrument optimization, the only thing I can up with, is to try to write the summary of each optimization of each instrument to an individual file, and then loading this file into Excel (or a statistics package like R or SPSS), and then shifting through this data looking for parameters which work on all the instruments. However, because this work is highly error prone and time intensive, I’m not very happy with this ‘solution’.

    In regards to a multi instrument walk-forward, I honestly have to admit that I have no idea at this point as to how to make this work. Any thoughts would therefore be more than welcome.

    To summarize my post:
    Are there some (supported or unsupported) ways to make the following work in NinjaTrader:
    • A portfolio backtest (instead of a ‘combined result’),
    • A multi instrument optimization,
    • And a multi instrument walk-forward.

    Thanks in advance for any ideas you can provide,


    Regards,

    #2
    Hi,

    is there any progress around porfolio backtesting feature? Absolutely agree to J_o_s. Porfolio backtesting is a must.

    At my point, I'm planning to build a lot of simple strategies for more markets. To get know that everyone of them works independently is meaningless, if I don't know that they should works together. With portfolio backtesting I should avoid problems such a markets correlation, also optimize strategies priority and many many more.

    Thanks

    Comment


      #3
      Thanks for your kind input here and voicing your thoughts, we have this added to our product management feedback list under # 573 - unfortunately at this time I could not provide and ETA or commitment.

      A 'combined results' backtesting summary for instrument list / basket tests is available though for per default in NT7 -

      BertrandNinjaTrader Customer Service

      Comment


        #4
        Hi Bertrand,

        thanks a lot for you informations. I'm using basket tests as much as possible, but combined results is insufficient in this case, but I understand you. I also found this thread http://www.ninjatrader.com/support/f...ad.php?t=39280 describing same problem.

        Wish a good luck with #573.
        Regards

        Comment


          #5
          Even more basic...
          I'd like to see the Strategy Analyzer Trades tab multiply the Quantity X Profit and have all of the other reports based on this. It doesn't make any sense to pretend that the order quantity is always constant.

          For instance, I have 3 price targets with different lot sizes for each target. NT's profit calc is based on Quantity = 1. So, I have to do all of the reporting in xls.

          Also, what about reports based on open trade equity per period? The daily and longer period P&Ls can be misleading otherwise.

          This all seems really basic. I'm surprised that this type of reporting hasn't been part of NT all along.

          Comment


            #6
            bluelou, could you please post a screenshot of what you feel is misreported? I've just checked into my Strategy Analyzer here and see the Trades tab PnL #'s reflect strategy set quantities as expected.

            Could you also please clarify what you would like to see for the 'open trade equity per period' reports, I'll then gladly add to our product enhancement lists.

            Thank you,
            BertrandNinjaTrader Customer Service

            Comment


              #7
              Bertrand,
              I've attached a screenshot. For example, look at trade #121. Quantity = 6 and Profit = 0.21. The problem is that Profit = 0.21 is the profit for 1 lot, not 6. The profit should be 0.21 x 6 (P x Q) = 1.20. Unfortunately, since the quantity is being ignored, most of the Strategy Analyzer report isn't of much use.

              Regarding open trade equity (OTE):
              If you run a strategy and go to the Periods tab with Period = Daily you'll see the "Period" in the first column represents the date that a trade was exited; i.e., realized profit. For OTE, you would see the P&L for every trading day, not just for the days that profits were taken.

              Why is this important? Let's say someone wanted to invest in your strategy. They're going to want to know how the portfolio is expected to behave at all times, not just at those pleasant times when you're taking profits.

              So, now you have two examples of why the Strategy Analyzer reports aren't really used for anything but the most simplistic of strategies.. It takes quite a bit of custom code to turn the NT backtest output into something useful.
              Attached Files
              Last edited by bluelou; 04-18-2012, 09:54 AM.

              Comment


                #8
                Thanks for the clarifications bluelou, will check into matters and get back to you.
                BertrandNinjaTrader Customer Service

                Comment


                  #9
                  Thanks bluelou, appreciate you taking the time to clarify, I've added the enhancement request for Open trade equity reporting as well to our development list (item #1715).

                  For the profit quantity reporting, I was so far unable to reproduce - does your strategy scale in before scaling out, so signal tracking would properly work in the managed order submission mode?

                  If you could forward me an example strategy to run where you see this happen to support that would be great, so we could further investigate and look to enhance.
                  BertrandNinjaTrader Customer Service

                  Comment


                    #10
                    Betrand,
                    No, I don't scale in but I do use the managed order submission mode. Here's how the orders work: from my perspective I have 1 entry and 3 exits. From a coding perspective this is written as 3 entries (but all at the exact same time) and the 3 exits.

                    I'll send some sample code to the support email address.



                    Originally posted by NinjaTrader_Bertrand View Post
                    Thanks bluelou, appreciate you taking the time to clarify, I've added the enhancement request for Open trade equity reporting as well to our development list (item #1715).

                    For the profit quantity reporting, I was so far unable to reproduce - does your strategy scale in before scaling out, so signal tracking would properly work in the managed order submission mode?

                    If you could forward me an example strategy to run where you see this happen to support that would be great, so we could further investigate and look to enhance.

                    Comment


                      #11
                      Thanks bluelou, will check into what you kindly sent in to support.
                      BertrandNinjaTrader Customer Service

                      Comment


                        #12
                        FWIW,
                        The strategy code I sent you is just a simple moving average cross over but the entries and exit order handling logic are what I actually use. It would be great if we could get NT to generate an accurate report using my existing order logic.

                        Thx,
                        Lou

                        Comment


                          #13
                          one more suggestion

                          Hi all

                          Also it would be great to add a grid similar to this screenshot to the portfolio backtesting results.

                          Do you already know if portfolio backtesting will be included in NT8?
                          Thanks
                          Attached Files

                          Comment


                            #14
                            Thanks for the input uncogs, have added it to our tracking lists as well - could unfortunately not provide an ETA or commitment to this item, but it's still tracked as active enhancement request here for our next major platform update, your vote is now in as well.
                            BertrandNinjaTrader Customer Service

                            Comment


                              #15
                              Hi,
                              Is the portfolio backtest considered for NT8? It is a basic function that all other softwares have and I'm sure that a lot of people would want this feature.
                              Thanks

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Perr0Grande, Today, 08:16 PM
                              0 responses
                              2 views
                              0 likes
                              Last Post Perr0Grande  
                              Started by elderan, Today, 08:03 PM
                              0 responses
                              5 views
                              0 likes
                              Last Post elderan
                              by elderan
                               
                              Started by algospoke, Today, 06:40 PM
                              0 responses
                              10 views
                              0 likes
                              Last Post algospoke  
                              Started by maybeimnotrader, Today, 05:46 PM
                              0 responses
                              12 views
                              0 likes
                              Last Post maybeimnotrader  
                              Started by quantismo, Today, 05:13 PM
                              0 responses
                              7 views
                              0 likes
                              Last Post quantismo  
                              Working...
                              X