[SHARE] GAB - Gekko Automated Backtests
(03-21-2018, 12:01 PM)tommiehansen Wrote: GAB
Gekko Automated Backtets

*** THIS IS BETA ***
If something does not work, it simply does not work since time hasn't existed yet to get it working.

Updated 14 april 2018 with MySQL as new option.



I needed a way to run backtests for Gekko in a 'brute-force' manor automated and with multi-threading.
I also needed a way to compare all these runs and get extra data such as win percent etc.


Prerequisites (required)

1. Gekko installed and working
2. Webserver + PHP (preferrably 7.1+) with cURL and PDO SQLite or PDO MySQL/MariaDB
3. A user with write access

If you do not understand any of this it will be very hard to run this tool.
You can try googling for things such as install apache php 7.2.



0. Copy+Paste system/user.config.sample.php and rename the new file to user.config.php
1. Open user.config.php and make sure the $server variable is pointing at your Gekko install e.g. http://localhost:3000
2. Go to your-localhost/gab/ and see if it works.
3. Run something..
4. After you got some runs click 'View runs' in the menu and check results


Multi-server mode
If you're a nerd you can also use multi-server mode by specifying an array of servers instead of just one in your user.config.php like this:

$server = [

If your Gekko-files are not in sync on all these servers it will fail miserably though.
Setting an array will randomly use one of the servers to run a strategy.

In this case it's 3 so setting threads to e.g. 6 will usually mean 2 threads will run on each of these servers.
Do note that e.g. Chrome has a max concurrent connections @ 6 so in order to increase max-threads (and have it actually run in paralell) you would need to either force higher max concurrent connections or randomize/create subdomains for post.php (and remove any CORS restrictions).


Dynamic parameters
GAB uses dynamic parameters, these work for all strategy paramers. Example, RSI BULL/BEAR:

SMA_long = 100:1000,100
SMA_short = 10:90,10

BULL_RSI = 5:20,5
BULL_RSI_high = 70:90,5
BULL_RSI_low = 40:60,5

BEAR_RSI = 5:20,5
BEAR_RSI_high = 40:60,5
BEAR_RSI_low = 10:30,5

The format is <FROM>:<TO>,<STEPPING>.
This means that e.g. 10:20,5 will generate the range: 10,15,20
The params are inclusive meaning that odd stepping e.g. 5:15,10 will become 5,10,15 - the first and last of range is always kept.



Runner (select.php): https://i.imgur.com/kcXXMdW.png
Results (view.php): https://i.imgur.com/CPhvDEl.png



People keeps asking about this so i'll just leave it here for future reference:

ETH: 0xe03c5eb9DF93360e3Bcfcd13012B7DeebbED6923



Go to: https://github.com/tommiehansen/gab/
or just clone: https://github.com/tommiehansen/gab.git

i have one issue for now . i want to test BNB as Asset and BTC as currency . and i already imported data for the last year . but it always show BTC as asset and BNB as currency . i imported only 1 data which is BNB as asset and BTC as currency but always show the reverse . how can i fix that ?

Messages In This Thread
RE: [SHARE] GAB - Gekko Automated Backtests - by batssmasher - 08-03-2018, 08:55 PM
YT - by mtom78632 - 07-17-2021, 06:02 AM
WW - by mtom78632 - 07-18-2021, 07:12 AM

Forum Jump:

Users browsing this thread: