Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Sharpe metric

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

    Sharpe metric

    Hi there,

    I have a strategy that I backtest on 6 years ... under the Periods tab, the Sharpe readings are the following: 1.01 / 0.98 / 0.94 / 1.09 / 1.04 / 1.11

    Under the summary tab, the Sharpe reading is : 0.60

    I have a hard-time connecting the dots ... would you please explain how this is possible?

    Thanks in advance
    Dominique

    #2
    Hello Dom,

    I'm not entirely sure how this is calculated. In some cases it seems to match, but there is something changing when we span more than a year. I'm working with development to answer this for you.

    Thanks for your patience.
    MatthewNinjaTrader Product Management

    Comment


      #3
      Dom,

      Thanks for your patience while I researched this.

      When you look at the summary Sharpe ratio, we're looking at a collection over the entire date range you have selected.

      When you look at each individual yearly period, it is a collection of only that year.

      The way each yearly period is going to be calculated is
      Code:
      Sharpe Ratio = (Profit per Month – risk free Rate of Return) / standard deviation of monthly profits
      A few notes on this: the Profit per month will always use the Percent calculation, and the riskFreeReturn is always 0.

      The problem you'll have though is the Profit Per Month is not exposed to the summary tab, so you will need to calculate this by hand.

      Code:
      	
      Percent.ProfitPerMonth = (1 + cumulative profit)(1 / # of months) - 1
      Notes on this calcuation: the # of months is going to be the total days / 30.5 (365/12), and the total days is the EndDate - StartDate - 1.

      This should help you arrive at the calculation for each periods vs the summary.
      MatthewNinjaTrader Product Management

      Comment


        #4
        Matthew,

        I can compute Sharpe ratio in Excel by myself - no big deal.
        But it seems the 6 years value computed by Ninja in that particular case is just wrong.

        BTW, when results are given by Ninja in Percent, it is Percent of what ???

        Thanks in advance
        Dominique

        Comment


          #5
          Dom,

          Do you agree with the individual yearly periods? It's just the summary you do not agree with?

          What are you getting in Excel when you calculate yourself?

          Percent is based off of Cumulative Profit percent mode.. It can be thought of as if you were reinvesting your complete account including winnings back into the trade again and again. Not baesd off of a balance as it's sometimes confused with.
          MatthewNinjaTrader Product Management

          Comment


            #6
            Honestly, I don't agree with anything.

            My Excel-calculated Sharpe values even for individual years do not match Ninja's. From your description of what Percent means for Ninja, I can understand why:

            For Sharpe calculation, when using percent returns, the percent must be the ratio of the daily or monthly $$$ return divided by the account size at the beginning of the year, *not* the last account balance. It is just as simple to use $$$ returns.

            If you want a proof of why it is necessary to use a percent of the account size at the beginning of the year, just take for example the case where each monthly return $$$ is constant.

            Cheers
            Dominique

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            86 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            48 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            30 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            33 views
            0 likes
            Last Post TheRealMorford  
            Started by Mindset, 02-28-2026, 06:16 AM
            0 responses
            67 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Working...
            X