Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Try to find an answer in Wiki before asking a question.
    Submit programming questions in this forum only.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

Use of tester and optimizer
 Post subject: Use of tester and optimizer Post rating: 0   New post Posted: Mon 23 Aug, 2010, 13:13 

User rating: 0
Joined: Thu 19 Aug, 2010, 13:53
Posts: 62
Can you explain how the optimization should be used ?
I currently try optimize a strategy; After I complete the input fields and click start the optimizer fills very quickly the Messages list window with rows:
pass#1, Balance:50000, ProfitLoss:0, Total trades: 0
pass2#, Balance: 50000, ProfitLoss:0, Total trades: 0
pass2000# ...
etc..
All field have the same value and the list goes very long.
Then it says after sometime in the progress bar Executing onStart() and from this point in time it appears it freezes.
No any reaction or progress even after 30 minutes and the JForex window gets blank at a moment.
I use multiple instruments in strategy, downloaded data from History tab for the last month. etc.
Do you have any idea ? Is something specially to be done ?
Will be fine also if you can explain how we should use the tester and optimizer in some concrete steps.
Thank you.


 
 Post subject: Re: Use of tester and optimizer Post rating: 0   New post Posted: Mon 23 Aug, 2010, 13:22 

User rating: 0
Joined: Fri 25 Jun, 2010, 12:48
Posts: 12
2000 passes is too high for many computer.
I never test more than 20 combinations.


 
 Post subject: Re: Use of tester and optimizer Post rating: 0   New post Posted: Mon 23 Aug, 2010, 17:19 

User rating: 0
Joined: Thu 19 Aug, 2010, 13:53
Posts: 62
I consider JForex much more performant than other similar platforms, eg MT4 & MT5.
So, I am expecting the Optimizier to work fast and reliable; of course having a genetic fast algorithm engine inside.
The main problem for me now is that I dont know if I am doing something wrong in using it or indeed 2000 steps are too much for the optimizer and so it gets locked/blocked/crashed.


 
 Post subject: Re: Use of tester and optimizer Post rating: 0   New post Posted: Mon 23 Aug, 2010, 23:06 

User rating: 0
Joined: Tue 10 Nov, 2009, 16:58
Posts: 65
darlu72 wrote:
I consider JForex much more performant than other similar platforms, eg MT4 & MT5.
So, I am expecting the Optimizier to work fast and reliable; of course having a genetic fast algorithm engine inside.
The main problem for me now is that I dont know if I am doing something wrong in using it or indeed 2000 steps are too much for the optimizer and so it gets locked/blocked/crashed.


The optimizer just starts one tester instance for each combination of your parameters. So if you have 2000 combinations of parameters, it will start about 2000 threads, probably more... that is pretty huge for the average computer. Actually, all passes run at the same speed, on the same data it seems. So I suspect those are not threads but co-routines synced on the data. Or they use synced threads, dunno. I managed to test up to 200 combinations at a time on an average mac mini, but it gets pretty slow. Basically, about 200 times the time to test one combination.

There is no genetic algorithm to optimize parameters, just brute force combinatorial approach. No idea if dukascopy wants to implement that. Personally,I prefer they work on bugs first :-)

One can create one's own genetic optimizer with the JForex API. Just use ITesterClient directly.

BTW, genetic algorithms to find optimal parameter sets is nice, but it leaves the big picture out. One finds a local optimum, that might be surrounded by very bad parameter sets, making the optimum worthless. You need more than just an optimum, you need a well-positioned optimum :-)

Also don't compare MT4/5 with JForex. JForex might be slow, but it's simulations are much more accurate, particularly when using tick data.


 
 Post subject: Re: Use of tester and optimizer Post rating: 0   New post Posted: Tue 24 Aug, 2010, 06:15 

User rating: 0
Joined: Thu 19 Aug, 2010, 13:53
Posts: 62
[quote="brainstom"]
There is no genetic algorithm to optimize parameters, just brute force combinatorial approach. No idea if dukascopy wants to implement that. Personally,I prefer they work on bugs first :-)
[quote]

That's bad, almost crying ... I use multicurrency + multistrategy, input params are ~10, the box shows a total combinations of 300k possible. I thought that due to genetic these will be reduced to 2k - 10k passes.
All the good functionalities I saw in JForex are just killed by this big miss.
However, I would appreciate the Dukascopy admin forum to provide some more explanations about this and their intent for the tester and optimizer.

Thank you,


 
 Post subject: Re: Use of tester and optimizer Post rating: 0   New post Posted: Mon 30 Aug, 2010, 09:45 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
brainstom wrote:
So if you have 2000 combinations of parameters, it will start about 2000 threads, probably more... that is pretty huge for the average computer. Actually, all passes run at the same speed, on the same data it seems. So I suspect those are not threads but co-routines synced on the data. Or they use synced threads, dunno. I managed to test up to 200 combinations at a time on an average mac mini, but it gets pretty slow. Basically, about 200 times the time to test one combination.

