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

# of months

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

    # of months

    Hello everybody,

    According to the Statistics Definitions,
    Profit Per Month = cumulative profit / # of months

    But if I optimize over a period of one year, from 1/1 to 12/31, and I take from statistics
    cumulative profit / Profit Per Month = ?

    the result for # of months is not 12, it varies considerably: 9, 10, 11... Why? What are the calculations for # of months?

    Thank you.

    #2
    Hello pintope,

    Thank you for your post.

    Your calculation assumes each month made a profit. Do you haves trades opened and closed within the same month for each month in each optimized set of parameters?

    Comment


      #3
      Is this not an average? So what if trades are not opened and closed within the same month? Some months there is a profit and some not, that's why I'm averaging.

      This is a real example, the optimization period is one year:

      All Trades
      Cummulative Profit: $4351.50
      Profit Per Month: $370.73
      # of months = 11.74

      Long Trades
      Cummulative Profit: $8531.50
      Profit Per Month: $788.52
      # of months = 10,82

      Short Trades
      Cummulative Profit: -$4180.00
      Profit Per Month: -$418.00
      # of months = 10.00

      # of months is calculated by dividing.

      Comment


        #4
        Hello pintope,

        Correct, it is an average. If the profit was present in a month or not is irrelevant, so my thought there was incorrect.

        What are you start and end dates when the value only returns 9, 10, or 11?

        Comment


          #5
          For these tests I'm using always a period of one year, from 1/1/2013 to 12/31/2013.

          I you check the example of my former post, in the same optimization there are different # of months depending on if you watch all trades or only long or short trades, 11.74, 10,82 and 10,00 respectively. I take Cummulative Profit and Profit Per Month from the result stats sheet, then I divide the two numbers.

          Comment


            #6
            Hello pintope,

            Thank you for your response.

            What instrument type are you testing? Futures?

            And do you see trades for each month? Do you see short trades for each month? Do you see long trades for each month?

            Comment


              #7
              What instrument type are you testing? Futures?
              Futures. The results below show # of months for a moving average system on NQ, YM and ZC for all (A), long (L) and short (S) trades.

              NQ A=11,86 L=11,86 S=09,37
              YM A=11,21 L=10,42 S=09,67
              ZC A=11,69 L=10,78 S=11,70

              And do you see trades for each month? Do you see short trades for each month? Do you see long trades for each month?
              Yes, the strategy is making over 40 trades in one year.

              EDIT: Not really, I have focused on those results less accurate (9 and 10) and in fact they lack trades in one or two months. It seems to be the cause, though I don't understand why that affects the calculations.
              Last edited by pintope; 08-06-2015, 09:53 AM.

              Comment


                #8
                Hello pintope,

                Thank you for your response.

                I am seeing similar behavior using the current contract month from 1/1/2013 to 12/31/2013. Are you testing the current contract months? Do you use a Merge Policy that merges? You can check under Tools > Options > Data > if you are using MergeBackAdjusted or MergeNonBackAdjusted the Strategy Analyzer will merge the contracts. I do not know if this is the case yet as I am still testing this with different settings.

                Comment


                  #9
                  MergeBackAdjusted. Thank you for checking, Patrick.

                  Comment


                    #10
                    Hello pintope,

                    Thank you for confirming that.

                    Are you using the 09-15 contracts?

                    Comment


                      #11
                      Continuous contracts, ##-##. I bought them from a data provider.

                      Comment


                        #12
                        My conclusion is that NinjaTrader, whatever it does, is not in line with the given formula Profit Per Month = cumulative profit / # of months. There is a difference, whatever.

                        I was trying to incorporate this statistic to a software I am currently developing but Profit Per Month does not adhere to the formula and it's not safe (for me).

                        Thank you for your work Patrick, if you resolve this enigma please let me know.

                        Comment


                          #13
                          Hello pintope,

                          I have verified with the development department that these values are an average (averaging the size of the month).

                          Because this is calculated on the backend I am not able to show you step by step how this is calculated.

                          That said, this value is mean to be a guide to give you a general sense of how this would perform over a month time period. This is not an exact number but an average number that provides an estimate.
                          Chelsea B.NinjaTrader Customer Service

                          Comment


                            #14
                            Well, it's true the statistic Profit Per Month continues to fulfil its function as a guide, but an "average" of 9.5 months in one year is strange.

                            Thank you for your help.

                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by samish18, 04-17-2024, 08:57 AM
                            16 responses
                            55 views
                            0 likes
                            Last Post samish18  
                            Started by arvidvanstaey, Today, 02:19 PM
                            3 responses
                            10 views
                            0 likes
                            Last Post NinjaTrader_Zachary  
                            Started by jordanq2, Today, 03:10 PM
                            2 responses
                            8 views
                            0 likes
                            Last Post jordanq2  
                            Started by traderqz, Today, 12:06 AM
                            10 responses
                            18 views
                            0 likes
                            Last Post traderqz  
                            Started by algospoke, 04-17-2024, 06:40 PM
                            5 responses
                            47 views
                            0 likes
                            Last Post NinjaTrader_Jesse  
                            Working...
                            X