Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Sharpe ratio, downside risk calculation

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

    Sharpe ratio, downside risk calculation

    Dear Support !

    1)
    I am trying to understand the TradeCollection class, but I am having difficulties and I
    am doing something wrong. Unfortunately I could not figure out the problem...

    I added the following to a strategy :

    protected override void OnTermination()
    {
    double sharpe= Performance.AllTrades.TradesPerformance.Percent.Av gProfit / Performance.AllTrades.TradesPerformance.Percent.St dDev;
    Print("Calculated Sharpe "+sharpe+" Sharpe "+Performance.AllTrades.TradesPerformance.SharpeRa tio);
    }

    The result of my calculation differs form the built-in SharpeRatio.
    What is wrong with my sharpe calculation ? How can I correct it ?

    2)

    I would also like to calculate the downside risk ( http://en.wikipedia.org/wiki/Downside_risk ).

    I am not sure if the below statement is correct:
    Performance.AllTrades.LosingTrades.TradesPerforman ce.Percent.StdDev

    How can I calculate the downside risk ?

    Thank you for the help,
    Arnold

    #2
    Hello Arnold,

    1. You would want to use the "Profit Per Month" as part of your calculations instead of "AvgProfit". For a formula to calculate Sharpe Ratio you may view our Help Guide at the following link.




    2. As far as the "Downside Risk", I am not familiar with this but looking at the link that you posted it would have to be manually calculated. With that said, I will also forward this to our development team for consideration on the next major release.
    JCNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    670 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    379 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    111 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    575 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    582 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X