It loads data in the same way as for a simple strategy testing, but passes it to multiple instances of the strategy. No additional threads are created
darlu72 wrote:
So, I am expecting the Optimizier to work fast and reliable; of course having a genetic fast algorithm engine inside.

The use of genetic algorithm is very interesting idea, requires some investigation though.... no promises :)


 
 Post subject: Re: Use of tester and optimizer Post rating: 0   New post Posted: Mon 30 Aug, 2010, 10:41 

User rating: 0
Joined: Tue 24 Aug, 2010, 20:50
Posts: 15
implementing a simple genetic algorithm isn't that much work, it basically takes only about 20 lines of code...
however, the difficult part is to optimize its parameters (mutation rate, type, amplitude etc.) so it doesn't get stuck in local minimums. that takes quite a bit of experience and is usually dependent on the kind of problem you want to solve.


 
 Post subject: Re: Use of tester and optimizer Post rating: 0   New post Posted: Tue 31 Aug, 2010, 11:36 

User rating: 0
Joined: Thu 19 Aug, 2010, 13:53
Posts: 62
Support wrote:
The use of genetic algorithm is very interesting idea, requires some investigation though.... no promises :)


Just an interesting idea, you got it just now ? when all others similar platforms from competitors already make intensive use of it/genetic alg for optimization ? You must be joking. I thought you already have this in plan but not yet ready !
Move fast and get it done. With current optimizer it takes me 1 day to optimize using 3 months history and having only 60 steps. As example in mt4, if I use H1 Open prices only, similar like onBar in JForex, the tester is able to optimize 12000 steps in less than 6 hours. I am waiting :)
Thank you.


 
 Post subject: Re: Use of tester and optimizer Post rating: 0   New post Posted: Tue 31 Aug, 2010, 17:11 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Quote:
As example in mt4, if I use H1 Open prices only,
it seems to be VERY rough testing.
As well, you can select "1 Hour" period and "Tick on open" interpolation in JForex to repeat the same case.

Could you please provide us with your ideas about any genetic algorithms you would like to see?


 
 Post subject: Re: Use of tester and optimizer Post rating: 0   New post Posted: Wed 01 Sep, 2010, 06:03 

User rating: 0
Joined: Thu 19 Aug, 2010, 13:53
Posts: 62
Support wrote:
Quote:
As example in mt4, if I use H1 Open prices only,
it seems to be VERY rough testing.
As well, you can select "1 Hour" period and "Tick on open" interpolation in JForex to repeat the same case.

Could you please provide us with your ideas about any genetic algorithms you would like to see?


Currently you use 'brute force' to optimize and also you optimize all steps at once. So for the 6 months I must wait all test to finish to see the results which may lead in 1-2 days or more. It is too much.
I am not expert in genetic alg. but I think:
- choose one you wish; think no need a very complicated one.
- implement optimization so that 1 step at a time is done for all backtest period. This could be done in threads also optimizing more steps in the same time but each one with its own period, When one is done, show it in list.
In this way, if 10 steps are done and 100 remained to finish, it can help:
- on another pc I can test the results of the 10 ones finished while waiting the optimizer to finish the other 100 steps.
- in many cases, the genetic finds quite good settings in the first 100-200 steps, so I might decide to stop it and save time.

Thank you


 
 Post subject: Re: Use of tester and optimizer Post rating: 0   New post Posted: Wed 01 Sep, 2010, 11:56 

User rating: 0
Joined: Tue 24 Aug, 2010, 20:50
Posts: 15
for problem sizes like that, where brute force is still an option, every method that chooses parameters with even a tiny bit of intelligence will speed up things.
there, it really doesn't matter if you implement genetic algorithms, hill-climbing, simulated annealing or just some kind of priority queue.
it starts to get interesting (from an algorithmic standpoint) when your parameter space is much too big to be tested by brute force.
in one of my last projects (not in the financial sector but robotics), we had a parameter space of about 250 values in 1,000 dimensions, so brute force would have to do something like 1e2400 evaluations each taking about 5-10s. with that problem, we had to really optimize the GA from what we knew about the function we were modelling, to make intelligent mutations and to get out of local minimums/maximums...
luckily, the problem sizes you are dealing with are a bit more easy. ;-)


 
 Post subject: Re: Use of tester and optimizer Post rating: 0   New post Posted: Sat 20 Nov, 2010, 15:54 

User rating: 0
Joined: Thu 27 Aug, 2009, 12:09
Posts: 23
Ocire, what you're saying makes a lot of sense. Perhaps Dukas should employ you to tackle this :)


 

Jump to:  

cron
  © 1998-2025 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com