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

optimizing for a low correlation to another strategy

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

    optimizing for a low correlation to another strategy

    Suppose I have a strategy on 30-min bars with certain parameters that works fine. I want to optimize another strategy also over 30-min bars over a certain set of parameters such that I want to maximize for a function say (max net profit) * (1 - correlation to the P&L of the first strategy). How can I possibly implement this?

    #2
    Hello,

    Thank you for the question.

    I wanted to first confirm, are you asking to use the results of the first optimization to further guide a second optimization?

    If so there would be nothing internal in place to handle this type of test, the analyzer can only optimize one strategy at a time and its results are not shared to the other strategies.

    You could potentially write the settings used in each optimization to file and then read those settings from another strategy, but you would also need to come up with the logic to save the optimizations that are relevant instead of all iterations.

    Could you confirm if I have understood the question fully before further addressing this?

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

    Comment


      #3
      Originally posted by NinjaTrader_Jesse View Post
      Hello,

      Thank you for the question.

      I wanted to first confirm, are you asking to use the results of the first optimization to further guide a second optimization?

      If so there would be nothing internal in place to handle this type of test, the analyzer can only optimize one strategy at a time and its results are not shared to the other strategies.

      You could potentially write the settings used in each optimization to file and then read those settings from another strategy, but you would also need to come up with the logic to save the optimizations that are relevant instead of all iterations.

      Could you confirm if I have understood the question fully before further addressing this?

      I look forward to being of further assistance.
      Hi Jesse,

      Thanks for the reply. Yes, that's correct - you understood what I meant. I know that this can be outside of the standard help that you can provide. But would it be possible to give some pointers or hints on how I might be able to do this?

      For instance, would it be possible to write out (i) 30-min returns and (ii) the executions from applying a strategy, then write a custom optimization that loads this information and creates a statistics based on mix of low correlation and performance?

      Comment


        #4
        Hello,

        Thank you for the reply.

        What you are asking may be possible, at least the Writing to file portion would be. You could set up logic in your strategy in anyway you see fit and then write any data you need to a file, the prior examples provided would show that already to help you in that sense.

        Regarding the remainder, I would have no additional clues on what you may need to do as far as writing a custom optimizer type as these are not documented at all. You could see the existing types and make your own if you wish, you could also load data from file as you are still just using C#. Regarding the logic or how that would work to your advantage would rely on what data you export and what logic you come up with in the optimizer type.

        To see a existing optimizer to see what may be required, you could view the file: Documents\NinjaTrader 7\bin\Custom\Type\@DefaultOptimizationMethod.cs

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

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Belfortbucks, Today, 09:29 PM
        0 responses
        6 views
        0 likes
        Last Post Belfortbucks  
        Started by zstheorist, Today, 07:52 PM
        0 responses
        7 views
        0 likes
        Last Post zstheorist  
        Started by pmachiraju, 11-01-2023, 04:46 AM
        8 responses
        151 views
        0 likes
        Last Post rehmans
        by rehmans
         
        Started by mattbsea, Today, 05:44 PM
        0 responses
        6 views
        0 likes
        Last Post mattbsea  
        Started by RideMe, 04-07-2024, 04:54 PM
        6 responses
        33 views
        0 likes
        Last Post RideMe
        by RideMe
         
        Working...
        X