Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

B12: Strategy Analyzed: Combined Result Bug?

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

    B12: Strategy Analyzed: Combined Result Bug?

    Hi,

    I think I have found a bug that occurs when basket backtesting lots of symbols. When backtesting over all 500 S&P symbols I get a combined result of "59.250.127.268.032%" for Total Net Profit which probably is a bit too much:
    ...
    YAHOO!_INV 001 048%
    YUM!BRANDS_INV 001 -072%
    ZIMMERBIOMET_INV 001 -009%
    ZIONS_INV 001 -069%
    ZOETISINC_INV 001 -021%
    Combined results 001 59.250.127.268.032%

    I attached the exportet backtest results als xslx to this post.

    And please let me ask also a question:
    I really could not find any information about how the "Combined Results" are aggregated for the different columns when executing a basket backtest. Some columns like Gross profit and Gross loss are obviously justed a sum of all symbol tests. But other columns I do not understand.

    For example the results for these three symbols:
    ADIDASAG_GOD 001 3/7 (Stop Loss,Profit Target) 034%
    ALLIANZSE_GOD 001 3/7 (Stop Loss,Profit Target) -059%
    BASFSE_GOD 001 3/7 (Stop Loss,Profit Target) -049%
    Combined results 001 3/7 (Stop Loss,Profit Target) -027%

    How is the 27% calculated please?

    Thanks in advance!
    Attached Files

    #2
    Hello _vbs_,

    So that I may detail to our development that 59,250,127,268,032% is incorrect, what was the exact value you were expecting?

    Regarding the percentage calculation for certain columns, I am happy to research this, however, I am not sure which column you are referring to. Are you looking at individual trades of a specific instrument on the Profit and Cum. net profit columns?

    Are you looking at the Total net proft on the Combined results?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Well, another strange (at least for me) behavior: A profit factor of 0.95 (so more loss than profit) but Total net Profit of +36.56% (good profit):
      Last edited by _vbs_; 07-21-2016, 03:56 PM.

      Comment


        #4
        Hi Chelsea,

        thanks for your quick answer.
        Originally posted by NinjaTrader_ChelseaB View Post
        So that I may detail to our development that 59,250,127,268,032% is incorrect, what was the exact value you were expecting?
        I don't understand how percentual Total Net Profit is calculated so I did not really have an expectation. But you can find the complete backtest result in the attachment so your experts probably will be able to figure out easily.

        Originally posted by NinjaTrader_ChelseaB View Post
        Regarding the percentage calculation for certain columns, I am happy to research this, however, I am not sure which column you are referring to. Are you looking at individual trades of a specific instrument on the Profit and Cum. net profit columns?

        Are you looking at the Total net proft on the Combined results?
        I am especially interested in the combined results aggregating the results for all instruments (The last line in the baskt backtest results). For me "Total Net Profit" is interesting but if there is documentation about all columns somewhere than I am happy too

        Thanks!

        Comment


          #5
          Hello _vbs_,

          Thank you for confirming that you are looking at the Total net profit column.

          The profit factor calculation is:
          Gross Profit / Gross Loss

          Are you finding this is calculating incorrectly for each individual instrument or for the trades for that instrument?


          I will research how the Total net profit is calculated in percent.
          I appreciate your patience while I research this.
          Chelsea B.NinjaTrader Customer Service

          Comment


            #6
            I tested some things and I also experienced a backtest on a single instrument that shows a negative Total Net Profit in Percent but a positive value in Currency:


            Originally I assumed that if Currency shows a positive Total Net Profit then also the Percent value should be positive. But the more I think about it the more I come to the conclusion that this can actually happen and is not a bug. So, sorry for bringing this up!

            Still the (possible) bug and my question from my original post are still valid.

            Comment


              #7
              Hello _vbs_,

              I wanted to let you know I am still working with this to see if there is a bug that I can reproduce.

              Our development has let me know the basic net profit calculation is Gross Profit + Gross Loss.

              To calculate percent, this is done with a formula found on the profit and loss calculation modes page.


              (Profit in Points * Lot Size of Entry) / (Quantity * Higher of .01 or Absolute Value of Entry Price)

              I'm currently plugging in this formula with a small amount of trades and only two strategies to see if I can find any values that are not correct. I'll then move on to a larger amount strategies and trades if necessary.
              Chelsea B.NinjaTrader Customer Service

              Comment


                #8
                Thanks for the update Chelsea!

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Brevo, Today, 01:45 AM
                0 responses
                2 views
                0 likes
                Last Post Brevo
                by Brevo
                 
                Started by aussugardefender, Today, 01:07 AM
                0 responses
                3 views
                0 likes
                Last Post aussugardefender  
                Started by pvincent, 06-23-2022, 12:53 PM
                14 responses
                238 views
                0 likes
                Last Post Nyman
                by Nyman
                 
                Started by TraderG23, 12-08-2023, 07:56 AM
                9 responses
                384 views
                1 like
                Last Post Gavini
                by Gavini
                 
                Started by oviejo, Today, 12:28 AM
                0 responses
                4 views
                0 likes
                Last Post oviejo
                by oviejo
                 
                Working...
                X