Giter VIP home page Giter VIP logo

gab's People

Contributors

nichdiekuh avatar sirtificate avatar tommiehansen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gab's Issues

Allow multiple servers to be used

Basically allow server to become an array of servers.
This to make it possible for users to max out on number of threads.

Also maybe create some tool to sync primary servers Gekko history + strategies + toml's with these other slave servers or make it some sort of mandatory thing for running multi-server runs (or just add some checks for this that forces the user to keep things in sync).

Uncaught Exception: Unknown primative for `'no'` on line 2.

Hello
Seem that someting in the parser function did't work correctly.

PHP says:
[Sat Mar 24 09:04:58.802581 2018] [php7:error] [pid 27543] [client 127.0.0.1:49124] PHP Fatal error: Uncaught Exception: Unknown primative for 'no' on line 2. in /data/gab/system/class.toml.php:177\nStack trace:\n#0 /data/gab/system/class.toml.php(122): Toml\Parser->parseValue(''no'')\n#1 /data/gab/system/class.toml.php(79): Toml\Parser->processLine('buyImmediately ...')\n#2 /data/gab/system/class.toml.php(25): Toml\Parser->parse()\n#3 /data/gab/system/class.gab.php(131): Toml\Parser::fromString('buyImmediately ...')\n#4 /data/gab/system/class.gab.php(73): GAB\core->parse_toml('buyImmediately ...')\n#5 /data/gab/runner.php(34): GAB\core->get_strategies()\n#6 {main}\n thrown in /data/gab/system/class.toml.php on line 177

Gekko says:
--> POST /api/backtest 200 2,579ms 39.34kb
<-- POST /api/backtest
2018-03-24 10:17:51 (INFO): Setting up Gekko in backtest mode
2018-03-24 10:17:51 (INFO):
2018-03-24 10:17:51 (INFO): Setting up:
2018-03-24 10:17:51 (INFO): Trading Advisor
2018-03-24 10:17:51 (INFO): Calculate trading advice
2018-03-24 10:17:52 (INFO): Using the strategy: RSI_BULL_BEAR_ADX
2018-03-24 10:17:52 (INFO): ====================================
2018-03-24 10:17:52 (INFO): Running RSI Bull and Bear + ADX
2018-03-24 10:17:52 (INFO): ====================================
2018-03-24 10:17:52 (INFO): Make sure your warmup period matches SMA_long and that Gekko downloads data if needed
2018-03-24 10:17:52 (WARN): *** WARNING *** Your Warmup period is lower then SMA_long. If Gekko does not download data automatically when running LIVE the strategy will default to BEAR-mode until it has enough data.
2018-03-24 10:17:52 (INFO):

2018-03-24 10:17:52 (INFO): Setting up:
2018-03-24 10:17:52 (INFO): Paper Trader
2018-03-24 10:17:52 (INFO): Paper trader that simulates fake trades.
2018-03-24 10:17:52 (INFO):

2018-03-24 10:17:52 (INFO): Setting up:
2018-03-24 10:17:52 (INFO): Performance Analyzer
2018-03-24 10:17:52 (INFO): Analyzes performances of trades
2018-03-24 10:17:52 (INFO):

2018-03-24 10:17:52 (INFO): Scanning local history for backtestable dateranges.
2018-03-24 10:17:52 (DEBUG): Available 282204
2018-03-24 10:17:52 (DEBUG): Optimal 438632
2018-03-24 10:17:52 (INFO): The database has 156429 candles missing, Figuring out which ones...
2018-03-24 10:17:52 (INFO): Gekko detected multiple dateranges in the locally stored history. Please pick the daterange you are interested in testing:
2018-03-24 10:17:52 (INFO): OPTION 1:
2018-03-24 10:17:52 (INFO): from: 2017-05-23 19:15:00
2018-03-24 10:17:52 (INFO): to: 2017-09-05 01:15:00
2018-03-24 10:17:52 (INFO): OPTION 2:
2018-03-24 10:17:52 (INFO): from: 2017-12-22 15:15:00
2018-03-24 10:17:52 (INFO): to: 2018-03-22 19:15:00
2018-03-24 10:17:52 (INFO): OPTION 3:
2018-03-24 10:17:52 (INFO): from: 2018-03-22 21:15:00
2018-03-24 10:17:52 (INFO): to: 2018-03-24 09:15:00
prompt: option:

Note:
The dataset selected from the GIU is the second one, if i select it manually the simulation works correctly.

Add let GAB show negative results too

With further analysis of the results, it is possible to locate the sweet spot of some settings. E.g.: In the following picture there are the results of the setting threshold_buy of one of my strategies.

threshold_buy

On the diagramm you can see, there is a limit near 0.8. So therefore it would be interesting also to have some information of the negative results. So therefore my request to show and save also the negative results. Maybe optional. What do you think?

curl problem

hi!
I installed XAMPP with PHP version 7.1+ and wanted to use GA to select parameters, but I always get an error:
16:00:59 Runner.php ERROR: Running config via curl_post() did not return data.
url: http://localhost:3000/api/backtest | curl status: 0 - No data

Prompt, please, in what there can be a problem?

Add database name in MySQL section

After switching to MySQL i noticed a mess up with the database names inside, due to the lots of sets. Therefore my suggestion to add a name in MySQL for the database like:

Example for mysql: '127.0.0.1:3306,DatabsaeName,TommieHansenIsTheBest,MySuperPassword'

Under MySQL there coud the be a singe datbase set like 'gab'.

In gekko itself there is in sample-config.js with a similar option for the postgresql database. There you can optional set a name for the databese inside postgresql. Not shure, ift this works in MySQL too.

// Postgres adapter example config (please note: requires postgres >= 9.5): config.postgresql = { path: 'plugins/postgresql', version: 0.1, connectionString: 'postgres://user:pass@localhost:5432', // if default port database: null, // if set, we'll put all tables into a single database. schema: 'public', dependencies: [{ module: 'pg', version: '6.1.0' }] }

Maybe you agree and can add this feature.
Thank you for your hard work and shareing this wonderful software.

Sending all strategies on POST may cause errors

Currently the entire form is send but this also include all strategies loaded.

Problem with this is that the user can have strategies that contain exotic values and this can cause things to basically error out.

Changing this behaviour requires the state-saving of strategies to change or that some filter is applied before doing the POST requests so that strategy params that will not be used are simply filtered out.

Add 'multi-asset' mode

Basically let the user select multiple datasets and test a strategy against all these datasets in the same run and then output this combined runs in a combined database file.

Why?
Because it makes sense that one would like to test strategy params on multiple asset/currency pairs and check what generally works best for all these.

For this to work

  1. Change radio-buttons to select-boxes @ Run
  2. Randomly use of these and send to post.php
  3. Modify post.php to get that this is a multi-run and thus create a combined results data set
  4. Add new columns in the db if it's a multi-run (need to know the pairs e.g:
    { exchange: Binance, currency: USD, asset: ETH }
  5. Change some logic that would be required to change in order for multi-asset-runs to work.

Runner.php Line 203 dies

I do have php-curl installed.
Strategy is running until that point and this error message accumulates once per run.

gekko output reads. The next out put after this is the "finished". The database result file is there but has 24kb and view.php shows the result, but "get data" crashes.

Any hint welcome!

2018-03-22 19:20:25 (INFO): ====================================
2018-03-22 19:20:25 (INFO): Running RSI Bull and Bear + ADX
2018-03-22 19:20:25 (INFO): ====================================
2018-03-22 19:20:25 (INFO): Make sure your warmup period matches SMA_long and that Gekko downloads data if needed
2018-03-22 19:20:25 (WARN): *** WARNING *** Your Warmup period is lower then SMA_long. If Gekko does not download data automatically when running LIVE the strategy will default to BEAR-mode until it has enough data.
2018-03-22 19:20:25 (INFO):

