Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DMIndex sharpe ratio always equal to 1

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

    DMIndex sharpe ratio always equal to 1

    Dear Support,

    I understand that:
    In the event that there is only 1 month of trade history or less, there is insufficient data to calculate the monthly standard deviation of profits in which event, the Sharpe Ratio is set to a value of 1
    Having said that I am backtesting a very simple strategy on 2 years of daily data and ca. 300 stocks with 2 conditions i.e.

    Code:
    // Condition set 1
    if (
    //              CrossAbove(RSI(Close, Vperiodin, 3), Vleveldown, 1)
                    CrossAbove(DMIndex(3), Vleveldown, 1)
    
    {
    EnterLong(DefaultQuantity, "Entrysig");
    }
    
    // Condition set 2
    if (
    //              CrossBelow(RSI(Close, Vperiodout, 3), Vlevelup, 1)
                    CrossBelow(DMIndex(3), Vlevelup, 1)
    
    {
    ExitLong("Exitsig", "Entrysig");
    }
    All things being equal in the backtest, here's the strange thing: if I use the RSI for entry and exit it gives me a sharpe ratio >1 e.g. 4 for consolidated results.

    But if I use the DMIndex the sharpe ratio is always = 1.

    Here's the 2nd problem I've with the DMIndex. If I test from 2010 to now it returns 40 trades. If I test from 2008 to now it returns only 10 trades!

    I was expecting an "out of memory exception" that would have explained the lower # of trades but I've found nothing in the logs (trace and log).

    Hope anyone can point me in the right direction!
    Many thanks in advance,

    Chris

    #2
    Hi Chris,

    The sharpe ratio should not depend on the underlying conditions. If there are enough trades/data then there should be a value for it.

    If you don't understand the results at 300 instruments, then you should work on a much simpler setup -- start with 1 instrument.

    We can review your trace / log files to see if there were any errors occurred during these tests. Please send files dated for the day you made the test to support 'at' ninjatrader 'dot' com. Include a link to this thread.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Hi Ryan,

      Indeed there is enough data so I do not understand why the sharpe ratio is always 1, either for individual stocks or for the consolidated results. Unfortunately there's no logs I can't send you.

      I've also another issue with the DMIndex that produces less trade results with more data. Any ideas? Again no logs to help us out here.

      Thanks mate. Chris

      Comment


        #4
        Please send us the trace file for the day when you made this test. Mail to support 'at' ninjatrader 'dot' com. These files are automatically generated every day.


        You will find the trace file in the Documents > NinjaTrader 7 > Trace folder.

        * The trace file will be named "trace.YYYYMMDD.txt"
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          Thank you Ryan,

          I've just solved the sharpe ratio issue. I had to remove the 2 lines in the middle

          Code:
          Add(DMIndex(3));
          DMIndex(3).Lines[0].Value = Vleveldown;
          DMIndex(3).Lines[1].Value = Vlevelup;
          DMIndex(3).Panel = 1;
          For the second one I'll get back to you tomorrow as I would like to run another couple of backtest.

          Cheers, Chris

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by NRITV, Today, 01:15 PM
          2 responses
          9 views
          0 likes
          Last Post NRITV
          by NRITV
           
          Started by frankthearm, Today, 09:08 AM
          7 responses
          31 views
          0 likes
          Last Post NinjaTrader_Clayton  
          Started by maybeimnotrader, Yesterday, 05:46 PM
          5 responses
          26 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by quantismo, Yesterday, 05:13 PM
          2 responses
          19 views
          0 likes
          Last Post quantismo  
          Started by adeelshahzad, Today, 03:54 AM
          5 responses
          33 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Working...
          X