Genetic Optimization - Multi Assets Optimization

Posted By: Giorm

Genetic Optimization - Multi Assets Optimization - 03/01/15 22:46

It could be very useful add these requests on the next ZT version. Let me know what you think about these requests.

- Genetic Optimization
It could be very interesting to use Genetic Optimization to find optimal parameters. To avoid outlier and make sure your results are robust you could use the same method of Multicharts (http://www.multicharts.com/genetic-strategy-optimization/): "If the algorithm thinks it has found something good, it will start testing around the newly found peak to determine if this peak is an outlier. If this result is an outlier, genetic optimization leaves it and moves on to other areas".

- Multi Assets Parameter Optimization
One technique you can use to keep the optimizer from doing its job too well (otherwise known as overfitting) is to let the optimizer pick the parameters that work best on a basket of assets rather than a single one. So for some type of parameters could be useful to have the possibility to optimize a parameter over a basket of assets contemporary. It also could be interesting plot the optimization graph.

- Multi Assets Barperiod optimization
This is a specific case of the previous point but, as i know that Barperiod is a special parameter for ZT, so I ask specifically. If i am designing and developing a strategy I would like to search the best barperiod that works well over a group of assets and not only for one of them (and I don't like to use a generic value or try manually searching the best value as I do now).
Posted By: jcl

Re: Genetic Optimization - Multi Assets Optimization - 03/02/15 14:43

The multicharts method indeed sounds interesting. I will have a look at it. If it works as described I'll put it on our to do list for a future implementation.
Posted By: Giorm

Re: Genetic Optimization - Multi Assets Optimization - 03/06/15 22:32

Perfect! Thanks.

And what about the other requests?
I attach a simple result of my manual optimizing of the BarPeriod contemporary over a group of Assets: I manual changed the Barperiod value and registered the win, loss and return on excel and that is the result.
Do you think that the result could be considered interesting to add the second and third functionalities requested?
I think that should not be so expensive (function points speaking).
thanks

Attached picture Manually Optimize Barperiod.png
Posted By: Giorm

Re: Genetic Optimization - Multi Assets Optimization - 03/15/15 08:38

Hi jcl,
may i have your answers for the other two requests please?
Posted By: jcl

Re: Genetic Optimization - Multi Assets Optimization - 03/16/15 15:54

We never had any success in multi-asset optimization so far. It always produced bad results. You can often use the same strategy for multiple assets, but not with the same parameters.

But if you want to do it nevertheless, just optimize only once for multiple assets. You can easily do that by not using a loop() function for changing assets.
Posted By: Giorm

Re: Genetic Optimization - Multi Assets Optimization - 03/16/15 22:22

I have some problem to find the solution.
What is the code to try your method to optimize only one for multiple asset (so that the optimization executes comtemporary over all the assets).
Can you please help me with some lines of codes?

thanks
Posted By: jcl

Re: Genetic Optimization - Multi Assets Optimization - 03/18/15 17:17

A basic example:

parameter1 = optimize(....);
parameter2 = optimize(....);

asset("EUR/USD");
trade(parameter1,parameter2);

asset("AUD/USD");
trade(parameter1,parameter2);

asset("JPY/USD");
trade(parameter1,parameter2);

... etc.

Instead of the repeated asset/trade calls, a more elegant way is using an asset list, a for() loop, and a switch() statement.
Posted By: nanotir

Re: Genetic Optimization - Multi Assets Optimization - 04/18/15 13:42

I thought about the same while I went through the optimization section of the tutorial.
Now that I am starting playing with some strategies, I notice as well that the optimization is towards profit% so it is possible that after the optimization the strategy gets the highest profit but only 5 trades in 4 years. I would rather prefer to reduce the performance of the strategy and optimaze it towards the Shape Ratio which is a really important factor. I think it is a good start point to develop a strategy if the parameters which provide the best SR are known.
(Or, am I wrong and the highest SR is related to the highest profit?)
Posted By: GPEngine

Re: Genetic Optimization - Multi Assets Optimization - 04/18/15 14:41

The default objective function is geared towards maximizing PRR, which it is claimed, accounts for the # of trades. I assume it penalizes low # of trades.

Anyway, you can tweak this penalty by writing your own objective function.
Posted By: Giorm

Re: Genetic Optimization - Multi Assets Optimization - 10/05/15 15:42

Hi Jcl,
have you already planned the developing of the genetic optimization funcionality (multicharts method)?
On which version?

thanks
Posted By: jcl

Re: Genetic Optimization - Multi Assets Optimization - 10/06/15 11:27

Yes, this is planned, but I can not tell yet on which version.
Posted By: kujo

Re: Genetic Optimization - Multi Assets Optimization - 03/15/18 00:28

Any updates on this?
© 2024 lite-C Forums