2018-03-22 19:20:25 (INFO): Setting up:
2018-03-22 19:20:25 (INFO): Paper Trader
2018-03-22 19:20:25 (INFO): Paper trader that simulates fake trades.
2018-03-22 19:20:25 (INFO):

2018-03-22 19:20:25 (INFO): Setting up:
2018-03-22 19:20:25 (INFO): Performance Analyzer
2018-03-22 19:20:25 (INFO): Analyzes performances of trades
2018-03-22 19:20:25 (INFO):

2018-03-22 19:20:26 (INFO): Scanning local history for backtestable dateranges.
2018-03-22 19:20:26 (DEBUG): Available 1184013
2018-03-22 19:20:26 (DEBUG): Optimal 1184012
2018-03-22 19:20:26 (INFO): Gekko is able to fully use the local history.
2018-03-22 19:20:26 (INFO): Gekko was able to find a single daterange in the locally stored history:
2018-03-22 19:20:26 (INFO): from: 2015-12-17 10:57:00
2018-03-22 19:20:26 (INFO): to: 2018-03-18 16:29:00
2018-03-22 19:20:26 (INFO): WARNING: BACKTESTING FEATURE NEEDS PROPER TESTING
2018-03-22 19:20:26 (INFO): WARNING: ACT ON THESE NUMBERS AT YOUR OWN RISK!

Another "Uncaught Exception: Unknown primative for `'no'` on line 2."

Sorry to re-address this issue, but I'm encountering the same problem as in #4 :

Fatal error:  Uncaught Exception: Unknown primative for `'no'` on line 2. in /var/www/html/gab/system/class.toml.php:176
Stack trace:
#0 /var/www/html/gab/system/class.toml.php(121): Toml\Parser->parseValue(''no'')
#1 /var/www/html/gab/system/class.toml.php(78): Toml\Parser->processLine('buyImmediately ...')
#2 /var/www/html/gab/system/class.toml.php(24): Toml\Parser->parse()
#3 /var/www/html/gab/system/class.gab.php(178): Toml\Parser::fromString('buyImmediately ...')
#4 /var/www/html/gab/system/class.gab.php(67): GAB\core->parse_toml('buyImmediately ...')
#5 /var/www/html/gab/system/runner.php(42): GAB\core->get_strategies()
#6 {main}
  thrown in /var/www/html/gab/system/class.toml.php on line 176

Freshly installed today. Already tried a newly created dataset.
Sanity check looks happy:

PHP EXTENSIONS
OK
DIRECTORY CREATION TEST
OK
PHP VERSION
OK You are running: 7.2.10-0ubuntu0.18.04.1
PHP MEMORY
OK Your PHP has 512M available
PHP MAX EXECUTION TIME
OK Your max execution time is 900 seconds (15 minutes)
SQLITE CREATE DATABASE TEST
OK
SQLITE INSERT TEST
OK

Initially I had MySQL, same problem, so now I'm trying with sqlite.

Any ideas perhaps? And where would I find the logging that izevar mentioned:

Gekko says:
--> POST /api/backtest 200 2,579ms 39.34kb
<-- POST /api/backtest
2018-03-24 10:17:51 (INFO):	Setting up Gekko in backtest mode
2018-03-24 10:17:51 (INFO):
2018-03-24 10:17:51 (INFO):	Setting up:
2018-03-24 10:17:51 (INFO):	Trading Advisor

I'm running gekko --ui. (v0.6.8). Backtests in Gekko UI work fine.

Hopefully someone can help me :-)

Thanks!

GAB roundtrips are not the same as Gekko roundtrips

Expected Result:
With same strategy (RSI BULL BEAR), same strategy parameters, same dataset, the roundtrips shown in "View Run" of GAB should be the same as roundtrips shown in Gekko backtest.

Actual Result:
The roundtrips are totally different.

Steps to reproduce:

  1. Gekko successfully installed
  2. Gekko UI successfully run
  3. Gekko import data for one single dataset "A"
  4. GAB successfully installed and run
  5. On the page http://localhost//gab/index.php, under Run Stratgey, select the same dataset "A"
  6. Select RSI_BULL_BEAR as the strategy
  7. Define a simple set of parameter with not many variations (for testing purpose)
  8. Let it run for some time, STOP IT, go to View Runs
  9. Open one of the top run
  10. Use the parameters stored for that run in GAB to run a backtest in Gekko
  11. Compare the roundtrips shown in GAB and Gekko

Same dataset

gab same datasets

Same strategy and parameters

gab same parameter

Different roundtrips

gab different roundtrips

Request: Indicate the total number of runs

It is easy to misjudge the number of runs you make the system do.
Would it be hard to show how many runs there are in total going to be aside the "completed".

Btw I would be willing to help here. My PHP is rusty at best and I don't know if you are looking for contributions

Notice: Undefined ... When clicking on GET DATA in View runs

Notice: Undefined offset: 0 in /var/www/html/gab/view.php on line 340

Notice: Undefined property: stdClass::$market_profit in /var/www/html/gab/view.php on line 341

Notice: Undefined property: stdClass::$strategy_profit in /var/www/html/gab/view.php on line 342

Notice: Undefined property: stdClass::$sharpe in /var/www/html/gab/view.php on line 359

Notice: Undefined property: stdClass::$trades in /var/www/html/gab/view.php on line 359

Notice: Undefined property: stdClass::$trades_win_percent in /var/www/html/gab/view.php on line 359

Notice: Undefined property: stdClass::$trades_win_avg in /var/www/html/gab/view.php on line 360

Notice: Undefined property: stdClass::$trades_lose_avg in /var/www/html/gab/view.php on line 360

Notice: Undefined property: stdClass::$trades_best in /var/www/html/gab/view.php on line 361

Notice: Undefined property: stdClass::$trades_worst in /var/www/html/gab/view.php on line 361

Notice: Undefined property: stdClass::$candle_size in /var/www/html/gab/view.php on line 362

Notice: Undefined property: stdClass::$trades_per_day in /var/www/html/gab/view.php on line 362

Notice: Undefined property: stdClass::$id in /var/www/html/gab/view.php on line 364

##############################################################################

Notice: Undefined offset: 0 in /var/www/html/gab/system/functions.php on line 158

Warning: Invalid argument supplied for foreach() in /var/www/html/gab/system/functions.php on line 161

Date selection might cause issues

When using e.g. 2017-01-01 it might cause issues since Gekko doesn't always correctly interpret this as "the first time found for this date" even though it mostly does it. It's an odd quirk in Gekko that can cause some errors sometimes resulting in cURL 500 errors which in most cases mean that Gekko UI just returned errors.

The option could be made to simply use the standard Gekko format; y-m-d hh:mm, but the format is stupid and arcaic. Another solution is to always set the timestamp to e.g. 15:00 since Gekko's tolerance for "non-found" seem to be +/-5 hours or something similar.

Attempt to modify property 'daterange' of non-object in /var/www/html/gab/system/class.gab.php on line 323

I'm able to run the scripts ok, but I get this in the log for each attemp

Attempt to modify property 'daterange' of non-object in /var/www/html/gab/system/class.gab.php on line 323

also have a few lines at the top of the page -

Notice: Undefined offset: 0 in /var/www/html/gab/index.php on line 65

Notice: Trying to access array offset on value of type null in /var/www/html/gab/index.php on line 65

Notice: Undefined offset: 0 in /var/www/html/gab/index.php on line 66

Notice: Trying to access array offset on value of type null in /var/www/html/gab/index.php on line 66

Notice: Undefined offset: 0 in /var/www/html/gab/index.php on line 107

Notice: Trying to access array offset on value of type null in /var/www/html/gab/index.php on line 110

Notice: Trying to access array offset on value of type null in /var/www/html/gab/index.php on line 111

any way I can straighten these out? I appreciate the software!

datasets non-object on fresh run

sorry if you don't accept issues. I get

