Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Genetic Optimizer v1.5

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

    Genetic Optimizer v1.5

    Attached is v1.5 of my Genetic Optimizer. The significant change in this version: The optimizer pops up a dialog box to collect the parameters instead of forcing you to add them to your strategy. This is much cleaner. There is a slight hack in that you need to recompile your strategies to change the params, but overall IMO it's much nicer this way without cluttering up the strategies. Thanks very much Dierk for coming up with the idea and providing an example.

    This version also includes the previously discussed screening mode, which will stop testing a symbol once it hits a specified SQN level.

    Minor changes are exposure of the reproduction percentage on the params dialog and a fix to the save results bug. I'm still thinking about how to do the parameter stress test and starting with default values.

    The documentation has been updated as well at a new URL: http://www.ov-trading.com/geneticoptimizer2 .

    I've opted to leave the old files and documentation in place in case there turns out to be some serious problem with this version.

    As before, both of these files are required, there are dependent changes. Installation instructions are in the docs.
    Attached Files

    #2
    Genetic Optimizer

    Hi Pete

    This is a great addition to the ninja program and thanks for all of your work.

    Would it be possible to somehow add time parameters as a variable to the
    optimizer. It seems to me that parameter is one that may be of greater
    importance than most other variables but unless i am missing something, has
    to be backtested individually.

    Thanks again for your input.

    Lynn Atkinson

    Comment


      #3
      Lynn:

      Do you mean the bar period (e.g. 1 min, 5 min, ...)? I assumed there was nothing I could do about that just because of the way the UI is set up, but didn't play around with it in much detail. I'll take a look; that would be useful to me as well.

      Comment


        #4
        Genetic Optimizer

        Hi Pete

        Yes, that is what I meant, to be able to test the strategy over
        a number of various timeframes such as minutes, ranges, ticks, etc

        The way the strategy is set up does not allow for that within ninja, but
        had hoped maybe you could see a method of doing it thru the optimizer,

        Thanks

        Lynn

        Comment


          #5
          I tested some things out here today and it doesn't look like this is possible. I can change the time frame, but only once. I can't change it on each iteration. Maybe a request for NT7, but I can understand for performance reasons why NT might not want to allow that.

          I do have an update coming soon with multiple fitness functions & support for starting with default strategy values instead of all random.

          Comment


            #6
            Genetic Optimizer

            Thanks pete, I suspect it would be a huge asset hog

            Lynn

            Comment


              #7
              Hi Pete_S,

              Would you mind moving any relevant shared code to the new File Sharing section? I would do it but then you could not edit it in the future. Once done, please let me know so I can remove this forum section.

              Thanks
              RayNinjaTrader Customer Service

              Comment


                #8
                OK, working on it.

                Comment


                  #9
                  Thanks Pete

                  Hi Pete,

                  I also want to thank you for your great work! For me, maybe one of the most important enhancements to NT in this last year.

                  I am with lakinso, on that, adding time parameters as a variable to the
                  optimizer would be fabulous (if it could be done one day).

                  Unfortunately I am a non programmer so cannot be of any substantial help for you, but if it somehow would be possible integrate the following feature in the optimizer it would be great:
                  Let’s say we optimize a MA crossover strategy on 1 year of 10min data and when the optimization is finished we get for example the 10 parameter sets which would generate the most profit (best quality number or whatever) for the whole year.
                  But I would found it very useful if we also could get a list which shows which parameter set would have the best performance for each day of the year. Something like, 01/01/2008 - Parameters 25,2,40 – Performance 560$ ; 02/01/2008 – Parameters 12, 7, 55 – Performance 320$ … and so on for each day of the tested period.

                  P.S Specifying the optimization parameters increment (instead of always be 1 in case of int) would also be useful to safe even more time in optimizing.

                  Thanks again and best regards,
                  whitegun

                  Comment


                    #10
                    Hi Pete.

                    Link to document does not work. Could you check, looks promising though - I am an avid fan of optimisation of strategies

                    Sunrise

                    Comment


                      #11
                      Hi Pete,

                      Thanks for your work on this. Very useful.

                      Sadly I'm having some problems getting it to work for me. Initially everything seemed fine. However, suddenly optimizations started running in impossibly short times and it would 1. not find the optimal solution. 2. find a different solution each time on exactly the same optimization on the same data set.

                      I have no idea what's going on. Perhaps the best thing for me to do is reinstall both SQN and the Genetic Optimizer... However, I'm not sure how to uninstall them first...? Perhaps you could give me soem pointers...? Or if I can relay any information to you in order to help in ascertaining the source of my problem, I'd be more than happy to do so...

                      Thanks again for all your work on this Pete.

                      Comment


                        #12
                        You could remove the files from the location that you placed them and recompile an open indicator in NT to complete the removal.

                        As for the different results, not sure. The advantage with the optimiser is that it will 'hunt' for the optimum solution. However this means it is unlikely to reach the same result, unless your population and generation numbers are very small.

                        Sunrise.

                        Comment


                          #13
                          Yeah I did get round to removing them and recompiling Sunrise.

                          Still not working for me. I think I'm gonna need the 'Creator's' input here...

                          Comment


                            #14
                            Hi Sunrise,

                            On wich version of NT are you using the Optimizer??
                            I upgreded to 6.5.1000.3 and the SQN valuo is no longer displayed so I am also not shure if the optimizer still works properly.
                            Unfortunately I do not remember on which version I was before, but I know it was a older beta (I didn't upgrade long time) and on that version the optimizer still worked fine, displaying the SQN valuo and all.

                            Does someone know somethig about the creator of this magnific optimizer??
                            Seams he stopped suporting it as he did not answer any of the cuestions posted here regarding the optimizer and also didn't post any more here on this forum??

                            Comment


                              #15
                              System Quality Number, is this formula correct?

                              I've installed the GO v1.5 and seeing that the objective function is something called a System Quality Number (SQN) I'd like to pose a few questions to the people using SQN.

                              I've picked up in a post elsewhere in the NT forum that SQN is defined as follows:
                              SQN= sqrt(N)*average("Profit")/stddev("Profit")

                              Questions:
                              1) Why scale an average by sqrt(N)?
                              2) Wouldn't calculating an annualized standard deviation make more sense? I.e., stdev(profit)*sqrt(N), where N = # of trades per year,

                              so that "SQN" = average(profit)/(stdev(profit)*sqrt(N)).

                              Comment:
                              3) Note that defining "SQN" as average(profit)/(stdev(profit)*sqrt(N)) has plenty of academic research backing it up. That is, if you add one more term...
                              Sharpe ratio = (avg(RoR) -avg(risk free rate of N periods)/(stdev(RoR)*sqrt(N)).

                              4) I'd like to use the GO v1.5 but I'm reluctant to use what looks like bad statistics as my objective function. That is, I understand intuitively why annualized stdev is calculated as (stdev(profit)*sqrt(N)) but I can't figure out why you would choose to scale the mean instead of the stdev.

                              Any feedback would be appreciated.

                              -BlueLou

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by f.saeidi, Today, 11:02 AM
                              0 responses
                              0 views
                              0 likes
                              Last Post f.saeidi  
                              Started by geotrades1, Today, 10:02 AM
                              3 responses
                              10 views
                              0 likes
                              Last Post NinjaTrader_BrandonH  
                              Started by rajendrasubedi2023, Today, 09:50 AM
                              3 responses
                              15 views
                              0 likes
                              Last Post NinjaTrader_BrandonH  
                              Started by lorem, Today, 09:18 AM
                              2 responses
                              11 views
                              0 likes
                              Last Post NinjaTrader_ChelseaB  
                              Started by geddyisodin, Today, 05:20 AM
                              4 responses
                              30 views
                              0 likes
                              Last Post geddyisodin  
                              Working...
                              X