[SHARE] GAB - Gekko Automated Backtests
#31
(03-26-2018, 05:19 PM)tommiehansen Wrote: Oh... Why don't you run your backtesting on your work computer?

This would be preferrable since your work computer probably is a desktop and could run 24/7 much, much... better then your laptop.
If you got a little $$$ laying around you could also buy a small box with some older desktop i5/i7 that still would be much faster then your laptop (due to the fact that it's desktop class...). You can basically find this on eBay or anywhere else for under $200.

To simply remote into it (and check stuff from home) use something simple such as TeamViewer that doesn't require you to become an expert on remote access security and stuff like that.

Running stuff 24/7 on a laptop isn't something i would recommend.
I use mine mainly for testing, not really for doing 2h+ runs...

yeah work pc is not an option definitely. and its also a laptop. Dodgy
i bought the laptop just few weeks ago. and it has to be portable and its not dedicated to running backtests primarily but atm its what its good for and i guess it will do.
yeah all the remote stuff i did that and tried it just dont have a good pc to do that and no good possibilty to remote access from work (its all locked down). if backtesting gets more important and is not possible to run on the laptop anymore i will consider buying some work machine for at home.

Quote:1. No, try reloading it for real since it might have dropped links to etc (or your server might differ from mine thus it not finding stylesheets etc).
Edit: Come to think of it i hardcoded the basePath to /gab/ so if you got any other dir it'll break. This stuff happens when one codes at night, will fix @ future.

2. Yes, there is no 'select.php'; it has been renamed to index.php since 'select' will be the default start screen anyway.
 yeah will have a look at whats new when i have the time. (have my laptop with me) Tongue


edit1:
just used the latest version. this it what it looks like. there are also some errors and warnings

Edit2:
sry errors are because of gekko not running. stupid me. the interface is still the same..


Attached Files
.png   Screenshot from 2018-03-27 12-34-13.png (Size: 133.09 KB / Downloads: 33)
  Reply
#32
A lot of text there... Smile

But ye... i could do a check to see if Gekko is running at all ... but this tool isn't really for people not grasping the basics (such as actually having Gekko running) since i simply do not have time for such support (for free). Smile
  Reply
#33
(03-26-2018, 09:38 PM)0mathew0 Wrote:
(03-26-2018, 09:24 PM)tommiehansen Wrote: Well.. curl errors usually means it has timed out.
This is quite hard to debug unfortunately since you do not supply a way to recreate the issue?

Status 500 = internal server error which is quite a hard error.
Status 0 = Does not exist, this is an internal status meaning that cURL didn't return anything.

Timeout within PHP is set to 3600 meaning 60 minutes.

Unless you have a RPI3 with Jessie and VNC access it would be hard to recreate Wink just hoped you have an idea. Not using local Firefox but the one on my remote PC reduced the errors, so it must have to do with performance, although it was not running above 60% CPU and 50% MEM when the errors occured.

I should avoid stressing my trading RPI anyway, so I will finally install gekko on my Windows 10 machine for backtesting purposes now.

If you actually ran the browser in RPI3 the un-optimized frontend code could probably cause some problems. Do note that debugging for the frontend hasn't been done whatsoever when it comes to cross-browser compatibility (and performance issues); it's only tested in Chrome (because time...).

Not much though has gone into optimizing the frontend either since that is usually the lightest part of it all and i wouldn't expect people to run browsers on RPI3 but rather use it in a client > server way if having a RPI3 (meaning you run the frontend (GAB) on computer A and then use the RPI as computer B where the actual backtests are performed).

Do also note that you don't actually have to use the frontend at all for using GAB.
You could set it up so that you only use system/post.php and POST the dynamic TOML files + candle size + strategy name to it.
It won't currently be multi-threaded if you do it that way but it will work

Sample POST to system/post.php:
Code:
dataset: {"exchange":"bitfinex","currency":"USD","asset":"XRP","from":1508499360,"to":1517574720}
strat: RSI_BULL_BEAR
toml: # SMA Trends
SMA_long = 100:1000,100
SMA_short = 10:50,10

# BULL
BULL_RSI = 10:20,5
BULL_RSI_high = 75:85,5
BULL_RSI_low = 50:60,5

# BEAR
BEAR_RSI = 10:20,5
BEAR_RSI_high = 50:60,5
BEAR_RSI_low = 10:30,5

candle_size: 3:5,1
history_size: 10
ajax_timeout: 5
threads: 3

So basically you could create this:
/you/gab/
/you/gab_run.sh (some logic for running it again and again since post.php will only run once and some logic for using setup.conf)
/you/gab_setup.conf (your POST params)

And thus you wouldn't need a browser but could rather only use the 'View' part of GAB if you want.
You could this way also fire up X num PHP requests and some handlers for that etc in order to multi-thread it etc ... etc ... install nginx for better handling etc ... (i could go on forever).

I could do all this myself ofc, but again --- time! Smile
  Reply
#34
Hi tommiehansen, I've the same problem as donkykong017.
The UI of the tool is gone since the last update.
However the Tool isn't functional at all on my Setup.
I've installed gab on /var/www/gab/ but when creating a run, the tool want' to redirect to http://192.168.2.132system/post.php (without slash between the IP and gab) so the tool isn't functional on my setup.

I'll try to look deeper into it, but my programming isn't the best Wink

EDIT: Seems, that the links are build false, I've attached a picture with links, for system for example, there is no slash.

2nd_EDIT: Solution is changing 

$conf['urls'] = [

                'system' => $base_url . 'system/',
                'results' => $base_url . 'results/',
                'assets' => $base_url . 'assets/',

in system/conf.php  to

$conf['urls'] = [

                'system' => $base_url . '/system/',
                'results' => $base_url . '/results/',
                'assets' => $base_url . '/assets/',




Kind Regards and thank you for your tool
fablerII


Attached Files
.png   GAB.PNG (Size: 46.49 KB / Downloads: 22)
  Reply
#35
(03-27-2018, 08:11 AM)donkykong017 Wrote:
(03-26-2018, 05:19 PM)tommiehansen Wrote: Oh... Why don't you run your backtesting on your work computer?

This would be preferrable since your work computer probably is a desktop and could run 24/7 much, much... better then your laptop.
If you got a little $$$ laying around you could also buy a small box with some older desktop i5/i7 that still would be much faster then your laptop (due to the fact that it's desktop class...). You can basically find this on eBay or anywhere else for under $200.

To simply remote into it (and check stuff from home) use something simple such as TeamViewer that doesn't require you to become an expert on remote access security and stuff like that.

Running stuff 24/7 on a laptop isn't something i would recommend.
I use mine mainly for testing, not really for doing 2h+ runs...

yeah work pc is not an option definitely. and its also a laptop. Dodgy
i bought the laptop just few weeks ago. and it has to be portable and its not dedicated to running backtests primarily but atm its what its good for and i guess it will do.
yeah all the remote stuff i did that and tried it just dont have a good pc to do that and no good possibilty to remote access from work (its all locked down). if backtesting gets more important and is not possible to run on the laptop anymore i will consider buying some work machine for at home.

Quote:1. No, try reloading it for real since it might have dropped links to etc (or your server might differ from mine thus it not finding stylesheets etc).
Edit: Come to think of it i hardcoded the basePath to /gab/ so if you got any other dir it'll break. This stuff happens when one codes at night, will fix @ future.

2. Yes, there is no 'select.php'; it has been renamed to index.php since 'select' will be the default start screen anyway.
 yeah will have a look at whats new when i have the time. (have my laptop with me) Tongue


edit1:
just used the latest version. this it what it looks like. there are also some errors and warnings

Edit2:
sry errors are because of gekko not running. stupid me. the interface is still the same..


I've found the solution for the UI - in system/conf.php you have to change the following:

$conf['urls'] = [
                'system' => $base_url . 'system/',
                'results' => $base_url . 'results/',
                'assets' => $base_url . 'assets/',


to 

$conf['urls'] = [
                'system' => $base_url . '/system/',
                'results' => $base_url . '/results/',
                'assets' => $base_url . '/assets/',
  Reply
#36
Thanks for the heads up tommie and dont worry - you're doing an awesome job within your limited time.

Edit: Windows 10 here now - everything seems to work, i get results (except i had to tune the base path in conf.php to $base_path = str_replace('\system', '/',$dirRoot); in order to get the paths working).
I don't know if this is the reason but the runner does not consider the strat parameter range - it just executes 500 runs with somehow random parameters which are often outside of the range i previously defined.

When choosing the debug run it shows a similar behaviour - very interesting is the fact that it also trys to go through 500 runs even though I have not defined any flexible parameters (so it should be exactly 1 run).

I use XAMPP with latest apache and php versions, Gekko has been installed with your script (thanks for that!)
  Reply
#37
(03-27-2018, 05:01 PM)fablerII Wrote:
(03-27-2018, 08:11 AM)donkykong017 Wrote:
(03-26-2018, 05:19 PM)tommiehansen Wrote: Oh... Why don't you run your backtesting on your work computer?

This would be preferrable since your work computer probably is a desktop and could run 24/7 much, much... better then your laptop.
If you got a little $$$ laying around you could also buy a small box with some older desktop i5/i7 that still would be much faster then your laptop (due to the fact that it's desktop class...). You can basically find this on eBay or anywhere else for under $200.

To simply remote into it (and check stuff from home) use something simple such as TeamViewer that doesn't require you to become an expert on remote access security and stuff like that.

Running stuff 24/7 on a laptop isn't something i would recommend.
I use mine mainly for testing, not really for doing 2h+ runs...

yeah work pc is not an option definitely. and its also a laptop. Dodgy
i bought the laptop just few weeks ago. and it has to be portable and its not dedicated to running backtests primarily but atm its what its good for and i guess it will do.
yeah all the remote stuff i did that and tried it just dont have a good pc to do that and no good possibilty to remote access from work (its all locked down). if backtesting gets more important and is not possible to run on the laptop anymore i will consider buying some work machine for at home.

Quote:1. No, try reloading it for real since it might have dropped links to etc (or your server might differ from mine thus it not finding stylesheets etc).
Edit: Come to think of it i hardcoded the basePath to /gab/ so if you got any other dir it'll break. This stuff happens when one codes at night, will fix @ future.

2. Yes, there is no 'select.php'; it has been renamed to index.php since 'select' will be the default start screen anyway.
 yeah will have a look at whats new when i have the time. (have my laptop with me) Tongue


edit1:
just used the latest version. this it what it looks like. there are also some errors and warnings

Edit2:
sry errors are because of gekko not running. stupid me. the interface is still the same..


I've found the solution for the UI - in system/conf.php you have to change the following:

$conf['urls'] = [
                'system' => $base_url . 'system/',
                'results' => $base_url . 'results/',
                'assets' => $base_url . 'assets/',


to 

$conf['urls'] = [
                'system' => $base_url . '/system/',
                'results' => $base_url . '/results/',
                'assets' => $base_url . '/assets/',

thx for the help. but sadly that did not work for me
  Reply
#38
Sorry, i have tried recreated the problems you're having but can't.
Make sure you're actually on the latest versions and don't 1 or 2 files that hasn't been updated.

To be really sure, do this:
rename your 'gab'-folder to gab_old (or something) to keep your old data (then you can just copy over the results folder)

go to your www/var/whatever-dir (where you add stuff) and:
git pull https://github.com/tommiehansen/gab.git

..or simply download the last version and unzip somewhere and test.

And then test that version to see if there's any difference.

[Image: Pbc5Dd7.png]
  Reply
#39
Updates

1. CLI has been update. Now supports date-range etc and misc stuff.
2. Date-selection for datasets has been fixed (but not available in GUI yet)

Screen

[Image: Hot7oeg.png]


To update

git pull in your gab-dir
..or clone or download:
git clone https://github.com/tommiehansen/gab.git
  Reply
#40
Thank you very much for the update.
When I run the command line, I get:

========================================================

GAB CLI
http://localhost:8889/gab/system/post.php

========================================================

INFO > Running RSI_BULL_BEAR_ADX using 1 thread(s)
INFO > To quit hold CTRL+C



17:55:56: . [ Exec: 0m 0s / Duration: 0h 0m / Total runs: 1 ]
17:55:56: . [ Exec: 0m 0s / Duration: 0h 0m / Total runs: 2 ]
17:55:56: . [ Exec: 0m 0s / Duration: 0h 0m / Total runs: 3 ]
17:55:56: . [ Exec: 0m 0s / Duration: 0h 0m / Total runs: 4 ]
17:55:56: . [ Exec: 0m 0s / Duration: 0h 0m / Total runs: 5 ]
17:55:56: . [ Exec: 0m 0s / Duration: 0h 0m / Total runs: 6 ]
17:55:56: . [ Exec: 0m 0s / Duration: 0h 0m / Total runs: 7 ]
17:55:56: . [ Exec: 0m 0s / Duration: 0h 0m / Total runs: 8 ]
17:55:56: . [ Exec: 0m 0s / Duration: 0h 0m / Total runs: 9 ]
17:55:56: . [ Exec: 0m 0s / Duration: 0h 0m / Total runs: 10 ]
17:55:56: . [ Exec: 0m 0s / Duration: 0h 0m / Total runs: 11 ]
17:55:56: . [ Exec: 0m 0s / Duration: 0h 0m / Total runs: 12 ]
17:55:56: . [ Exec: 0m 0s / Duration: 0h 0m / Total runs: 13 ]
17:55:56: . [ Exec: 0m 0s / Duration: 0h 0m / Total runs: 14 ]
17:55:56: . [ Exec: 0m 0s / Duration: 0h 0m / Total runs: 15 ]
17:55:56: . [ Exec: 0m 0s / Duration: 0h 0m / Total runs: 16 ]
17:55:56: . [ Exec: 0m 0s / Duration: 0h 0m / Total runs: 17 ]
17:55:56: . [ Exec: 0m 0s / Duration: 0h 0m / Total runs: 18 ]
17:55:57: . [ Exec: 0m 1s / Duration: 0h 0m / Total runs: 19 ]

So it's not really doing anything. When I access it in the gui it gives me

Warning: Division by zero in /var/www/html/gab/system/runner.php on line 352
Success! Performed 0% better

In the CLI output I also notice the port (your output and mine). Is that correct?

Thanks a lot
  Reply


Forum Jump:


Users browsing this thread: