[SHARE] GAB - Gekko Automated Backtests
#9
(03-23-2018, 05:31 PM)tommiehansen Wrote: This can be due to several reasons:

1. The curl_post() function simply died since your PHP is out of memory or something similar
2. The request took way too long time (over 60 minutes) so your curl request timed out
3. You have some settings in your server that overrides all settings that GAB tries to set and thus curl times a bit too quickly (and thus returns error)
4. You run with too many threads which creates a long que of requests since your CPU simply cannot run all the requests at the same time.
Thus you hit the AJAX timeout --OR-- your servers max execution time and thus curl_post() returns nothing.

Try not using over 5 threads and check your CPU-usage to get an idea what the max threads you actually can run at the same time is before your CPU spikes and uses 90-100% of it.

Setting threads to 10+ requires quite a beefy CPU and if your CPU is at 100% (or close) when using just 3-4 threads it means that the rest
of the runs will be qued up (it simply won't run any faster; you've hit your limit).

In future versions i'm considering being able to have an array of servers instead of just one but that's such a super-nerdy thing that few would use so it isn't a top priority and it comes with a plethora of problems (like the different servers needing the exakt same datasets, strategies etc -- so all of them have to be in 100% sync and this should ofc also be checked etc....).
Also real error messages and not stuff like "something is wrong" will be added.

Thanks for helping out to test the tool.

thx man for the reply.
i tried to look into it a little further.

4. i have a pretty new machine that should handle up to 8 backtests and changing the settings there did not solve it. it just slows the rate the errors occure.
having said that:
1. i suspect it having something to do with that. as it occurs more often after some time. i will have a look into this. i sadly have no clue about apache and PHP.
3. i did not change anything in my server settings. i just changed the root path for application access to the path where GAB is saved.
2. there could also be something with this. as now when i start GAB it shows 4-5 of those errors instantly as if there were some backtests stuck in the "pipeline" and apon starting give no results anymore.

but this is not a big issue at the moment as it gives actual results that can be used further. the only question with this is. if i restart the testing on a already used dataset were actual results exist will GAB know which tests with which params were already used or will it start from scratch just populate the result file even more. this could lead to the exact same Backtest results in the file and when restarted more and more often screw (a little bit) with the results. although i believe it would not have much on an impact when you consider you should run 1000+ tests.

there were some other errors i just don't have anymore in the log output. about dividing through zero and one other i can't remember just now. will report back when they occur again.
edit: just popped up
Quote:12:43:44
Warning:  max(): Array must contain at least one element in /home/david/gab/runner.php on line 288

Warning:  min(): Array must contain at least one element in /home/david/gab/runner.php on line 289

Warning:  Division by zero in /home/david/gab/runner.php on line 299

Warning:  Division by zero in /home/david/gab/runner.php on line 304

edit 2:
just had a look at the code and it has to do with best and worst trade and averages of trades:

PHP Code:
// best and worst trade
            
$trades['best'] = number_format(max($trades['win_avg']), 2);
            
$trades['worst'] = number_format(min($trades['lose_avg']), 2); 

PHP Code:
// calc averages for win and losing trades
            
$count count($trades['win_avg']);
            
$total 0;
            foreach( 
$trades['win_avg'] as $num ){ $total += $num; }
            
$trades['win_avg'] = number_format($total/$count2);

            
$count count($trades['lose_avg']);
            
$total 0;
            foreach( 
$trades['lose_avg'] as $num ){ $total += $num; }
            
$trades['lose_avg'] = number_format($total/$count2); 


another thing that came to my mind was that i updated my dataset with the candles of the last days and started testing on that one. GAB consider that as a completely new test and saved a new output file. wouldn't it be a good option if we could extend that result file with further test on newly downloaded candles over time? i'm not an expert but i think it would make the strat even saver, right? i think i would be best to test it on a dataset as long as possible to avoid overfitting. that would generate a strong strat for a long period of time. 
otherwise one could overfit a strat on a short period of time to have a strat that is good to be used on special movements of the marked. e.g. creating a strat for bullish/bearish markets. what would you say to that?

also looking forward to the next update of GAB
thanks again for sharing that. this tool is awesome. also thanks for your detailed explanation. no offense man, but you are crazy...in a good way  Big Grin


cheers DK
  Reply


Messages In This Thread
RE: [SHARE] GAB - Gekko Automated Backtests - by donkykong017 - 03-24-2018, 11:51 AM

Forum Jump:


Users browsing this thread: