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

Portfolio Testing

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

    Portfolio Testing

    Hi Guys,

    I have some questions about the strategy analyzer, basket testing function.

    I envision using this to analyzer the P&L curve of the system as a whole on a basket of instruments, as well as calculate the position size according to the account size on a day by day basis.

    For analyzing the P&L curve of the system on the whole, I assume the Combined Results Instrument created will give me this information.

    For the position sizing, I don't believe I can do that with the basic supported methods. Can you tell me how the Combined Results instrument is created?

    I suspect the strategy is ran on day 0 for all instruments, then day 1 for all instruments, etc.

    Thanks,
    Anthony
    mrlogik
    NinjaTrader Ecosystem Vendor - Purelogik Trading

    #2
    Hello,

    Sure no problem.

    Your in uncharted territory here on this item. As NinjaScript strategies are designed to be there own separate black box which has no communication between other running strategies, either live or in backtest.

    May be possible however I really don't have any supported or unsupported tricks to give you hear on this other then doing 1 script with multi series and add in all the BarsInProgress's for the other instruments then you would be able to track a strategy wide performance variable here then.

    -Brett

    Comment


      #3
      Hi Brett,

      Thanks for the reply.

      I intended to do some global variable design with classes and such, which I understand is all unsupported.

      Do you know anything about the process of the basket trading on an architecture level? Can you let me know which of the following is done, assuming three days of test data?


      A.
      - Test instrument 1 day 1
      - Test instrument 2 day 1
      - Test instrument 3 day 1

      - Test instrument 1 day 2
      - Test instrument 2 day 2
      - Test instrument 3 day 2

      - Test instrument 1 day 3
      - Test instrument 2 day 3
      - Test instrument 3 day 3

      B.

      - Test instrument 1 day 1
      - Test instrument 1 day 2
      - Test instrument 1 day 3

      - Test instrument 2 day 1
      - Test instrument 2 day 2
      - Test instrument 2 day 3

      - Test instrument 3 day 1
      - Test instrument 3 day 2
      - Test instrument 3 day 3

      Thanks again!
      Anthony
      mrlogik
      NinjaTrader Ecosystem Vendor - Purelogik Trading

      Comment


        #4
        Hello,

        I would not know on the internal operation. I have asked my product manager to see if he knows and will let you know.

        Comment


          #5
          Great! Thank you.

          Looking forward to hearing from you.
          mrlogik
          NinjaTrader Ecosystem Vendor - Purelogik Trading

          Comment


            #6
            Hello,

            We believe it is A is how it runs, however to verify this add Print(Time[0]) to a script you optimize and then see the sequence of times stamps to confirm this is the case on your PC.

            I look forward to assisting you further.

            Comment


              #7
              Thanks Brett.

              I'll try the method you described to verify.
              mrlogik
              NinjaTrader Ecosystem Vendor - Purelogik Trading

              Comment


                #8
                Hi Brett,

                I created a basic strategy that only prints the date on a date change. This was the result of basket testing two instruments.

                Instrument = $EURJPY Date = Monday, August 01, 2011
                Instrument = $EURJPY Date = Tuesday, August 02, 2011
                Instrument = $EURJPY Date = Wednesday, August 03, 2011
                Instrument = $EURJPY Date = Thursday, August 04, 2011
                Instrument = $EURJPY Date = Friday, August 05, 2011
                Instrument = $EURJPY Date = Sunday, August 07, 2011
                Instrument = $EURJPY Date = Monday, August 08, 2011
                Instrument = $EURJPY Date = Tuesday, August 09, 2011
                Instrument = $EURJPY Date = Wednesday, August 10, 2011
                Instrument = $EURJPY Date = Thursday, August 11, 2011
                Instrument = $EURJPY Date = Friday, August 12, 2011
                Instrument = $EURJPY Date = Sunday, August 14, 2011
                Instrument = $EURJPY Date = Monday, August 15, 2011
                Instrument = $EURJPY Date = Tuesday, August 16, 2011
                Instrument = $EURUSD Date = Monday, August 01, 2011
                Instrument = $EURUSD Date = Tuesday, August 02, 2011
                Instrument = $EURUSD Date = Wednesday, August 03, 2011
                Instrument = $EURUSD Date = Thursday, August 04, 2011
                Instrument = $EURUSD Date = Friday, August 05, 2011
                Instrument = $EURUSD Date = Sunday, August 07, 2011
                Instrument = $EURUSD Date = Monday, August 08, 2011
                Instrument = $EURUSD Date = Tuesday, August 09, 2011
                Instrument = $EURUSD Date = Wednesday, August 10, 2011
                Instrument = $EURUSD Date = Thursday, August 11, 2011
                Instrument = $EURUSD Date = Friday, August 12, 2011
                Instrument = $EURUSD Date = Sunday, August 14, 2011
                Instrument = $EURUSD Date = Monday, August 15, 2011
                Instrument = $EURUSD Date = Tuesday, August 16, 2011

                Looks like its option B. Is this something that could be updated on your end to follow option B? It would be a first step in portfolio testing.

                Thanks
                Anthony
                Last edited by mrlogik; 08-16-2011, 12:48 PM.
                mrlogik
                NinjaTrader Ecosystem Vendor - Purelogik Trading

                Comment


                  #9
                  Hello,

                  I will get this added to the suggestion list for our next major software revision. Thanks for submitting.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by morrnel, Today, 06:07 PM
                  2 responses
                  16 views
                  0 likes
                  Last Post morrnel
                  by morrnel
                   
                  Started by thumper57, Yesterday, 04:30 PM
                  6 responses
                  20 views
                  0 likes
                  Last Post NinjaTrader_BrandonH  
                  Started by sastrades, 05-10-2024, 09:59 AM
                  3 responses
                  55 views
                  0 likes
                  Last Post rc5781
                  by rc5781
                   
                  Started by guyonabuffalo, Yesterday, 10:01 PM
                  2 responses
                  22 views
                  0 likes
                  Last Post guyonabuffalo  
                  Started by reynoldsn, 05-10-2024, 07:04 PM
                  5 responses
                  28 views
                  0 likes
                  Last Post NinjaTrader_BrandonH  
                  Working...
                  X