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

Optimization graph

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

    Optimization graph

    Hi

    Optimization graph question

    Is there a way to export the x and y variables used to plot the graphs?

    For example,

    2d graph:

    Plot net profit and parameter 1

    ... it plots the values. How can I access the actual values so that I can save them to a file or something? I'd like to be Able to export them out of NT.

    Also, why is it so hard to export stuff from NT to excel? Isn't there a similar function to "print" that writes to an excel file??

    Another suggestion; we need to add a "benchmark" to compare our strategy results. For example, how does your strategy compare to a simple buy and hold during the time you actively traded.... a simple percentage plot of the underlying during the time would be enough.. would be nice to overlay your strategy gains and compare them to buy and hold

    #2
    Hello calhawk01,

    Thanks for opening the thread.

    There isn't a way to export the data from an optimization graph. I'll submit a feature request on your behalf.

    Another suggestion; we need to add a "benchmark" to compare our strategy results. For example, how does your strategy compare to a simple buy and hold during the time you actively traded.... a simple percentage plot of the underlying during the time would be enough.. would be nice to overlay your strategy gains and compare them to buy and hold
    I'll submit another ticket for this to be feature requested. I will leave the request more open ended so strategy results could be compared against an arbitrary "benchmark" strategy that would not be limited to a buy & hold.

    As with other feature requests, we cannot present an ETA as they are fulfilled based on the development team's schedule and priorities. Upon implementation the ticket ID can be found publicly on the Release Notes page of the help guide. I'll provide a link below.

    Release Notes: https://ninjatrader.com/support/help...ease_notes.htm

    When I have received tickets for these feature requests, I will update the thread once more.

    EDIT: Ticket IDs:

    Exporting optimization graphs in the Strategy Analyzer - SFT-2645

    Buy and Hold benchmark performance metric - SFT-1674

    Thanks for your feedback!
    Last edited by NinjaTrader_Jim; 01-23-2018, 10:19 AM.
    JimNinjaTrader Customer Service

    Comment


      #3
      Thanks.

      The reason why for need these values is bc I want to know how my pnl changes as the values on my parameter change.

      When we run optimization, you can see this on the graph, however in need to export these so that I can analyze them further using R and implement machine learning techniques.

      I could theoretically run the optimizer, and "keep" the top 1000 results and then export those into excel and see how many variable changes and how that impacts my pnl.

      However, is there a line of code that I can add to my strategy, that, once I run my optimizer, and only then, the "end results" (the parameter used and net pnl) of all the iterations that the system is running can be printed on the output window?

      Also how many top results can n8 actually save? Mine freezes at around 800 iterations if I try to save max iterations (1600 top results)

      Comment


        #4
        Hello calhawk01,

        There isn't a parameter that will output this information to the output window in one go. If you wanted, you could add your own code to OnExecutionUpdate() to output any desired performance metrics.

        I am not aware of any limitations for "Keep best # results." There may be a delay with garbage collection and memory usage. Making sure that you have "Keep best # results" less than the maximum number of iterations, could you test again with the Windows Task Manager open so we can observe memory usage?

        We will want to give enough time for garbage collection to kick in if NinjaTrader looks frozen. Please give NinjaTrader some time and see if memory utilization eventually frees to continue the backtest.

        Also, you may be able to optimize your strategy so it can perform better on optimization backtests. Please see IsInstantiatedOnEachOptimizationIteration and the Best Practices linked below for more information.

        IsInstantiatedOnEachOptimizationIteration - https://ninjatrader.com/support/help...niteration.htm

        Best Practices (See Resetting class level variables for Strategy Analyzer Optimization) - https://ninjatrader.com/support/help...urceManagement

        I look forward to being of further assistance.
        JimNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by The_Sec, Yesterday, 03:53 PM
        1 response
        12 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by mmenigma, Yesterday, 03:25 PM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by kujista, Today, 05:44 AM
        0 responses
        7 views
        0 likes
        Last Post kujista
        by kujista
         
        Started by ZenCortexCLICK, Today, 04:58 AM
        0 responses
        9 views
        0 likes
        Last Post ZenCortexCLICK  
        Started by sidlercom80, 10-28-2023, 08:49 AM
        172 responses
        2,283 views
        0 likes
        Last Post sidlercom80  
        Working...
        X