Optimise an EA and get the best of the optimised ones. - page 23

 
+1 Took the remaining one to optimise
Files:
 
George Merts:

Relevant in any case.

Even if you do several optimisations at the same time - this will allow for better selection of the best set of input parameters - simply by merging the XML files, and processing by the evaluation script. There can only be problems if the script finds errors, like it did last time, when I didn't mark all variables in the SET-file. The script would tell me "invalid file", but I couldn't figure out what was wrong.

So that your optimization is taken into account. Now I'll process it, update version on Yandex, and post the next experts "dropped out" of the League. If it's interesting - I can write "for what I was kicked out". :)

In general, I thought that genetics will select the same results each time, isn't it so?

The statistics of relegation can be collected, maybe these data will lead to improvements in the advisor, if the approach changes ...

 
Aleksey Vyazmikin:

Generally I thought that genetics would take away the same results every time, is this not the case?

The statistics of departure can be collected, maybe follow these data to improve the EA, if the approach changes...

Genetics - can't give the same results. Only close ones. And that's if the function is "even" enough.

We have a space of a billion cobmin options. We need to select the best ones.

First - we take a random 512 variants. This is the first generation.

Then we form the next generation - we make random parameter changes - mutations in each cobmination. We obtain 1024 individuals. We select the 512 with the highest value of fitness function (fitness function - this is just the Custom setting in the optimization settings). And the mutation cycle repeats.

The cycles continue until large values of the fitness function stop appearing.

Therefore, although the result (one value) may be the same in different optimizations, the generations themselves, and the "paths to finding" this value - will be different. And these finding paths - are shown in XML-file. My estimation script runs through this file, and counts variance of fitness function values for back- and forward-period. Then a compromise value of the fitness function is selected, so that it is as large as possible, but the variance is as small as possible (but in the second order of magnitude).

If we take two different XML optimization files, the best value in them may be the same. But the variance - will necessarily be different. And this - will affect the choice, it may be more reasonable to take a slightly smaller value of fitness function, however, such that the variance around this value is much smaller.

 
Aleksey Vyazmikin:
+1 Took the rest to optimize.

You've got 24 redcodes, I'll process GBPCHF_EMAFlatRTS, it'll be 25. Post the next file, it'll be 26. But I have to go out now. I'll be back in about four hours, I'll post the next outsiders.


Alexei, if you want to use redcodes - it will be more reasonable to compile a separate version of "league" - which will be immediately "loaded" with your selected codes for the selected time of action. So that in the settings you only have to write the desired risk. All of the selected systems - will work independently, as if they were multiple copies of League, each on its own Magic (this is how the EAs work on a common demo account, there are not 270 EAs, but only five, but they work with all 270 TS).

For those interested, the Expert Advisor Trading Systems League - available for download on YandexDisk

EALeague
EALeague
  • yadi.sk
View and download from Yandex.Disk
 
GBPJPY_ChnTrendRTS
Files:
 
George Merts:

First - we take a random 512 choices. This is the first generation.

Are we taking or the optimizer? Just something I doubt about randomness, i.e. what generates this randomness, is the algorithm known? Is it time bound?


George Merts:

Then we form the next generation - in each cobbling we make random changes in parameters - mutations. We obtain 1024 individuals. We select the 512 with the highest value of fitness function (fitness function is just the Custom setting in the optimization settings). And the mutation cycle is repeated.

And where can I see examples of such a function compiling itself?

Or is it just a single number based on a custom calculation that should tend to a higher or lower value, and accordingly if there is a dynamic, then the genetics drip in that very direction?

George Merts:

You've got 24 regcodes, I'll process GBPCHF_EMAFlatRTS, it'll be 25. You post the next file, it'll be 26. But I've got to go now. I'll be back in four hours, I'll post the next "outsiders".


Alexei, if you want to use readcodes - it'll be more reasonable to compile a separate version of "League" - which will be immediately "loaded" with your selected codes for the selected time of action. So that in the settings you only have to write the desired risk. All of the selected systems - will work independently, as if they were multiple copies of League, each on its own Magic (so work the experts on the common demo account, there are not 270 Advisors, but only five, but they work all 270 TS).

Hmmm, I don't even know how to select them... what is there to optimise then, or just one "risk" value?

 

Right. It fits. It's OK, all processed, embedded in the League.

I have an idea to modify EAs for optimization, so that I can immediately see from XML files, on which symbol they were run, and on which back and forward period. I will deal with this at the weekend.

For now I have to write some more instructions for newbies.

Aleksey Vyazmikin:

Do we beat the beater or the optimizer? I just have doubts about randomness, i.e. what generates this randomness and is the algorithm known? Is it time-based?

The optimizer, of course. It does genetic optimization.

And as far as I know and see - the initial parameter sets - are generated purely at random, most likely using a processor instruction giving out random numbers. Ideally, a RDRAND processor instruction should be used, producing a random number that meets many special standards. But, of course, random numbers can actually be pseudo-random - that's not much worse - we don't need robust cryptography, we need a uniform "seeded" value field.

 
Aleksey Vyazmikin:

And where can I see examples of a self-compiled function like this?

Or is it just a single number based on the results of a custom calculation, which should tend to a higher or lower value, and accordingly if there is a dynamic, then the genetics drip in that very direction?

Yes, that's right, the fitness function is the result of OnTester(), which characterises the passage. In the simplest case it is simply the value of the deposit at the end of the pass. The optimiser selects cobmins in which this function will be maximal. And new generations are formed closer and closer to the maximum.

I use a clever multi-factor function which reflects the quality of the trade very well, I once got this code for a fee, but now I don't regret it.

There, the genetic algorithm in general has quite a lot of tricks, there was even an article about genetic algorithms somewhere, and a lot was talked about.

 
Aleksey Vyazmikin:

Hmmm, I don't even know how to select them... what is there to optimise afterwards, or is there only one "risk" value?

You don't need to optimise anything, everything is already optimised before you. What you're doing now is optimizing the outsider systems so that they become favourites on other sets of parameters. Put them on the demo, and see how they trade. Some of them will be lucky enough to trade in the open positions. We will see in a month. By that time, the former favorites will have fired a test shot and will be removed from trading, and new systems, from those that are being optimized, will take their place.

We take any favourite system, set the risk value in it - and you can trade.

But "how to select"... This is my main question. If I "just grind" - then visually and by the "quality" parameter. Those systems that I've selected - I've set them on a real account, the investment password to which you have. But, they were chosen intuitively. Unfortunately, I haven't developed clear criteria yet.

So - look at the charts, choose the best - that's your choice for now. There are clearly many to choose from.

 

Systems requiring over-optimisation:

Two showed a SL queue that was too long, the rest exceeded the allowable slack.