Notice: Trying to get property of non-object in /var/www/html/gab/system/class.gab.php on line 119
Warning: Invalid argument supplied for foreach() in /var/www/html/gab/select.php on line 83

gekko has datasets available in the ui.
At first I thought this was a missing / in the conf.php server variable, but that didn't fix it.

The only thing I have odd in my setup is that I copied gab to /var/www/html.
Using a symlink there and having it in the gekko dir doesn't make a difference though.

Any hint on what this might be?

Facing issues with getting the setup running

Hi @tommiehansen,

First of all, fantastic work with the tool. The UI is just exceptional!

I am facing issues with getting the setup running. Perhaps you can help me you? This is the errors I see

image

And

Warning: Invalid argument supplied for foreach() in /Users/AdityaNayak/Bots/trading/gab/system/class.gab.php on line 63

I have PHP 7.1.2 on mac OS with the latest SQL lite

Add ability to set date ranges for set(s)

Allow user to set specific date range for a set and debug why it previously has not worked (and thus isn't included).

Also add a friendly datepicker to pick the ranges.

Not sure if I've completely set things up correctly

I'm using Gekko / GAB to learn more about Linux. I can find my way around, but I'm not an expert.

So this might be an easy one, but I:

  • have a working Gekko install (on a cloud server via nginx reverse proxy)
  • I've done these prereqs: sudo apt-get install php-fpm php-mysql php7.0-sqlite3
  • Can't see anything between the gekko header and footer at https://<my.pub.lic.ip>/#/gab
  • Running this at the command line gives the following output: sudo bash run.sh cli/RSI_BULL_BEAR_ADX.sh

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

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

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

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

SETTINGS >
ETC / USDT @ poloniex
Candle: 5:15,5 min History: 10

Let's go! Lambo generator started.

bash: line 1: ./curl.sh: Permission denied
bash: line 1: ./curl.sh: Permission denied
bash: line 1: ./curl.sh: Permission denied
bash: line 1: ./curl.sh: Permission denied
bash: line 1: ./curl.sh: Permission denied

Add relational math based dynamic parameters

Relational/inheritance for dynamic parameters.

Basically a new add-on that makes it possible for myParam 2 to inherit it's base value from myParam.

Samples:

UseMIN:MAX range
long = 500:1000,200
short = @long/4:@long/2
Just use modifier without range
long = 500:1000,200
short = @long/2

Sample result:

long = 500
short = 250

The benefit of this is that sometimes one want B to be a fraction of A which makes it unnecessary to set a static range.

There's also this obvious problem:

long = 50:500,50
short = 10:100,10

In the above case many runs will become basically useless since if e.g. long and short is SMA values the strategy and run most probably would fail miserably every time short has a higher dynamic value then long.

This could be solved with this new param modifier.

@todo Find a parsing behaviour that:

  1. That make the variables as intuitive as possible (may use @ the 'at' sign)
  2. Deals with any bad strings: @long / 4, @long / 4 , @long * 0.2 should work etc.

Fix sorting for tables

Use another library for sorting tables since the current one isn't good enough and thus have problems with all sorts of values.

Current/Asset Differ from Gekko to GAB

I noticed that my back tests wern't working as expected, I also ran the numbers from GAB in gekko back testing and found weird issues.

I've now noticed that the Currency and Assett are switched around when importing into GAB.. i.e. currency/asset BTC/ETH now becomes currency/asset ETH/BTC and then the back test are invalid?

Failing due to issue with PEAR when implementing on XAMPP

I'm trying to implement this on XAMPP, but get the following issue:

Warning: require(./views/header.php): failed to open stream: No such file or directory in C:\xampp\htdocs\system\conf.php on line 183

Fatal error: require(): Failed opening required './views/header.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\system\conf.php on line 183

PEAR is standard on XAMPP and there shouldn't be an issue with PEAR otherwise. I've tried a few potential workarounds by hardcoding the PEAR directory path, but no dice. Appreciate any feedback.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.