[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] AmiBroker now featuring Covariance Matrix Adaptation Evolutionary Strategy optimization


  • To: amibroker@xxxxxxxxxxxxxxx
  • Subject: Re: [amibroker] AmiBroker now featuring Covariance Matrix Adaptation Evolutionary Strategy optimization
  • From: Dennis Brown <see3d@xxxxxxxxxxx>
  • Date: Fri, 4 Jul 2008 12:24:24 -0400

PureBytes Links

Trading Reference Links

Tomasz,

Thank you for the reply.

I understand now.  I was confused because I was looking in the wrong  
folder: CMAES.  You spelled everything out very nicely in the  
Plugin.cpp file in the CMAE folder of the ADK.

I see I can call all these functions directly from my AFL. :-))

Thank you very much,

Dennis


On Jul 4, 2008, at 2:52 AM, Tomasz Janeczko wrote:

> Dennis,
>
> The DLL is not "exact compilation" because 3rd party
> optimization engines usually need some "adjustment"
> to be compiled and work correctly in given environment.
> But it is pretty close.
> When CMAES is considered I added:
> a) headers required by Visual C++
> b) granularity support (original worked only with continuous  
> parameters)
> c) interface to AmiBroker's optimization engine.
>
> Best regards,
> Tomasz Janeczko
> amibroker.com
> ----- Original Message -----
> From: "Dennis Brown" <see3d@xxxxxxxxxxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Thursday, July 03, 2008 11:54 PM
> Subject: Re: [amibroker] AmiBroker now featuring Covariance Matrix  
> Adaptation Evolutionary Strategy optimization
>
>
>> Tomasz,
>>
>> I have one question regarding the DLL vs the Source code that you
>> provided for the CMAES engine.  I am almost embarrassed about how
>> ignorant I am, but I will ask anyway.
>>
>> The source code appears to be the standard source provided by the
>> original author.  Is the DLL you provided the exact compilation of
>> this source, or is there something else that is AB specific?
>>
>> The reason I ask, is that I would like to run this engine directly
>> from an AFL formula, providing my own iteration data instead of the
>> built-in back tester.  And of course I would like to be able to
>> interface to a compiled DLL directly without all the additional work
>> of changing and debugging the large source.
>>
>> Before, when I wrote my first DLL, I used your example that set up  
>> the
>> required definitions for the AFL variables.  Would I need to modify
>> the source to do that again to use it with AFL, or has that already
>> been taken care of with the compiled DLL?
>>
>> I am pretty sure I know the answer to this and I won't like it.
>>
>> So, if not, is there a shortcut I could take, like interfacing AFL to
>> jscript to DLL to make the job easier and less error prone?
>>
>> I also know for a fact that I am not the only one who is interested  
>> in
>> doing this at this time.
>>
>> Thanks for your guidance.
>>
>> Best regards,
>> Dennis
>>
>> On Jun 27, 2008, at 8:46 AM, Tomasz Janeczko wrote:
>>
>>> Hello,
>>>
>>> With the version 5.13.0 BETA AmiBroker is the first backtesting/
>>> optimization platform
>>> featuring state-of-the-art optimization algorithm called "Covariance
>>> Matrix Adaptation Evolutionary Strategy"
>>> that is is outperforming other evolutionary methods (genetic, PSO,
>>> DE, etc).
>>>
>>> For scientific background see:
>>> http://www.bionik.tu-berlin.de/user/niko/cmaesintro.html
>>> According to scientific benchmarks outperforms nine other, most
>>> popular evolutionary strategies
>>> (like PSO, Genetic and Differential evolution).
>>> http://www.bionik.tu-berlin.de/user/niko/cec2005.html
>>>
>>> The plugin (CMAE.DLL) comes with FULL SOURCE CODE (inside "ADK"
>>> folder, the source code is released under GPL terms)
>>>
>>> The CMAE.DLL plugin implements "Global" variant of search with
>>> several restarts with increasing population size
>>>
>>> By default number of runs (or restarts) is set to 5.
>>> It is advised to leave the default number of restarts.
>>> You may vary it using OptimizerSetOption("Runs", N ) call, where N
>>> should be in range 1..10.
>>> Specifying more than 10 runs is not recommended, although possible.
>>> Note that each run uses TWICE the size of population of previous run
>>> so it grows exponentially.
>>> Therefore with 10 runs you end up with population 2^10 greater (1024
>>> times) than the first run.
>>>
>>> There is another parameter "MaxEval". The default value is ZERO
>>> which means that plugin will automatically calculate MaxEval
>>> required. It is advised to NOT to define MaxEval by yourself as
>>> default works fine.
>>>
>>> The algorithm is smart enough to minimize the number of evaluations
>>> required and it converges VERY fast to solution point, so
>>> usually it finds solutions way faster than other strategies.
>>>
>>> It is normal that the plugin will skip some evaluations steps, if it
>>> detects that solution was found, therefore you should not be
>>> surprised that optimization progress bar may move very fast at some
>>> points. The plugin also has ability to increase number of steps
>>> over initially estimated value if it is needed to find the solution.
>>> Due to its adaptive nature, the "estimated time left" and/or
>>> "number of steps" displayed by the progress dialog is only "best
>>> guess at the time" and may vary during optimization course.
>>>
>>> To use CMA-ES optimizer, you just need to add one line to your code:
>>>
>>> OptimizerSetEngine("cmae");
>>>
>>> This will run the optimization with default settings which are fine
>>> for most cases.
>>>
>>> It should be noted, as it is the case with many continouos-space
>>> search algorithms, that decreasing "step" parameter in Optimize()
>>> funciton calls does not significantly affect optimization times. The
>>> only thing that matters is the problem "dimension", i.e. the
>>> number of different parameters (number of optimize function calls).
>>> The number of "steps" per parameter can be set without affecting
>>> the optimization time, so use the finest resolution you want. In
>>> theory the algorithm should be able to find solution in at most
>>> 900*(N+3)*(N+3) backtests where "N" is the dimension. In practice it
>>> converges a LOT faster. For example the solution in 3 (N=3)
>>> dimensional parameter space (say 100*100*100 = 1 million exhaustive
>>> steps) can be found in as few as 500-900 CMA-ES steps.
>>>
>>>
>>> Best regards,
>>> Tomasz Janeczko
>>> amibroker.com
>>>
>>>
>>> ------------------------------------
>>>
>>> Please note that this group is for discussion between users only.
>>>
>>> To get support from AmiBroker please send an e-mail directly to
>>> SUPPORT {at} amibroker.com
>>>
>>> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
>>> http://www.amibroker.com/devlog/
>>>
>>> For other support material please check also:
>>> http://www.amibroker.com/support.html
>>> Yahoo! Groups Links
>>>
>>>
>>>
>>
>>
>> ------------------------------------
>>
>> Please note that this group is for discussion between users only.
>>
>> To get support from AmiBroker please send an e-mail directly to
>> SUPPORT {at} amibroker.com
>>
>> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
>> http://www.amibroker.com/devlog/
>>
>> For other support material please check also:
>> http://www.amibroker.com/support.html
>> Yahoo! Groups Links
>>
>>
>>
>
> ------------------------------------
>
> Please note that this group is for discussion between users only.
>
> To get support from AmiBroker please send an e-mail directly to
> SUPPORT {at} amibroker.com
>
> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> http://www.amibroker.com/devlog/
>
> For other support material please check also:
> http://www.amibroker.com/support.html
> Yahoo! Groups Links
>
>
>


------------------------------------

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/