Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Sharpe Ratio Calculations

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

    Sharpe Ratio Calculations

    Hello,

    I know this topic was brought up before, but it is still not clear for me.

    How exactly is Sharpe ratio being calculated in Strategy Analyzer?

    I've got Optimization results for 3 month. How do I recalculate Sharpe manually to get to the same number as NT?
    I tried calculating Avg/StdDev of all Profits from the Trades tab or Periods tab - my numbers didn't match the NT.

    Thanks.

    #2
    Originally posted by michaelsh View Post
    Hello,

    I know this topic was brought up before, but it is still not clear for me.

    How exactly is Sharpe ratio being calculated in Strategy Analyzer?

    I've got Optimization results for 3 month. How do I recalculate Sharpe manually to get to the same number as NT?
    I tried calculating Avg/StdDev of all Profits from the Trades tab or Periods tab - my numbers didn't match the NT.

    Thanks.
    This page from the NT Help explains how NT calculates their statistics, and should help you duplicate their calculations if you so wish.

    ref: http://www.ninjatrader.com/support/h...ightsub=sharpe

    Comment


      #3
      koganam thans for fast reply.


      I've got results for 3 month. Strategy Analyzer gives me Sharpe ratio of 2.4
      From the Periods tab, my monthly profits ("Profit p. m.") are 6.94%, 6.04% and -0.73%.

      From the help page:
      (Profit per Month – risk free Rate of Return) / standard deviation of monthly profits


      What do they mean by "Profit per Month", if the period is 3 month? Should I take average of these 3 numbers and divide by standard deviation? This way I still don't get a value of 2.4...

      Comment


        #4
        Originally posted by michaelsh View Post
        koganam thans for fast reply.


        I've got results for 3 month. Strategy Analyzer gives me Sharpe ratio of 2.4
        From the Periods tab, my monthly profits ("Profit p. m.") are 6.94%, 6.04% and -0.73%.

        From the help page:
        (Profit per Month – risk free Rate of Return) / standard deviation of monthly profits


        What do they mean by "Profit per Month", if the period is 3 month? Should I take average of these 3 numbers and divide by standard deviation? This way I still don't get a value of 2.4...
        You cannot just take an average of the percentages because, as you may have different numbers of trades in any month, the basis of the percentages is not fixed. If you want to know your profit per month, you must use the actual numbers, and go back to the basic definition of calculating an average: (Total Profit over NumberOfMonths)/NumberOfmonths.

        Comment


          #5
          koganam,

          Thank you for helping me to understand the issue.

          According to Strategy Analyzer, cumulative profit for 3 month period is 9.83%

          So, according to your suggestion, average per month is 9.83 / 3 = 3.276667

          Standard deviation of all profits of all trades during this period is 0.7982%

          Sharpe ratio = Average / StdDev = 3.276667 / 0.7982 = 4.105
          However, Strategy analyzer gives me Sharpe ratio of 2.4

          Can you please point me where am I incorrect in my calculations?

          Comment


            #6
            Originally posted by michaelsh View Post
            koganam,

            Thank you for helping me to understand the issue.

            According to Strategy Analyzer, cumulative profit for 3 month period is 9.83%

            So, according to your suggestion, average per month is 9.83 / 3 = 3.276667

            Standard deviation of all profits of all trades during this period is 0.7982%

            Sharpe ratio = Average / StdDev = 3.276667 / 0.7982 = 4.105
            However, Strategy analyzer gives me Sharpe ratio of 2.4

            Can you please point me where am I incorrect in my calculations?
            Once again, the definition is mathematically precise, and it is not what you are doing. ProfitPerMonth is an amount, not a percentage. The SD of the profits is also an amount, not a percentage. You must use the amounts: there is no way around that. Math is math. Even if you want to calculate them from percentages, then you need to know the base on which those percentages are being calculated. It would be rather convoluted to try to calculate the SD from that percentage.
            Last edited by koganam; 01-27-2013, 10:35 PM.

            Comment


              #7
              Originally posted by koganam View Post
              You must use the amounts
              Sure, I tried that, too
              Total profit per period = $12,710
              Averaged per month = $12,710 / 3 = 4236.77
              I have calculated Standard Deviation in Excel using STDEV.P function for all profit amounts of all trades, accounting for commissions.
              StdDev = 1068.113

              Sharpe calculated this way is 4236.77 / 1068.113 = 3.967
              Again according to Strategy Analyzer Sharpe should be 2.4

              Any suggestions?

              Comment


                #8
                Originally posted by michaelsh View Post
                Sure, I tried that, too
                Total profit per period = $12,710
                Averaged per month = $12,710 / 3 = 4236.77
                I have calculated Standard Deviation in Excel using STDEV.P function for all profit amounts of all trades, accounting for commissions.
                StdDev = 1068.113

                Sharpe calculated this way is 4236.77 / 1068.113 = 3.967
                Again according to Strategy Analyzer Sharpe should be 2.4

                Any suggestions?
                Again, imprecision. You cannot get correct results if you do not do as instructed. It says, and I quote: "standard deviation of monthly profits". This is definitely not, as you have used, "Standard Deviation in Excel using STDEV.P function for all profit amounts of all trades" (emphasis mine).

                If you have only 3 months of data, then you have only 3 data points for which to calculate the standard deviation: the monthly profits for 3 different months.

                Comment


                  #9
                  Sharpe Ratio calculation problem

                  Originally posted by koganam View Post
                  monthly profits for 3 different months.
                  Sure, I tried this as well.

                  Total profit per period = $12,710
                  Averaged per month = $12,710 / 3 = 4236.77

                  TotalProfits per month:
                  9350
                  3670
                  -310

                  StdDev = 3963.98

                  Sharpe Ratio = 4236.77 / 3963.98 = 1.07

                  According to Strategy Analyzer Sharpe should be 2.4

                  Any more ideas?

                  Comment


                    #10
                    Originally posted by michaelsh View Post
                    Sure, I tried this as well.

                    Total profit per period = $12,710
                    Averaged per month = $12,710 / 3 = 4236.77

                    TotalProfits per month:
                    9350
                    3670
                    -310

                    StdDev = 3963.98

                    Sharpe Ratio = 4236.77 / 3963.98 = 1.07

                    According to Strategy Analyzer Sharpe should be 2.4

                    Any more ideas?
                    In the 3 month period, I am going to assume that 9350 is the most recent month?

                    Then "Sharpe Ratio for this month" = 9350/3963.98 = 2.358740... = 2.4 rounded to one decimal place. I am not sure why they round to one rather than 2 decimal places.

                    I agree that that is a strange way to calculate the Sharpe Ratio. Using the averages, as seems to be the more accepted definition, would give your results, which do look more correct to me at least.

                    Comment


                      #11
                      koganam,

                      Thanks for helping me.
                      I wish that would solve our headache , but the most recent month's profit is -310
                      Also, as long as I understand, Strategy Analyzer provides Sharpe result for entire period, 3 month..

                      You see, we must understand the way NT calculates Sharpe Ratio to stay comfortable with optimization results.....

                      Comment


                        #12
                        Originally posted by michaelsh View Post
                        koganam,

                        Thanks for helping me.
                        I wish that would solve our headache , but the most recent month's profit is -310
                        Also, as long as I understand, Strategy Analyzer provides Sharpe result for entire period, 3 month..

                        You see, we must understand the way NT calculates Sharpe Ratio to stay comfortable with optimization results.....
                        Well that means that something is very definitely wonky in there! You might want to raise a bug report?

                        Comment


                          #13
                          Sure.. I'll report it.

                          Comment


                            #14
                            Originally posted by michaelsh View Post
                            koganam,

                            Thanks for helping me.
                            I wish that would solve our headache , but the most recent month's profit is -310
                            Also, as long as I understand, Strategy Analyzer provides Sharpe result for entire period, 3 month..

                            You see, we must understand the way NT calculates Sharpe Ratio to stay comfortable with optimization results.....
                            Now, it would be mighty strange if they are actually using the best value over the period to calculate with.

                            Comment


                              #15
                              Well. I tried so many approaches, that I feel we are actually 'fitting' numbers to get to the given value. I have opened a ticket with the support....

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by AaronKoRn, Yesterday, 09:49 PM
                              0 responses
                              11 views
                              0 likes
                              Last Post AaronKoRn  
                              Started by carnitron, Yesterday, 08:42 PM
                              0 responses
                              10 views
                              0 likes
                              Last Post carnitron  
                              Started by strategist007, Yesterday, 07:51 PM
                              0 responses
                              11 views
                              0 likes
                              Last Post strategist007  
                              Started by StockTrader88, 03-06-2021, 08:58 AM
                              44 responses
                              3,980 views
                              3 likes
                              Last Post jhudas88  
                              Started by rbeckmann05, Yesterday, 06:48 PM
                              0 responses
                              9 views
                              0 likes
                              Last Post rbeckmann05  
                              Working...
                              X