Coder Social home page Coder Social logo

japonicus's Introduction

What is japonicus and what it does

This is an implementation of genetic algorithm & bayesian evolution to develop strategies for digital coin trading bot Gekko.

So you make a good strat, or get one from the internetz. Make sure its good, because this is not about miracles.

If you get good profit on strat standard settings or some random settings you made up, japonicus can find some setting set that improves the strategy, on some specific market/currency or overall.

Discord Group: https://discord.gg/kYKHXnV

Instructions

Japonicus works on python>=3.6! Check wiki for instructions on setup, workflow, methods, etc.

Disclaimer

No matter how many years your training candles span or how convoluted or simple is your strategy, your strategies/parameters that were profitable on backtest runs probably won't translate well to live trading.
Altough japonicus is a fairly competent GA and will find a capable set of parameters in a few epoches, we're yet to discover why the live trading runs seem an environment completely unrelated to backtest env, where strategies/parameters that seemed good offline turn into live daily losses or below market gains.

You can send me a few coins to help me develop some ideas for binance trading bots, as this kind of research involves a steady negative profit so I cannot sustain it indefinitely... If something starts working I will share here or in our discord group. Those are my binance wallets:

LTC	LVhThMzJMC6aKBcA1KX4q3yk2ryBjfPGfH
ETH	0xceaa9bb655ed80ba36b55532fdd6e11e6e5b681b

User Feedback

You all users of japonicus should report notable runs under an issue. If some strat seems to be viable, send feedback so users can have a better point of entry for their own runs.

Future

Genetic Algorithms are a good way to fetch a good set of settings to run a strategy on gekko.
But the real gamechanger is the strategy itself.
The ideal evolution method would be a Genetic Programming that modifies strategy logic.
This somewhat corresponds to --skeleton mode of japonicus, which lets the GA select indicators on a base strategy.

Changelog

The changelog is important for the user as following modifications can cause bugs on related areas. Please report 'em ;)

v0.92
- Moving all gekko related functions to evaluation.gekko module. The purpose is making japonicus a general purpose
GA framework.


v0.91

- the evolution candle date ranges are now defined by given area in the map, instead of attached at each locale.


v0.90 

- web interface reworked - now it is the recommended method to run the ga's.
- locale creation/destruction chances updated.
- bayesian evolution method deprecated.

v0.80 

- supports gekko v0.6.X (only).
- Dockerfile and docker-compose methods revisited.
- automatic filter for multiple remote gekko urls (urls defined inside settings/global)
- live trading bot watcher at `jlivetrader.py`. For binance only, undocumented and experimental.


v0.70 

- log folder restructured
- configStrategies.py DEPRECATED; use only TOML parameters at the folder strategy_parameters.
    check TOML special syntax for parameter ranges at the wiki
- GA benchmark mode added
- Settings.py refactor
- Roundtrip exposure time filter


v0.58

- runs in Windows (not confirmed)
- Settings parameters can be passed on command line (check the --help)
- Multiple evolution datasets can be passed. `@Settings.py:dataset ->
  dataset_source is the first, add dataset_source1; dataset_source2 and so forth
for multiple datasets.`
- filter individues for minimum trade count (default: enabled@16 trades)
- backtest scores (profit and sharpe) to individue final score method is now a sum, not multiplication

v0.56 

- japonicus settings for strategies can be stored at strategy_parameters folder as .toml files
- automated refactor on entire codebase
- wiki is online, check it for instructions.
- various bugfixes
- log & results improvements
- daterange for locales now on locale logs (.csv)
- statistics methods remade.

v0.54

- Variation of Backtest result interpretation. check Settings.py -> genconf.interpreteBacktestProfit
- Focus on selecting best individues. Periodic evaluation on more candidates. Bugfixes on that department. 
- Result interface actually readable.
- Log better structured, with the summary at the top.
- Small clarifications on code.

v0.53

- Major aesthetics rework on code itself; now we can even have collaborators.
- Pretty run logs @ logs folder;
- Interchangeable backtest result interpretation (promoterz.evaluation.gekko:25)
- gekko API is now organized - backtest & dadataset functions separated.
- Genetic Algorithm settings controllable via command line. Check --help.
- Web interface more stable

v0.51
- Started tracking updates on changelog;

japonicus's People

Contributors

caux avatar decharel avatar gab0 avatar iamtheiam avatar itenev avatar joernroeder avatar jsdelivrbot avatar lenzoburger avatar mainyaa avatar ptkv avatar stephenthoma avatar xfffff 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  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  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

japonicus's Issues

An attempt has been made to start a new process before the current process has finished

Hi,

Attempting to run via python japonicus.py -g --repeat 10 -i -w and returning an error as below. I'm not sure where to begin troubleshooting this one. I'd use a custom strategy to test against, but I have none defined and the stock ones are pretty hit and miss when using gekkoGA, figured they would be with gekkoJaponicus too.

Python 3.6.1
latest numpy (pip install numpy --upgrade)

using candlestick dataset 2017-06-10 09:03:00 to 2017-12-10 07:42:00

        ======  EPOCH 0/400  ======
Locale1
first unevaluated: 30
0 individues removed due to equality
[30]
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Python36\lib\multiprocessing\spawn.py", line 105, in spawn_main
    exitcode = _main(fd)
  File "C:\Python36\lib\multiprocessing\spawn.py", line 114, in _main
    prepare(preparation_data)
  File "C:\Python36\lib\multiprocessing\spawn.py", line 225, in prepare
    _fixup_main_from_path(data['init_main_from_path'])
  File "C:\Python36\lib\multiprocessing\spawn.py", line 277, in _fixup_main_from_path
    run_name="__mp_main__")
  File "C:\Python36\lib\runpy.py", line 263, in run_path
    pkg_name=pkg_name, script_name=fname)
  File "C:\Python36\lib\runpy.py", line 96, in _run_module_code
    mod_name, mod_spec, pkg_name, script_name)
  File "C:\Python36\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\Win10EntVM\Downloads\gekko-stable\gekko-stable\gekkoJaponicus\japonicus.py", line 99, in <module>
    gekko_generations(TargetParameters, GenerationMethod, EvaluationMode, web=APP)
  File "C:\Users\Win10EntVM\Downloads\gekko-stable\gekko-stable\gekkoJaponicus\evolution_generations.py", line 103, in gekko_generations
    World.runEPOCH()
  File "C:\Users\Win10EntVM\Downloads\gekko-stable\gekko-stable\gekkoJaponicus\promoterz\sequence\parallel_world.py", line 12, in world_EPOCH
    LOCALE.run()
  File "C:\Users\Win10EntVM\Downloads\gekko-stable\gekko-stable\gekkoJaponicus\promoterz\locale.py", line 51, in run
    self.loop(self.World, self)
  File "C:\Users\Win10EntVM\Downloads\gekko-stable\gekko-stable\gekkoJaponicus\promoterz\sequence\standard_loop.py", line 33, in standard_loop
    locale.extraStats['nb_evaluated'], locale.extraStats['avgTrades'] = World.parallel.evaluatePopulation(locale)
  File "C:\Users\Win10EntVM\Downloads\gekko-stable\gekko-stable\gekkoJaponicus\promoterz\evaluationPool.py", line 60, in evaluatePopulation
    results[A] = results[A].get(timeout=timeout)
  File "C:\Python36\lib\multiprocessing\pool.py", line 644, in get
    raise self._value
  File "C:\Python36\lib\multiprocessing\pool.py", line 119, in worker
    result = (True, func(*args, **kwds))
  File "C:\Users\Win10EntVM\Downloads\gekko-stable\gekko-stable\gekkoJaponicus\promoterz\evaluationPool.py", line 30, in evaluateBackend
    P = Pool(self.poolsizes[I])
  File "C:\Python36\lib\multiprocessing\context.py", line 119, in Pool
    context=self.get_context())
  File "C:\Python36\lib\multiprocessing\pool.py", line 174, in __init__
    self._repopulate_pool()
  File "C:\Python36\lib\multiprocessing\pool.py", line 239, in _repopulate_pool
    w.start()
  File "C:\Python36\lib\multiprocessing\process.py", line 105, in start
    self._popen = self._Popen(self)
  File "C:\Python36\lib\multiprocessing\context.py", line 322, in _Popen
    return Popen(process_obj)
  File "C:\Python36\lib\multiprocessing\popen_spawn_win32.py", line 33, in __init__
    prep_data = spawn.get_preparation_data(process_obj._name)
  File "C:\Python36\lib\multiprocessing\spawn.py", line 143, in get_preparation_data
    _check_not_importing_main()
  File "C:\Python36\lib\multiprocessing\spawn.py", line 136, in _check_not_importing_main
    is not going to be frozen to produce an executable.''')
RuntimeError:
        An attempt has been made to start a new process before the
        current process has finished its bootstrapping phase.

        This probably means that you are not using fork to start your
        child processes and you have forgotten to use the proper idiom
        in the main module:

            if __name__ == '__main__':
                freeze_support()
                ...

        The "freeze_support()" line can be omitted if the program
        is not going to be frozen to produce an executable.
^C
C:\Users\Win10EntVM\Downloads\gekko-stable\gekko-stable\gekkoJaponicus>

AssertionError

Hi,
When I launch a test with MACD python3 japonicus.py -gc --strat MACD
I have this error : https://pastebin.com/DHAJkWvQ (Complete error)

Traceback (most recent call last):
File "japonicus.py", line 93, in
gekko_generations(TargetParameters, GenerationMethod, EvaluationMode)
File "/root/gekkoJaponicus/evolution_generations.py", line 103, in gekko_gener
World.runEPOCH()
File "/root/gekkoJaponicus/promoterz/sequence/parallel_world.py", line 12, in
LOCALE.run()
File "/root/gekkoJaponicus/promoterz/locale.py", line 51, in run
self.loop(self.World, self)
File "/root/gekkoJaponicus/promoterz/sequence/standard_loop.py", line 73, in s
assert(len(locale.population))
AssertionError

It works fine with the RSI strategy.
I do not know where it can come from.

Thanks

CSV file not created at start

Traceback (most recent call last):
File "japonicus.py", line 63, in
gekko_generations(strat, GenerationMethod)
File "/opt/neural/evolution_generations.py", line 125, in gekko_generations
write_evolution_logs(W, Stats)
File "/opt/neural/coreFunctions.py", line 112, in write_evolution_logs
os.remove(filename)
FileNotFoundError: [Errno 2] No such file or directory: 'output/evolution_gen.csv'

Add Dockerfile

i would love to run this insinde a docker container :)

evolution_bayes.py 'global' key error

In line 22, in the getsettings ('global') statement, the 'global' key takes the first one in uppercase as represented in the settings.py file.
Change
gsettings = getSettings()['global']
for
gsettings = getSettings()['Global']

Thank you very much for your work.
Cheers.

FileNotFoundError: File b'output\\evolution_gen.csv' does not exist

ST]
Traceback (most recent call last):
File "C:\Users\HMA\AppData\Local\Programs\Python\Python36-32\lib\site-packages
\flask\app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "C:\Users\HMA\AppData\Local\Programs\Python\Python36-32\lib\site-packages
\flask\app.py", line 1614, in full_dispatch_request
rv = self.handle_user_exception(e)
File "C:\Users\HMA\AppData\Local\Programs\Python\Python36-32\lib\site-packages
\flask\app.py", line 1517, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "C:\Users\HMA\AppData\Local\Programs\Python\Python36-32\lib\site-packages
\flask_compat.py", line 33, in reraise
raise value
File "C:\Users\HMA\AppData\Local\Programs\Python\Python36-32\lib\site-packages
\flask\app.py", line 1612, in full_dispatch_request
rv = self.dispatch_request()
File "C:\Users\HMA\AppData\Local\Programs\Python\Python36-32\lib\site-packages
\flask\app.py", line 1598, in dispatch_request
return self.view_functionsrule.endpoint
File "C:\Users\HMA\AppData\Local\Programs\Python\Python36-32\lib\site-packages
\dash\dash.py", line 551, in dispatch
return self.callback_map[target_id]'callback'
File "C:\Users\HMA\AppData\Local\Programs\Python\Python36-32\lib\site-packages
\dash\dash.py", line 508, in add_context
output_value = func(*args, **kwargs)
File "c:\gekkoJaponicus-master\web.py", line 103, in update_graph
df = load_evolution_logs()
File "c:\gekkoJaponicus-master\web.py", line 23, in load_evolution_logs
df = pd.read_csv(filename, names=columns)
File "C:\Users\HMA\AppData\Local\Programs\Python\Python36-32\lib\site-packages
\pandas\io\parsers.py", line 655, in parser_f
return _read(filepath_or_buffer, kwds)
File "C:\Users\HMA\AppData\Local\Programs\Python\Python36-32\lib\site-packages
\pandas\io\parsers.py", line 405, in _read
parser = TextFileReader(filepath_or_buffer, **kwds)
File "C:\Users\HMA\AppData\Local\Programs\Python\Python36-32\lib\site-packages
\pandas\io\parsers.py", line 764, in init
self._make_engine(self.engine)
File "C:\Users\HMA\AppData\Local\Programs\Python\Python36-32\lib\site-packages
\pandas\io\parsers.py", line 985, in _make_engine
self._engine = CParserWrapper(self.f, **self.options)
File "C:\Users\HMA\AppData\Local\Programs\Python\Python36-32\lib\site-packages
\pandas\io\parsers.py", line 1605, in init
self._reader = parsers.TextReader(src, **kwds)
File "pandas_libs\parsers.pyx", line 394, in pandas._libs.parsers.TextReader.
cinit (pandas_libs\parsers.c:4209)
File "pandas_libs\parsers.pyx", line 710, in pandas._libs.parsers.TextReader.
_setup_parser_source (pandas_libs\parsers.c:8873)
FileNotFoundError: File b'output\evolution_gen.csv' does not exist
127.0.0.1 - - [08/Oct/2017 12:27:14] "POST /_dash-update-component HTTP/1.1" 500

evolution.py file is missing

I can not find the file evolution.py and when I try to execute the file evlution_generations.py with the parameters that indicate does nothing.

ImportError: cannot import name 'functions'

Geting the following error when running the most recent release

[root@cpaneldev gekkoJaponicus]# python3.6 japonicus.py -g Traceback (most recent call last): File "japonicus.py", line 9, in <module> from evolution_generations import gekko_generations File "/home/btctrader/gekkoJaponicus/evolution_generations.py", line 4, in <module> import promoterz File "/home/btctrader/gekkoJaponicus/promoterz/__init__.py", line 3, in <module> from . import functions ImportError: cannot import name 'functions'

Memory Errors on limited memory machines

Locale1
first unevaluated: 30
0 individues removed due to equality
[30]
Exception in thread Thread-5:
Traceback (most recent call last):
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python3.6/multiprocessing/pool.py", line 405, in _handle_workers
    pool._maintain_pool()
  File "/usr/lib/python3.6/multiprocessing/pool.py", line 246, in _maintain_pool
    self._repopulate_pool()
  File "/usr/lib/python3.6/multiprocessing/pool.py", line 239, in _repopulate_pool
    w.start()
  File "/usr/lib/python3.6/multiprocessing/process.py", line 105, in start
    self._popen = self._Popen(self)
  File "/usr/lib/python3.6/multiprocessing/context.py", line 277, in _Popen
    return Popen(process_obj)
  File "/usr/lib/python3.6/multiprocessing/popen_fork.py", line 26, in __init__
    self._launch(process_obj)
  File "/usr/lib/python3.6/multiprocessing/popen_fork.py", line 73, in _launch
    self.pid = os.fork()
OSError: [Errno 12] Cannot allocate memory

I started a small $5 droplet on digitalocean to run all this stuff on. However when I run python3.6 japonicus.py -g -i -k it'll initialize and then it will fail with the message above. The machine is only limited to about 500MB of memory but the threading needs to be so that it can accommodate it even though it'll run slower.

help in installing genetic algorithm

it would be satisfactory for me to achieve the correct installation of the genetic algorithm, where I get to know a step by step how to do it, since I am new to this subject. Thank you

Scanset not available

Hey,

While trying to run your program I got the following error:

Traceback (most recent call last):
File "japonicus.py", line 99, in
gekko_generations(TargetParameters, GenerationMethod, EvaluationMode, web=APP)
File "E:\Downloads\japonicus-master\evolution_generations.py", line 77, in gekko_generations
exchange_source=genconf.dataset_source)
File "E:\Downloads\japonicus-master\promoterz\evaluation\gekko.py", line 70, in getAvailableDataset
raise "scanset not available: %s" % exchange_source
TypeError: exceptions must derive from BaseException

Any idea what this is caused by? I somehow can't seem to figure out how to set up this program properly. This is my Settings.py:

#!/bin/python
import os
import js2py
from configStrategies import cS
from configIndicators import cI

class _settings:
    def __init__(self, **entries):
        '''
        print(entries)
        def iterate(self, DATA):
            for W in DATA.keys():
                if type(DATA[W]) == dict:
                    iterate(self,DATA[W])
                else:
                    self.__dict__.update(DATA)
        iterate(self,entries)
        '''
        self.__dict__.update(entries)
        
    def getstrat(self, name):
        return self.strategies[name]

def getSettings(specific=None):
    HOME = os.getenv("HOME")
    s = {
        'Global': {
            'gekkoPath': 'E:/Downloads/gekko-develop',
            'configFilename': 'sample-config.js',
            'save_dir': "output",
            'log_name': 'evolution_gen.csv',
            'RemoteAWS': '../AmazonSetup/hosts', # Hosts list of remote machines running gekko, to distribute evaluation load; BETA.
                                                # option values: path to HOSTS file list OR False;
            'GekkoURLs': [ 'http://localhost:3000' ]
        },
        # genetic algorithm settings
        'generations': {
            'showIndividualEvaluationInfo': True, # Verbose single evaluation results;
            'POP_SIZE': 30, # Initial population size, per locale 
            'NBEPOCH': 400, # number of epochs to run
            'deltaDays': 60, # time window size on days of candlesticks for each evaluation
            'NBCandlestickData': 4, # Number of candlestick data loaded simultaneously in each locale; slower EPOCHS, theoretical better evolution;
            'cxpb': 0.3, # Probabilty of crossover 
            'mutpb': 0.7,# Probability of mutation;
            '_lambda': 7,# size of offspring generated per epoch;
            'DRP': 70,# Date range persistence; Number of subsequent rounds
             # until another time range in dataset is selected;
            'ParallelBacktests': 5,
            'PRoFIGA_beta': 0.005, # weight of PRoFIGA calculations on variability of population size
            'ageBoundaries': (9, 19), # minimum age to die, age where everyone dies (on EPOCHS)
            'candleSize': 15, # candle size for gekko backtest, in minutes
             # dataset_source can be set to None so it searches from any source;
             # leave the ! on the ignored entry as convenient;
            '!dataset_source': None,
            'dataset_source': { # in case of specifying exchange-currency-asset, rename this removing the '!', and del the original key above.
                "exchange": "binance",
                "currency": 'USD',
                "asset": 'NEO'
            },
            'finaltest': {
                'NBBESTINDS': 1,
                'NBADDITIONALINDS': 4,
            },
            'chromosome': {
                'GeneSize': 2,
                'Density': 3,
            },
            'weights': {
                'profit': 1.0,
                'sharpe': 0.1}
        },
        # bayesian optimization settings
        'bayesian': {
            'deltaDays': 21,
            'testDays': 21,
            'num_rounds': 10,
            'random_state': 2017,
            'num_iter': 50,
            'init_points': 9,
            'parallel': False,
            'Strategy': 'PPO',
            'show_chart': False,
            'save': True,
            'candleSize': 30,
            'historySize': 10,
            'watch':{
                "exchange": "poloniex",
                "currency": 'USDT',
                "asset": 'BTC'
            }
        },
        'strategies': cS,
        'indicators': cI
    }

    if specific != None:
        if not specific:
            return _settings(**s)
        else:
            return _settings(**s[specific])

    return s

def get_configjs(filename="sample-config.js"):
    with open(filename, "r") as f:
        text = f.read()
    text = text.replace("module.exports = config;","config;")
    return js2py.eval_js(text).to_dict()

Thanks

getDateRange function is not defined

In the step bayesian optimization throw this exception
File "/home/julio/gekkoJaponicus/evolution_bayes.py", line 213, in gekko_bayesian
DateRange = getDateRange(chosenRange, deltaDays=settings['testDays'])
NameError: name 'getDateRange' is not defined

I check the file and not found this function.

Thanks for your work!
Cheers!

Run Error with GA - Error: config failure

Hello, I'm fairly new to this, and I have yet to get a successful run, but I seem so close it's driving me crazy! When I run the following command python3 japonicus.py -g --strat PPO it seems to start successfully, my gekko debug runs a mile a minute, but after about 30 seconds I get the following error:

	GEKKO
     โ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—  โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ•—   โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•—   โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—
     โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ•—  โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•
     โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘     โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—
โ–ˆโ–ˆ   โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ•โ• โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ•šโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘     โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘โ•šโ•โ•โ•โ•โ–ˆโ–ˆโ•‘
โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•‘  โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘     โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•‘ โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•‘
 โ•šโ•โ•โ•โ•โ• โ•šโ•โ•  โ•šโ•โ•โ•šโ•โ•      โ•šโ•โ•โ•โ•โ•โ• โ•šโ•โ•  โ•šโ•โ•โ•โ•โ•šโ•โ• โ•šโ•โ•โ•โ•โ•โ• โ•šโ•โ•โ•โ•โ•โ• โ•šโ•โ•โ•โ•โ•โ•โ•
								v0.29

The profits reported here are the profit beyond market price change;
	i.e. shown profit =  <backtest profit> - <market profit in evaluated candlestick period>;
Evolving PPO strategy;

evaluated parameters ranges:
short                         (6, 18)
long                          (13, 39)
signal                        (1, 18)
thresholds.down               (-0.5, 0.0)
thresholds.up                 (0.0, 0.5)
thresholds.persistence        (2, 10)

using candlestick dataset 2017-08-01 00:00:00 to 2017-12-12 11:11:00

	======  EPOCH 0/400  ======
Locale1
first unevaluated: 30
0 individues removed due to equality
[30]
Error: config failure
http://localhost:3000/api/backtest
{'gekkoConfig': {'debug': True, 'info': True, 'watch': {'exchange': 'gdax', 'currency': 'USD', 'asset': 'ETH'}, 'paperTrader': {'fee': 0.25, 'feeMaker': 0.15, 'feeTaker': 0.25, 'feeUsing': 'maker', 'slippage': 0.05, 'simulationBalance': {'asset': 1, 'currency': 100}, 'reportRoundtrips': True, 'enabled': True}, 'tradingAdvisor': {'enabled': True, 'method': 'PPO', 'candleSize': 15, 'historySize': 10}, 'PPO': {'long': 38.480000000000004, 'short': 15.0, 'signal': 12.73, 'thresholds': {'down': -0.010000000000000009, 'persistence': 8.48, 'up': 0.225}}, 'backtest': {'daterange': {'from': '2017-10-12 04:40:34', 'to': '2017-12-11 04:40:34'}}, 'performanceAnalyzer': {'riskFreeReturn': 2, 'enabled': True}, 'valid': True}, 'data': {'candleProps': ['id', 'start', 'open', 'high', 'low', 'close', 'vwp', 'volume', 'trades'], 'indicatorResults': True, 'report': True, 'roundtrips': False, 'trades': True}}
Error: config failure
http://localhost:3000/api/backtest
{'gekkoConfig': {'debug': True, 'info': True, 'watch': {'exchange': 'gdax', 'currency': 'USD', 'asset': 'ETH'}, 'paperTrader': {'fee': 0.25, 'feeMaker': 0.15, 'feeTaker': 0.25, 'feeUsing': 'maker', 'slippage': 0.05, 'simulationBalance': {'asset': 1, 'currency': 100}, 'reportRoundtrips': True, 'enabled': True}, 'tradingAdvisor': {'enabled': True, 'method': 'PPO', 'candleSize': 15, 'historySize': 10}, 'PPO': {'long': 22.880000000000003, 'short': 9.6, 'signal': 12.73, 'thresholds': {'down': -0.255, 'persistence': 8.08, 'up': 0.0}}, 'backtest': {'daterange': {'from': '2017-10-12 04:40:34', 'to': '2017-12-11 04:40:34'}}, 'performanceAnalyzer': {'riskFreeReturn': 2, 'enabled': True}, 'valid': True}, 'data': {'candleProps': ['id', 'start', 'open', 'high', 'low', 'close', 'vwp', 'volume', 'trades'], 'indicatorResults': True, 'report': True, 'roundtrips': False, 'trades': True}}
Error: config failure
http://localhost:3000/api/backtest
{'gekkoConfig': {'debug': True, 'info': True, 'watch': {'exchange': 'gdax', 'currency': 'USD', 'asset': 'ETH'}, 'paperTrader': {'fee': 0.25, 'feeMaker': 0.15, 'feeTaker': 0.25, 'feeUsing': 'maker', 'slippage': 0.05, 'simulationBalance': {'asset': 1, 'currency': 100}, 'reportRoundtrips': True, 'enabled': True}, 'tradingAdvisor': {'enabled': True, 'method': 'PPO', 'candleSize': 15, 'historySize': 10}, 'PPO': {'long': 14.82, 'short': 16.68, 'signal': 1.51, 'thresholds': {'down': -0.20500000000000002, 'persistence': 5.359999999999999, 'up': 0.265}}, 'backtest': {'daterange': {'from': '2017-10-12 04:40:34', 'to': '2017-12-11 04:40:34'}}, 'performanceAnalyzer': {'riskFreeReturn': 2, 'enabled': True}, 'valid': True}, 'data': {'candleProps': ['id', 'start', 'open', 'high', 'low', 'close', 'vwp', 'volume', 'trades'], 'indicatorResults': True, 'report': True, 'roundtrips': False, 'trades': True}}
Error: config failure
Error: config failure
http://localhost:3000/api/backtest
{'gekkoConfig': {'debug': True, 'info': True, 'watch': {'exchange': 'gdax', 'currency': 'USD', 'asset': 'ETH'}, 'paperTrader': {'fee': 0.25, 'feeMaker': 0.15, 'feeTaker': 0.25, 'feeUsing': 'maker', 'slippage': 0.05, 'simulationBalance': {'asset': 1, 'currency': 100}, 'reportRoundtrips': True, 'enabled': True}, 'tradingAdvisor': {'enabled': True, 'method': 'PPO', 'candleSize': 15, 'historySize': 10}, 'PPO': {'long': 28.6, 'short': 16.08, 'signal': 8.82, 'thresholds': {'down': -0.25, 'persistence': 5.84, 'up': 0.2}}, 'backtest': {'daterange': {'from': '2017-10-12 04:40:34', 'to': '2017-12-11 04:40:34'}}, 'performanceAnalyzer': {'riskFreeReturn': 2, 'enabled': True}, 'valid': True}, 'data': {'candleProps': ['id', 'start', 'open', 'high', 'low', 'close', 'vwp', 'volume', 'trades'], 'indicatorResults': True, 'report': True, 'roundtrips': False, 'trades': True}}
http://localhost:3000/api/backtest
{'gekkoConfig': {'debug': True, 'info': True, 'watch': {'exchange': 'gdax', 'currency': 'USD', 'asset': 'ETH'}, 'paperTrader': {'fee': 0.25, 'feeMaker': 0.15, 'feeTaker': 0.25, 'feeUsing': 'maker', 'slippage': 0.05, 'simulationBalance': {'asset': 1, 'currency': 100}, 'reportRoundtrips': True, 'enabled': True}, 'tradingAdvisor': {'enabled': True, 'method': 'PPO', 'candleSize': 15, 'historySize': 10}, 'PPO': {'long': 31.46, 'short': 15.719999999999999, 'signal': 1.85, 'thresholds': {'down': -0.020000000000000018, 'persistence': 4.24, 'up': 0.2}}, 'backtest': {'daterange': {'from': '2017-10-12 04:40:34', 'to': '2017-12-11 04:40:34'}}, 'performanceAnalyzer': {'riskFreeReturn': 2, 'enabled': True}, 'valid': True}, 'data': {'candleProps': ['id', 'start', 'open', 'high', 'low', 'close', 'vwp', 'volume', 'trades'], 'indicatorResults': True, 'report': True, 'roundtrips': False, 'trades': True}}
Error: config failure
http://localhost:3000/api/backtest
{'gekkoConfig': {'debug': True, 'info': True, 'watch': {'exchange': 'gdax', 'currency': 'USD', 'asset': 'ETH'}, 'paperTrader': {'fee': 0.25, 'feeMaker': 0.15, 'feeTaker': 0.25, 'feeUsing': 'maker', 'slippage': 0.05, 'simulationBalance': {'asset': 1, 'currency': 100}, 'reportRoundtrips': True, 'enabled': True}, 'tradingAdvisor': {'enabled': True, 'method': 'PPO', 'candleSize': 15, 'historySize': 10}, 'PPO': {'long': 26.52, 'short': 13.68, 'signal': 7.630000000000001, 'thresholds': {'down': -0.32999999999999996, 'persistence': 8.0, 'up': 0.035}}, 'backtest': {'daterange': {'from': '2017-10-12 04:40:34', 'to': '2017-12-11 04:40:34'}}, 'performanceAnalyzer': {'riskFreeReturn': 2, 'enabled': True}, 'valid': True}, 'data': {'candleProps': ['id', 'start', 'open', 'high', 'low', 'close', 'vwp', 'volume', 'trades'], 'indicatorResults': True, 'report': True, 'roundtrips': False, 'trades': True}}
Error: config failure
Error: config failure
Error: config failure
Error: config failure
http://localhost:3000/api/backtest
{'gekkoConfig': {'debug': True, 'info': True, 'watch': {'exchange': 'gdax', 'currency': 'USD', 'asset': 'ETH'}, 'paperTrader': {'fee': 0.25, 'feeMaker': 0.15, 'feeTaker': 0.25, 'feeUsing': 'maker', 'slippage': 0.05, 'simulationBalance': {'asset': 1, 'currency': 100}, 'reportRoundtrips': True, 'enabled': True}, 'tradingAdvisor': {'enabled': True, 'method': 'PPO', 'candleSize': 15, 'historySize': 10}, 'PPO': {'long': 28.6, 'short': 14.879999999999999, 'signal': 8.65, 'thresholds': {'down': -0.22499999999999998, 'persistence': 3.04, 'up': 0.47500000000000003}}, 'backtest': {'daterange': {'from': '2017-10-12 04:40:34', 'to': '2017-12-11 04:40:34'}}, 'performanceAnalyzer': {'riskFreeReturn': 2, 'enabled': True}, 'valid': True}, 'data': {'candleProps': ['id', 'start', 'open', 'high', 'low', 'close', 'vwp', 'volume', 'trades'], 'indicatorResults': True, 'report': True, 'roundtrips': False, 'trades': True}}
http://localhost:3000/api/backtest
{'gekkoConfig': {'debug': True, 'info': True, 'watch': {'exchange': 'gdax', 'currency': 'USD', 'asset': 'ETH'}, 'paperTrader': {'fee': 0.25, 'feeMaker': 0.15, 'feeTaker': 0.25, 'feeUsing': 'maker', 'slippage': 0.05, 'simulationBalance': {'asset': 1, 'currency': 100}, 'reportRoundtrips': True, 'enabled': True}, 'tradingAdvisor': {'enabled': True, 'method': 'PPO', 'candleSize': 15, 'historySize': 10}, 'PPO': {'long': 31.2, 'short': 17.88, 'signal': 15.790000000000001, 'thresholds': {'down': -0.14999999999999997, 'persistence': 3.6, 'up': 0.15}}, 'backtest': {'daterange': {'from': '2017-10-12 04:40:34', 'to': '2017-12-11 04:40:34'}}, 'performanceAnalyzer': {'riskFreeReturn': 2, 'enabled': True}, 'valid': True}, 'data': {'candleProps': ['id', 'start', 'open', 'high', 'low', 'close', 'vwp', 'volume', 'trades'], 'indicatorResults': True, 'report': True, 'roundtrips': False, 'trades': True}}
http://localhost:3000/api/backtest
{'gekkoConfig': {'debug': True, 'info': True, 'watch': {'exchange': 'gdax', 'currency': 'USD', 'asset': 'ETH'}, 'paperTrader': {'fee': 0.25, 'feeMaker': 0.15, 'feeTaker': 0.25, 'feeUsing': 'maker', 'slippage': 0.05, 'simulationBalance': {'asset': 1, 'currency': 100}, 'reportRoundtrips': True, 'enabled': True}, 'tradingAdvisor': {'enabled': True, 'method': 'PPO', 'candleSize': 15, 'historySize': 10}, 'PPO': {'long': 33.019999999999996, 'short': 15.719999999999999, 'signal': 11.71, 'thresholds': {'down': -0.07, 'persistence': 7.04, 'up': 0.38}}, 'backtest': {'daterange': {'from': '2017-10-12 04:40:34', 'to': '2017-12-11 04:40:34'}}, 'performanceAnalyzer': {'riskFreeReturn': 2, 'enabled': True}, 'valid': True}, 'data': {'candleProps': ['id', 'start', 'open', 'high', 'low', 'close', 'vwp', 'volume', 'trades'], 'indicatorResults': True, 'report': True, 'roundtrips': False, 'trades': True}}
http://localhost:3000/api/backtest
{'gekkoConfig': {'debug': True, 'info': True, 'watch': {'exchange': 'gdax', 'currency': 'USD', 'asset': 'ETH'}, 'paperTrader': {'fee': 0.25, 'feeMaker': 0.15, 'feeTaker': 0.25, 'feeUsing': 'maker', 'slippage': 0.05, 'simulationBalance': {'asset': 1, 'currency': 100}, 'reportRoundtrips': True, 'enabled': True}, 'tradingAdvisor': {'enabled': True, 'method': 'PPO', 'candleSize': 15, 'historySize': 10}, 'PPO': {'long': 18.2, 'short': 10.92, 'signal': 17.150000000000002, 'thresholds': {'down': -0.02999999999999997, 'persistence': 8.32, 'up': 0.275}}, 'backtest': {'daterange': {'from': '2017-10-12 04:40:34', 'to': '2017-12-11 04:40:34'}}, 'performanceAnalyzer': {'riskFreeReturn': 2, 'enabled': True}, 'valid': True}, 'data': {'candleProps': ['id', 'start', 'open', 'high', 'low', 'close', 'vwp', 'volume', 'trades'], 'indicatorResults': True, 'report': True, 'roundtrips': False, 'trades': True}}
Error: config failure
http://localhost:3000/api/backtest
{'gekkoConfig': {'debug': True, 'info': True, 'watch': {'exchange': 'gdax', 'currency': 'USD', 'asset': 'ETH'}, 'paperTrader': {'fee': 0.25, 'feeMaker': 0.15, 'feeTaker': 0.25, 'feeUsing': 'maker', 'slippage': 0.05, 'simulationBalance': {'asset': 1, 'currency': 100}, 'reportRoundtrips': True, 'enabled': True}, 'tradingAdvisor': {'enabled': True, 'method': 'PPO', 'candleSize': 15, 'historySize': 10}, 'PPO': {'long': 19.5, 'short': 11.04, 'signal': 13.750000000000002, 'thresholds': {'down': -0.31, 'persistence': 5.92, 'up': 0.29}}, 'backtest': {'daterange': {'from': '2017-10-12 04:40:34', 'to': '2017-12-11 04:40:34'}}, 'performanceAnalyzer': {'riskFreeReturn': 2, 'enabled': True}, 'valid': True}, 'data': {'candleProps': ['id', 'start', 'open', 'high', 'low', 'close', 'vwp', 'volume', 'trades'], 'indicatorResults': True, 'report': True, 'roundtrips': False, 'trades': True}}
Error: config failure
http://localhost:3000/api/backtest
{'gekkoConfig': {'debug': True, 'info': True, 'watch': {'exchange': 'gdax', 'currency': 'USD', 'asset': 'ETH'}, 'paperTrader': {'fee': 0.25, 'feeMaker': 0.15, 'feeTaker': 0.25, 'feeUsing': 'maker', 'slippage': 0.05, 'simulationBalance': {'asset': 1, 'currency': 100}, 'reportRoundtrips': True, 'enabled': True}, 'tradingAdvisor': {'enabled': True, 'method': 'PPO', 'candleSize': 15, 'historySize': 10}, 'PPO': {'long': 17.16, 'short': 16.799999999999997, 'signal': 1.0, 'thresholds': {'down': -0.09499999999999997, 'persistence': 8.56, 'up': 0.41500000000000004}}, 'backtest': {'daterange': {'from': '2017-10-12 04:40:34', 'to': '2017-12-11 04:40:34'}}, 'performanceAnalyzer': {'riskFreeReturn': 2, 'enabled': True}, 'valid': True}, 'data': {'candleProps': ['id', 'start', 'open', 'high', 'low', 'close', 'vwp', 'volume', 'trades'], 'indicatorResults': True, 'report': True, 'roundtrips': False, 'trades': True}}
Error: config failure
http://localhost:3000/api/backtest
{'gekkoConfig': {'debug': True, 'info': True, 'watch': {'exchange': 'gdax', 'currency': 'USD', 'asset': 'ETH'}, 'paperTrader': {'fee': 0.25, 'feeMaker': 0.15, 'feeTaker': 0.25, 'feeUsing': 'maker', 'slippage': 0.05, 'simulationBalance': {'asset': 1, 'currency': 100}, 'reportRoundtrips': True, 'enabled': True}, 'tradingAdvisor': {'enabled': True, 'method': 'PPO', 'candleSize': 15, 'historySize': 10}, 'PPO': {'long': 15.34, 'short': 9.6, 'signal': 1.17, 'thresholds': {'down': -0.015000000000000013, 'persistence': 9.600000000000001, 'up': 0.015}}, 'backtest': {'daterange': {'from': '2017-10-12 04:40:34', 'to': '2017-12-11 04:40:34'}}, 'performanceAnalyzer': {'riskFreeReturn': 2, 'enabled': True}, 'valid': True}, 'data': {'candleProps': ['id', 'start', 'open', 'high', 'low', 'close', 'vwp', 'volume', 'trades'], 'indicatorResults': True, 'report': True, 'roundtrips': False, 'trades': True}}
Error: config failure
http://localhost:3000/api/backtest
{'gekkoConfig': {'debug': True, 'info': True, 'watch': {'exchange': 'gdax', 'currency': 'USD', 'asset': 'ETH'}, 'paperTrader': {'fee': 0.25, 'feeMaker': 0.15, 'feeTaker': 0.25, 'feeUsing': 'maker', 'slippage': 0.05, 'simulationBalance': {'asset': 1, 'currency': 100}, 'reportRoundtrips': True, 'enabled': True}, 'tradingAdvisor': {'enabled': True, 'method': 'PPO', 'candleSize': 15, 'historySize': 10}, 'PPO': {'long': 13.78, 'short': 11.28, 'signal': 3.3800000000000003, 'thresholds': {'down': -0.13, 'persistence': 8.64, 'up': 0.45}}, 'backtest': {'daterange': {'from': '2017-10-12 04:40:34', 'to': '2017-12-11 04:40:34'}}, 'performanceAnalyzer': {'riskFreeReturn': 2, 'enabled': True}, 'valid': True}, 'data': {'candleProps': ['id', 'start', 'open', 'high', 'low', 'close', 'vwp', 'volume', 'trades'], 'indicatorResults': True, 'report': True, 'roundtrips': False, 'trades': True}}
Error: config failure
http://localhost:3000/api/backtest
{'gekkoConfig': {'debug': True, 'info': True, 'watch': {'exchange': 'gdax', 'currency': 'USD', 'asset': 'ETH'}, 'paperTrader': {'fee': 0.25, 'feeMaker': 0.15, 'feeTaker': 0.25, 'feeUsing': 'maker', 'slippage': 0.05, 'simulationBalance': {'asset': 1, 'currency': 100}, 'reportRoundtrips': True, 'enabled': True}, 'tradingAdvisor': {'enabled': True, 'method': 'PPO', 'candleSize': 15, 'historySize': 10}, 'PPO': {'long': 31.46, 'short': 14.4, 'signal': 13.750000000000002, 'thresholds': {'down': -0.46, 'persistence': 2.32, 'up': 0.48}}, 'backtest': {'daterange': {'from': '2017-10-12 04:40:34', 'to': '2017-12-11 04:40:34'}}, 'performanceAnalyzer': {'riskFreeReturn': 2, 'enabled': True}, 'valid': True}, 'data': {'candleProps': ['id', 'start', 'open', 'high', 'low', 'close', 'vwp', 'volume', 'trades'], 'indicatorResults': True, 'report': True, 'roundtrips': False, 'trades': True}}
multiprocessing.pool.RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/requests/packages/urllib3/connectionpool.py", line 600, in urlopen
    chunked=chunked)
  File "/usr/local/lib/python3.6/site-packages/requests/packages/urllib3/connectionpool.py", line 386, in _make_request
    six.raise_from(e, None)
  File "<string>", line 2, in raise_from
  File "/usr/local/lib/python3.6/site-packages/requests/packages/urllib3/connectionpool.py", line 382, in _make_request
    httplib_response = conn.getresponse()
  File "/usr/local/lib/python3.6/http/client.py", line 1331, in getresponse
    response.begin()
  File "/usr/local/lib/python3.6/http/client.py", line 297, in begin
    version, status, reason = self._read_status()
  File "/usr/local/lib/python3.6/http/client.py", line 266, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/requests/adapters.py", line 438, in send
    timeout=timeout
  File "/usr/local/lib/python3.6/site-packages/requests/packages/urllib3/connectionpool.py", line 649, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/usr/local/lib/python3.6/site-packages/requests/packages/urllib3/util/retry.py", line 357, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/usr/local/lib/python3.6/site-packages/requests/packages/urllib3/packages/six.py", line 685, in reraise
    raise value.with_traceback(tb)
  File "/usr/local/lib/python3.6/site-packages/requests/packages/urllib3/connectionpool.py", line 600, in urlopen
    chunked=chunked)
  File "/usr/local/lib/python3.6/site-packages/requests/packages/urllib3/connectionpool.py", line 386, in _make_request
    six.raise_from(e, None)
  File "<string>", line 2, in raise_from
  File "/usr/local/lib/python3.6/site-packages/requests/packages/urllib3/connectionpool.py", line 382, in _make_request
    httplib_response = conn.getresponse()
  File "/usr/local/lib/python3.6/http/client.py", line 1331, in getresponse
    response.begin()
  File "/usr/local/lib/python3.6/http/client.py", line 297, in begin
    version, status, reason = self._read_status()
  File "/usr/local/lib/python3.6/http/client.py", line 266, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
requests.packages.urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/multiprocessing/pool.py", line 119, in worker
    result = (True, func(*args, **kwds))
  File "/usr/local/lib/python3.6/multiprocessing/pool.py", line 47, in starmapstar
    return list(itertools.starmap(args[0], args[1]))
  File "/home/user/japonicus/evolution_generations.py", line 39, in bEvaluate
    DateRange, phenotype, gekkoUrl)
  File "/home/user/japonicus/promoterz/evaluation/gekko.py", line 268, in Evaluate
    Debug=genconf.gekkoDebug) for DR in DateRange ]
  File "/home/user/japonicus/promoterz/evaluation/gekko.py", line 268, in <listcomp>
    Debug=genconf.gekkoDebug) for DR in DateRange ]
  File "/home/user/japonicus/promoterz/evaluation/gekko.py", line 112, in runBacktest
    result = httpPost(url, gekko_config)
  File "/home/user/japonicus/promoterz/evaluation/gekko.py", line 41, in httpPost
    raise e
  File "/home/user/japonicus/promoterz/evaluation/gekko.py", line 31, in httpPost
    Request = requests.post(URL, json=data)
  File "/usr/local/lib/python3.6/site-packages/requests/api.py", line 112, in post
    return request('post', url, data=data, json=json, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/requests/api.py", line 58, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 518, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 639, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/requests/adapters.py", line 488, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "japonicus.py", line 99, in <module>
    gekko_generations(TargetParameters, GenerationMethod, EvaluationMode, web=APP)
  File "/home/user/japonicus/evolution_generations.py", line 106, in gekko_generations
    World.runEPOCH()
  File "/home/user/japonicus/promoterz/sequence/parallel_world.py", line 12, in world_EPOCH
    LOCALE.run()
  File "/home/user/japonicus/promoterz/locale.py", line 51, in run
    self.loop(self.World, self)
  File "/home/user/japonicus/promoterz/sequence/standard_loop.py", line 33, in standard_loop
    locale.extraStats['nb_evaluated'], locale.extraStats['avgTrades'] = World.parallel.evaluatePopulation(locale)
  File "/home/user/japonicus/promoterz/evaluationPool.py", line 60, in evaluatePopulation
    results[A] = results[A].get(timeout=timeout)
  File "/usr/local/lib/python3.6/multiprocessing/pool.py", line 644, in get
    raise self._value
  File "/usr/local/lib/python3.6/multiprocessing/pool.py", line 119, in worker
    result = (True, func(*args, **kwds))
  File "/home/user/japonicus/promoterz/evaluationPool.py", line 31, in evaluateBackend
    fitnesses = P.starmap(self.EvaluationTool, Q )
  File "/usr/local/lib/python3.6/multiprocessing/pool.py", line 274, in starmap
    return self._map_async(func, iterable, starmapstar, chunksize).get()
  File "/usr/local/lib/python3.6/multiprocessing/pool.py", line 644, in get
    raise self._value
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))


I can post my config files for review if you'd like, please note I updated your default code in Settings.py from example-config.js to sample-config.js in both spots as that is the default name of the gekko config, no example-config.js exists. But I'm still getting the same error before and after that change.

Any thoughts would be appreciated! Thanks.

pip install Exception

Hi, trying to get your project to run. Failed at the pip install part. Do I need a specific python version?

root@raspberrypi:/home/pi/Downloads/gekkoJaponicus-master# sudo pip install -r requirements.txt Collecting deap==1.0.2.post2 (from -r requirements.txt (line 1)) Downloading deap-1.0.2.post2.tar.gz (852kB) 100% |################################| 860kB 286kB/s Requested deap==1.0.2.post2 from https://pypi.python.org/packages/5b/d7/a49d3dd7aa8cbaf2b1ac8f4d6495824c886fea8b3dac4a73dc4df94cad76/deap-1.0.2.post2.tar.gz#md5=ccf5ed7562e4d6236c9416e3b5a9d941 (from -r requirements.txt (line 1)), but installing version None Collecting requests==2.14.2 (from -r requirements.txt (line 2)) Downloading requests-2.14.2-py2.py3-none-any.whl (560kB) 100% |################################| 563kB 412kB/s Requirement already satisfied: numpy==1.12.1 in /usr/lib/python2.7/dist-packages (from -r requirements.txt (line 3)) Collecting js2py==0.50 (from -r requirements.txt (line 4)) Downloading Js2Py-0.50.tar.gz (552kB) 100% |################################| 552kB 402kB/s Collecting bayesian-optimization==0.4.0 (from -r requirements.txt (line 5)) Downloading bayesian-optimization-0.4.0.tar.gz Collecting matplotlib==1.5.3 (from -r requirements.txt (line 6)) Downloading matplotlib-1.5.3.tar.gz (51.6MB) 99% |############################### | 51.6MB 4.3MB/s eta 0:00:01Exception: Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 215, in main status = self.run(options, args) File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 353, in run wb.build(autobuilding=True) File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 749, in build self.requirement_set.prepare_files(self.finder) File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 380, in prepare_files ignore_dependencies=self.ignore_dependencies)) File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 620, in _prepare_file session=self.session, hashes=hashes) File "/usr/lib/python2.7/dist-packages/pip/download.py", line 821, in unpack_url hashes=hashes File "/usr/lib/python2.7/dist-packages/pip/download.py", line 659, in unpack_http_url hashes) File "/usr/lib/python2.7/dist-packages/pip/download.py", line 882, in _download_http_url _download_url(resp, link, content_file, hashes) File "/usr/lib/python2.7/dist-packages/pip/download.py", line 603, in _download_url hashes.check_against_chunks(downloaded_chunks) File "/usr/lib/python2.7/dist-packages/pip/utils/hashes.py", line 46, in check_against_chunks for chunk in chunks: File "/usr/lib/python2.7/dist-packages/pip/download.py", line 571, in written_chunks for chunk in chunks: File "/usr/lib/python2.7/dist-packages/pip/utils/ui.py", line 139, in iter for x in it: File "/usr/lib/python2.7/dist-packages/pip/download.py", line 560, in resp_read decode_content=False): File "/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/response.py", line 432, in stream data = self.read(amt=amt, decode_content=decode_content) File "/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/response.py", line 380, in read data = self._fp.read(amt) File "/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/filewrapper.py", line 63, in read self._close() File "/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/filewrapper.py", line 50, in _close self.__callback(self.__buf.getvalue()) File "/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/controller.py", line 275, in cache_response self.serializer.dumps(request, response, body=body), File "/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/serialize.py", line 87, in dumps ).encode("utf8"), MemoryError

Add DateRange tested and historySize to the settings output / Clarify settings

I am comparing the output from japonicus and a manual run in gekko but I don't know what daterange and historySize japonicus is using. Would be nice to display them in the profit output or at least once at the beginning of the output. there is currently output first

using candlestick dataset 2018-01-01 00:38:00 to 2018-01-21 19:38:00

but it is unclear what is actually being tested in gekko because I am unsure what this setting does:

https://github.com/Gab0/japonicus/blob/master/Settings.py#L43

Or can we add a daterange setting here: https://github.com/Gab0/japonicus/blob/master/Settings.py#L66

Anything to make it easy to take the output from japonicus and run the exact backtest in gekko.

MACD and DEMA Strategy

Hello, the program generates the following settings for testing

config.MACD = {
  "long": 20.843421695138005,
  "thresholds": {
    "persistence": 1.6903547506318077,
    "up": -0.012428340696021,
    "fibonacci": 0.1383140595900251,
    "high": 58.04953295840107,
    "low": 22.09129066200335,
    "down": 0.0005979862069472319
  },
  "short": 21.680672087431585,
  "interval": 3.774585878395658,
  "signal": 8.56230083381508
}

but my MACD strategy file and my DEMA startegy file lacks the following variables fibonacci, high and low.
Could you pass me a strategy files that you use to do these tests?
Sorry for the request but I'm a real noob in this. And I have some problem to understand English.

Thanks a lot!!

Missing coma

Hi !

Just to let you know that it now runs smoothly, but for beginners, there's a missing coma in Settings.py here :
'RemoteAWS': '../AmazonSetup/hosts'
it should be :
'RemoteAWS': '../AmazonSetup/hosts',

Thanks for you work again !

(this fix should take about 5 sec to fix in github....YMMV ๐Ÿ˜„ )

Connection problem with gekko ?

Hi !

I'm new to this amazing projet, and I'm trying quite hard to make it work and understand its ways, but I'm facing a problem right now : it fails after 1m30 or so.

The main problem seems to be the connection between japonicus and gekko.

I've checked my config files (probably not THAT ONE which is causing this issue) to modify the url : http://localhost:3000/api/backtest to http://ip :3000/api/backtest

The weird thing still is that I think japonicus can actually GET data from gekko as seen in logs below, but can't SEND a test, am I right on this one ?

Thanks for helping,

Cheers !


JAPONICUS OUTPUT :

Locale2
first unevaluated: 5
0 individues removed due to equality
[5]
EPOCH 1	&5
Maximum profit 0.294	Average profit -7.287
Minimum profit -12.777	Profit variation 3.748
Population size 37	Max population size 30
Avg trade number 0.300	Avg sharpe ratio 0

Elder dies 0

Epoch runs in 108.09 seconds;

Selecting 1+4 individues, random test;
4 selected;
1 selected;
Error: config failure
http://localhost:3000/api/backtest
{'data': {'trades': True, 'candleProps': ['id', 'start', 'open', 'high', 'low', 'close', 'vwp', 'volume', 'trades'], 'report': True, 'roundtrips': False, 'indicatorResults': True}, 'gekkoConfig': {'valid': True, 'tradingAdvisor': {'candleSize': 15, 'method': 'japonicus/ja354DEMARSI', 'enabled': True, 'historySize': 10}, 'performanceAnalyzer': {'enabled': True, 'riskFreeReturn': 2}, 'debug': True, 'info': True, 'watch': {'exchange': 'binance', 'currency': 'BTC', 'asset': 'CND'}, 'paperTrader': {'reportRoundtrips': True, 'feeUsing': 'maker', 'simulationBalance': {'currency': 100, 'asset': 1}, 'slippage': 0.05, 'fee': 0.25, 'enabled': True, 'feeTaker': 0.25, 'feeMaker': 0.15}, 'japonicus/ja354DEMARSI': {'CCI': {'consistant': 20.020000000000003, 'active': 0.32, 'history': 65.7, 'thresholds': {'up': 148.0, 'down': -91.0, 'persistence': 8.86}}, 'LRC': {'active': 0.18, 'thresholds': {'up': 30.0, 'down': -16.0}, 'depth': 9.45}, 'SMMA': {'weight': 11.95, 'thresholds': {'up': 0.031, 'down': -0.082}, 'active': 0.48}, 'TSI': {'active': 0.09, 'thresholds': {'up': 32.6, 'down': -24.2}, 'short': 7.41, 'long': 17.6}, 'DEMA': {'long': 16.83, 'thresholds': {'up': 0.047, 'down': -0.069}, 'short': 12.76, 'active': 0.54}, 'PPO': {'active': 0.19, 'signal': 13.07, 'thresholds': {'up': 0.165, 'down': -0.435}, 'short': 13.2, 'long': 18.2}, 'RSI': {'active': 0.88, 'thresholds': {'up': 51.65, 'down': 41.099999999999994}, 'interval': 18.200000000000003}, 'persistence': 1.04}, 'backtest': {'daterange': {'from': '2018-01-18 09:20:07', 'to': '2018-01-19 09:20:07'}}}}
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/urllib3/connection.py", line 141, in _new_conn
    (self.host, self.port), self.timeout, **extra_kw)
  File "/usr/local/lib/python3.4/dist-packages/urllib3/util/connection.py", line 83, in create_connection
    raise err
  File "/usr/local/lib/python3.4/dist-packages/urllib3/util/connection.py", line 73, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/urllib3/connectionpool.py", line 601, in urlopen
    chunked=chunked)
  File "/usr/local/lib/python3.4/dist-packages/urllib3/connectionpool.py", line 357, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/lib/python3.4/http/client.py", line 1090, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib/python3.4/http/client.py", line 1128, in _send_request
    self.endheaders(body)
  File "/usr/lib/python3.4/http/client.py", line 1086, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python3.4/http/client.py", line 924, in _send_output
    self.send(msg)
  File "/usr/lib/python3.4/http/client.py", line 859, in send
    self.connect()
  File "/usr/local/lib/python3.4/dist-packages/urllib3/connection.py", line 166, in connect
    conn = self._new_conn()
  File "/usr/local/lib/python3.4/dist-packages/urllib3/connection.py", line 150, in _new_conn
    self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0xaeba1f2c>: Failed to establish a new connection: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/requests/adapters.py", line 440, in send
    timeout=timeout
  File "/usr/local/lib/python3.4/dist-packages/urllib3/connectionpool.py", line 639, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/usr/local/lib/python3.4/dist-packages/urllib3/util/retry.py", line 388, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=3000): Max retries exceeded with url: /api/backtest (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xaeba1f2c>: Failed to establish a new connection: [Errno 111] Connection refused',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "japonicus.py", line 99, in <module>
    gekko_generations(TargetParameters, GenerationMethod, EvaluationMode, web=APP)
  File "/var/www/japonicus/evolution_generations.py", line 109, in gekko_generations
    resultInterface.showResults(World)
  File "/var/www/japonicus/resultInterface.py", line 39, in showResults
    ValidationDataset)
  File "/var/www/japonicus/resultInterface.py", line 64, in stratSettingsProofOfViability
    (q, s), m = World.tools.Evaluate([W], Individual, 'http://localhost:3000')
  File "/var/www/japonicus/evolution_generations.py", line 30, in aEvaluate
    DateRange, phenotype, gekkoUrl)
  File "/var/www/japonicus/promoterz/evaluation/gekko.py", line 268, in Evaluate
    Debug=genconf.gekkoDebug) for DR in DateRange ]
  File "/var/www/japonicus/promoterz/evaluation/gekko.py", line 268, in <listcomp>
    Debug=genconf.gekkoDebug) for DR in DateRange ]
  File "/var/www/japonicus/promoterz/evaluation/gekko.py", line 112, in runBacktest
    result = httpPost(url, gekko_config)
  File "/var/www/japonicus/promoterz/evaluation/gekko.py", line 41, in httpPost
    raise e
  File "/var/www/japonicus/promoterz/evaluation/gekko.py", line 31, in httpPost
    Request = requests.post(URL, json=data)
  File "/usr/local/lib/python3.4/dist-packages/requests/api.py", line 112, in post
    return request('post', url, data=data, json=json, **kwargs)
  File "/usr/local/lib/python3.4/dist-packages/requests/api.py", line 58, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.4/dist-packages/requests/sessions.py", line 508, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.4/dist-packages/requests/sessions.py", line 618, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.4/dist-packages/requests/adapters.py", line 508, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=3000): Max retries exceeded with url: /api/backtest (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xaeba1f2c>: Failed to establish a new connection: [Errno 111] Connection refused',))


GEKKO OUTPUT :

2018-01-22 23:39:18 (INFO):	Setting up:
2018-01-22 23:39:18 (INFO):		 Paper Trader
2018-01-22 23:39:18 (INFO):		 Paper trader that simulates fake trades.
2018-01-22 23:39:18 (INFO):

2018-01-22 23:39:18 (INFO):	Setting up:
2018-01-22 23:39:18 (INFO):		 Performance Analyzer
2018-01-22 23:39:18 (INFO):		 Analyzes performances of trades
2018-01-22 23:39:18 (INFO):

2018-01-22 23:39:18 (INFO):

2018-01-22 23:39:18 (INFO):	Setting up:
2018-01-22 23:39:18 (INFO):		 Paper Trader
2018-01-22 23:39:18 (INFO):		 Paper trader that simulates fake trades.
2018-01-22 23:39:18 (INFO):

2018-01-22 23:39:18 (INFO):	Setting up:
2018-01-22 23:39:18 (INFO):

2018-01-22 23:39:18 (INFO):		 Paper Trader
2018-01-22 23:39:18 (INFO):		 Paper trader that simulates fake trades.
2018-01-22 23:39:18 (INFO):	Setting up:
2018-01-22 23:39:18 (INFO):		 Performance Analyzer
2018-01-22 23:39:18 (INFO):		 Analyzes performances of trades
2018-01-22 23:39:18 (INFO):

2018-01-22 23:39:18 (INFO):	Setting up:
2018-01-22 23:39:18 (INFO):		 Performance Analyzer
2018-01-22 23:39:18 (INFO):		 Analyzes performances of trades
2018-01-22 23:39:18 (INFO):

2018-01-22 23:39:18 (INFO):

2018-01-22 23:39:18 (INFO):

2018-01-22 23:39:18 (INFO):	Setting up:
2018-01-22 23:39:18 (INFO):		 Paper Trader
2018-01-22 23:39:18 (INFO):		 Paper trader that simulates fake trades.
2018-01-22 23:39:18 (INFO):

2018-01-22 23:39:18 (INFO):	Setting up:
2018-01-22 23:39:18 (INFO):		 Performance Analyzer
2018-01-22 23:39:18 (INFO):		 Analyzes performances of trades
2018-01-22 23:39:18 (INFO):

2018-01-22 23:39:18 (INFO):	Setting up:
2018-01-22 23:39:18 (INFO):		 Paper Trader
2018-01-22 23:39:18 (INFO):		 Paper trader that simulates fake trades.
2018-01-22 23:39:18 (INFO):

2018-01-22 23:39:18 (INFO):

2018-01-22 23:39:18 (INFO):	Setting up:
2018-01-22 23:39:18 (INFO):		 Performance Analyzer
2018-01-22 23:39:18 (INFO):		 Analyzes performances of trades
2018-01-22 23:39:18 (INFO):

2018-01-22 23:39:18 (INFO):		WARNING: BACKTESTING FEATURE NEEDS PROPER TESTING
2018-01-22 23:39:18 (INFO):		WARNING: ACT ON THESE NUMBERS AT YOUR OWN RISK!
2018-01-22 23:39:19 (INFO):		WARNING: BACKTESTING FEATURE NEEDS PROPER TESTING
2018-01-22 23:39:19 (INFO):		WARNING: ACT ON THESE NUMBERS AT YOUR OWN RISK!
2018-01-22 23:39:19 (INFO):		WARNING: BACKTESTING FEATURE NEEDS PROPER TESTING
2018-01-22 23:39:19 (INFO):		WARNING: ACT ON THESE NUMBERS AT YOUR OWN RISK!
2018-01-22 23:39:19 (INFO):		WARNING: BACKTESTING FEATURE NEEDS PROPER TESTING
2018-01-22 23:39:19 (INFO):		WARNING: ACT ON THESE NUMBERS AT YOUR OWN RISK!
2018-01-22 23:39:19 (INFO):		WARNING: BACKTESTING FEATURE NEEDS PROPER TESTING
2018-01-22 23:39:19 (INFO):		WARNING: ACT ON THESE NUMBERS AT YOUR OWN RISK!
  --> POST /api/backtest 200 4,755ms 17.08kb
  --> POST /api/backtest 200 4,771ms 17.08kb
  --> POST /api/backtest 200 4,765ms 17.08kb
  --> POST /api/backtest 200 4,704ms 17.08kb
  --> POST /api/backtest 200 4,706ms 17.08kb

raise ValueError("empty range for randrange()

getting the following error when starting up the application.. Am I setting the configuration wrong?

using candlestick dataset 2017-09-12 00:00:00 to 2017-10-11 23:58:00

Traceback (most recent call last):
File "japonicus.py", line 95, in
gekko_generations(TargetParameters, GenerationMethod, EvaluationMode, web=APP)
File "/Users/kevin/Documents/Workspace/gekkoJaponicus/gekkoJaponicus/evolution_generations.py", line 100, in gekko_generations
EnvironmentParameters=availableDataRange, web=web)
File "/Users/kevin/Documents/Workspace/gekkoJaponicus/gekkoJaponicus/promoterz/world.py", line 27, in init
self.generateLocale()
File "/Users/kevin/Documents/Workspace/gekkoJaponicus/gekkoJaponicus/promoterz/world.py", line 35, in generateLocale
random.choice(self.loops))
File "/Users/kevin/Documents/Workspace/gekkoJaponicus/gekkoJaponicus/promoterz/locale.py", line 39, in init
for x in range(World.genconf.NBCandlestickData) ]
File "/Users/kevin/Documents/Workspace/gekkoJaponicus/gekkoJaponicus/promoterz/locale.py", line 39, in
for x in range(World.genconf.NBCandlestickData) ]
File "/Users/kevin/Documents/Workspace/gekkoJaponicus/gekkoJaponicus/promoterz/locale.py", line 36, in
World.EnvironmentParameters, World.genconf.deltaDays)
File "/Users/kevin/Documents/Workspace/gekkoJaponicus/gekkoJaponicus/promoterz/evaluation/gekko.py", line 291, in getRandomDateRange
Starting= random.randint(FLms,TLms-deltams)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/random.py", line 221, in randint
return self.randrange(a, b+1)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/random.py", line 199, in randrange
raise ValueError("empty range for randrange() (%d,%d, %d)" % (istart, istop, width))
ValueError: empty range for randrange() (1505174400,1502582281, -2592119)
127.0.0.1 - - [12/Jan/2018 22:14:42] "POST /_dash-update-component HTTP/1.1" 200 -
127.0.0.1 - - [12/Jan/2018 22:14:42] "POST /_dash-update-component HTTP/1.1" 200 -

What is supposed to be done?

Great bit of software, thanks developer!
Two things: Can a requirement for python>=3.6 be added to the readme?
Also, what is supposed to be done with the output after 400 epochs?
I ran with the -i option, and at the end was given a load of configuration settings, but what is supposed to be done with them? Do you have any examples please?

Changing Candle size skews results

changed the candle size to 15 and it found a viable strat but the profit percentages were way off. Also the same params were output with different profit results which I thought was weird. Ran a back test on the strat and it is profitable tho. the output below you can see the final profit number is huge, and the fact that they are different even though the params are the same.

Following strategy is viable.
~~~~~~~~~~~~~~~~~~
 6058274895.244 final profit ~~~~
 -- Settings for Gekko config.js -- 
{
  "persistence": 1.9,
  "PPO": {
    "down": -0.9,
    "short": 4.3,
    "up": 0.1,
    "signal": 4.8,
    "long": 14.3
  },
  "TSI": {
    "long": 17.36,
    "short": 4.5,
    "up": 10.9,
    "down": -33.4
  }
}
 -- Settings for Gekko --ui webpage -- 
persistence = 1.9
[PPO]
down = -0.9
short = 4.3
up = 0.1
signal = 4.8
long = 14.3

[TSI]
long = 17.36
short = 4.5
up = 10.9
down = -33.4

__________________________________________________________________

Following strategy is viable.
~~~~~~~~~~~~~~~~~~
 2219543714.842 final profit ~~~~
 -- Settings for Gekko config.js -- 
{
  "persistence": 1.9,
  "PPO": {
    "down": -0.9,
    "short": 4.3,
    "up": 0.1,
    "signal": 4.8,
    "long": 14.3
  },
  "TSI": {
    "long": 17.36,
    "short": 4.5,
    "up": 10.9,
    "down": -33.4
  }
}
 -- Settings for Gekko --ui webpage -- 
persistence = 1.9
[PPO]
down = -0.9
short = 4.3
up = 0.1
signal = 4.8
long = 14.3

[TSI]
long = 17.36
short = 4.5
up = 10.9
down = -33.4

message: "dash_core_components was not found."

When I try to reach the webpage I got the following error

Error loading layout

Error loading dependencies

On my Web browser I got the following error in the console log

Error: dash_core_components was not found.
Stack trace:
resolve@https://unpkg.com/[email protected]/dash_renderer/bundle.js:9:27215
i@https://unpkg.com/[email protected]/dash_renderer/bundle.js:9:28049
i@https://unpkg.com/[email protected]/dash_renderer/bundle.js:9:27789
i@https://unpkg.com/[email protected]/dash_renderer/bundle.js:9:27789
i@https://unpkg.com/[email protected]/dash_renderer/bundle.js:9:27789
value@https://unpkg.com/[email protected]/dash_renderer/bundle.js:9:8353
_renderValidatedComponentWithoutOwnerOrContext@https://unpkg.com/[email protected]/dist/react-dom.min.js:13:10748
_renderValidatedComponent@https://unpkg.com/[email protected]/dist/react-dom.min.js:13:10872
_updateRenderedComponent@https://unpkg.com/[email protected]/dist/react-dom.min.js:13:10172
_performComponentUpdate@https://unpkg.com/[email protected]/dist/react-dom.min.js:13:9973
updateComponent@https://unpkg.com/[email protected]/dist/react-dom.min.js:13:9251
receiveComponent@https://unpkg.com/[email protected]/dist/react-dom.min.js:13:8362
receiveComponent@https://unpkg.com/[email protected]/dist/react-dom.min.js:14:19125
_updateRenderedComponent@https://unpkg.com/[email protected]/dist/react-dom.min.js:13:10219
_performComponentUpdate@https://unpkg.com/[email protected]/dist/react-dom.min.js:13:9973
updateComponent@https://unpkg.com/[email protected]/dist/react-dom.min.js:13:9251
performUpdateIfNecessary@https://unpkg.com/[email protected]/dist/react-dom.min.js:13:8578
performUpdateIfNecessary@https://unpkg.com/[email protected]/dist/react-dom.min.js:14:19307
s@https://unpkg.com/[email protected]/dist/react-dom.min.js:14:23342
perform@https://unpkg.com/[email protected]/dist/react-dom.min.js:15:8934
perform@https://unpkg.com/[email protected]/dist/react-dom.min.js:15:8934
perform@https://unpkg.com/[email protected]/dist/react-dom.min.js:14:24406
T@https://unpkg.com/[email protected]/dist/react-dom.min.js:14:24583
close@https://unpkg.com/[email protected]/dist/react-dom.min.js:14:23982
closeAll@https://unpkg.com/[email protected]/dist/react-dom.min.js:15:9522
perform@https://unpkg.com/[email protected]/dist/react-dom.min.js:15:9014
perform@https://unpkg.com/[email protected]/dist/react-dom.min.js:14:24406
T@https://unpkg.com/[email protected]/dist/react-dom.min.js:14:24583
close@https://unpkg.com/[email protected]/dist/react-dom.min.js:14:23982
closeAll@https://unpkg.com/[email protected]/dist/react-dom.min.js:15:9522
perform@https://unpkg.com/[email protected]/dist/react-dom.min.js:15:9014
perform@https://unpkg.com/[email protected]/dist/react-dom.min.js:14:24406
T@https://unpkg.com/[email protected]/dist/react-dom.min.js:14:24583
closeAll@https://unpkg.com/[email protected]/dist/react-dom.min.js:15:9522
perform@https://unpkg.com/[email protected]/dist/react-dom.min.js:15:9014
batchedUpdates@https://unpkg.com/[email protected]/dist/react-dom.min.js:14:3912
u@https://unpkg.com/[email protected]/dist/react-dom.min.js:14:23624
r@https://unpkg.com/[email protected]/dist/react-dom.min.js:14:21389
enqueueSetState@https://unpkg.com/[email protected]/dist/react-dom.min.js:14:22386
[6]</r.prototype.setState@https://unpkg.com/[email protected]/dist/react.min.js:12:7755
c/</r</a.prototype.handleChange@https://unpkg.com/[email protected]/dash_renderer/bundle.js:28:23503
f@https://unpkg.com/[email protected]/dash_renderer/bundle.js:9:4702
o/</</<@https://unpkg.com/[email protected]/dash_renderer/bundle.js:29:240
n/</</<@https://unpkg.com/[email protected]/dash_renderer/bundle.js:29:977
dispatch@https://unpkg.com/[email protected]/dash_renderer/bundle.js:29:1333
u/</</<@https://unpkg.com/[email protected]/dash_renderer/bundle.js:2:22924
 bundle.js:2:23049

All the requirements seems to be already here

sudo pip install dash_core_components
Requirement already satisfied: dash_core_components in /usr/local/lib/python3.5/dist-packages
Requirement already satisfied: dash in /usr/local/lib/python3.5/dist-packages (from dash_core_components)
Requirement already satisfied: plotly in /usr/local/lib/python3.5/dist-packages (from dash->dash_core_components)
Requirement already satisfied: flask-seasurf in /usr/local/lib/python3.5/dist-packages (from dash->dash_core_components)
Requirement already satisfied: flask-compress in /usr/local/lib/python3.5/dist-packages (from dash->dash_core_components)
Requirement already satisfied: Flask>=0.12 in /usr/local/lib/python3.5/dist-packages (from dash->dash_core_components)
Requirement already satisfied: requests in /usr/local/lib/python3.5/dist-packages (from plotly->dash->dash_core_components)
Requirement already satisfied: nbformat>=4.2 in /usr/local/lib/python3.5/dist-packages (from plotly->dash->dash_core_components)
Requirement already satisfied: decorator>=4.0.6 in /usr/local/lib/python3.5/dist-packages (from plotly->dash->dash_core_components)
Requirement already satisfied: six in /usr/local/lib/python3.5/dist-packages (from plotly->dash->dash_core_components)
Requirement already satisfied: pytz in /usr/local/lib/python3.5/dist-packages (from plotly->dash->dash_core_components)
Requirement already satisfied: click>=2.0 in /usr/local/lib/python3.5/dist-packages (from Flask>=0.12->dash->dash_core_components)
Requirement already satisfied: itsdangerous>=0.21 in /usr/local/lib/python3.5/dist-packages (from Flask>=0.12->dash->dash_core_components)
Requirement already satisfied: Jinja2>=2.4 in /usr/local/lib/python3.5/dist-packages (from Flask>=0.12->dash->dash_core_components)
Requirement already satisfied: Werkzeug>=0.7 in /usr/local/lib/python3.5/dist-packages (from Flask>=0.12->dash->dash_core_components)
Requirement already satisfied: ipython-genutils in /usr/local/lib/python3.5/dist-packages (from nbformat>=4.2->plotly->dash->dash_core_components)
Requirement already satisfied: jupyter-core in /usr/local/lib/python3.5/dist-packages (from nbformat>=4.2->plotly->dash->dash_core_components)
Requirement already satisfied: traitlets>=4.1 in /usr/local/lib/python3.5/dist-packages (from nbformat>=4.2->plotly->dash->dash_core_components)
Requirement already satisfied: jsonschema!=2.5.0,>=2.4 in /usr/local/lib/python3.5/dist-packages (from nbformat>=4.2->plotly->dash->dash_core_components)
Requirement already satisfied: MarkupSafe>=0.23 in /usr/local/lib/python3.5/dist-packages (from Jinja2>=2.4->Flask>=0.12->dash->dash_core_components)

From the shell

python3 web.py
 * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
 * Restarting with stat
 * Debugger is active!
 * Debugger PIN: 536-946-261
91.135.176.215 - - [04/Jan/2018 09:30:37] "GET / HTTP/1.1" 200 -
91.135.176.215 - - [04/Jan/2018 09:30:38] "GET /_dash-layout HTTP/1.1" 200 -
91.135.176.215 - - [04/Jan/2018 09:30:38] "GET /_dash-dependencies HTTP/1.1" 200 -
91.135.176.215 - - [04/Jan/2018 09:30:38] "POST /_dash-update-component HTTP/1.1" 200 -
91.135.176.215 - - [04/Jan/2018 09:30:39] "GET / HTTP/1.1" 200 -
91.135.176.215 - - [04/Jan/2018 09:30:39] "GET /_dash-layout HTTP/1.1" 200 -
91.135.176.215 - - [04/Jan/2018 09:30:39] "GET /_dash-dependencies HTTP/1.1" 200 -
91.135.176.215 - - [04/Jan/2018 09:30:40] "POST /_dash-update-component HTTP/1.1" 200 -

Nota : I move to :

#!/usr/bin/env python3 instead of python

Cheers

Describing the commits

Hey, I love the work you've done with this so far, but could you start adding commit messages with what you've changed instead of a period for your pushes to master? It would make it a lot easier for everyone who's interested in knowing whats changed at a glance.

Thank you!

Error: config failure

I am getting the following error: https://pastebin.com/akErvRyT
I also see in the settings that its looking for a "example-config.js" but I can't find this anywhere and I also wouldn't know what it should contain could you maybe give an example?

Running the command: sudo python3.6 japonicus.py -g -c -w -r

Evaluation crashes after ~90 epochs

$ python japonicus.py -g --strat CCI -w works for around 90/500 epochs, and then crashes:

Traceback (most recent call last):
  File "japonicus.py", line 89, in <module>
    gekko_generations(TargetParameters, GenerationMethod, EvaluationMode, web=APP)
  File "/home/frog/gekkoJaponicus/evolution_generations.py", line 103, in gekko_generations
    World.runEPOCH()
  File "/home/frog/gekkoJaponicus/promoterz/sequence/parallel_world.py", line 31, in world_EPOCH
    World.explodeLocale(random.choice(World.locales))
  File "/home/frog/gekkoJaponicus/promoterz/world.py", line 54, in explodeLocale
    for g in range(len(web.GraphicList)):
NameError: name 'web' is not defined

Unable to use current master

Hi,

it does not work when I try to execute

python japonicus.py

What I did ?

Executed script on both Windows 7 and Ubuntu

Used Python 2.7 and 3

ErrorMessage:

D:\gekko\gekkoJaponicus>python japonicus.py
  File "japonicus.py", line 24
SyntaxError: Non-ASCII character '\xe2' in file japonicus.py on line 25, b
encoding declared; see http://python.org/dev/peps/pep-0263/ for details

==> this is due to utf-8

But even when I fix this one I receive additional import errors for supplement and other errors (e.g. from urllib import Request, Parse)

What worked:

Installation:

$ git clone https://git.com/Gab0/gekkoJaponicus.git
$ cd gekko_japonicus
$ sudo pip install -r requirements.txt

Gekko itself works:

node gekko.js --ui

What help I try to get ?

@Gab0
Can you verify that this works on Windows or Ubuntu when you install and execute it completely new ?
Which version of python I should use ?

tuple error

Using: python3 japonicus.py -b --strat PPO -w

Tuple error on Step 2 section of evolution_bayes.py at:
DateRange = gekkoWrapper.getDateRange(chosenRange, deltaDays=settings['testDays'])

I know little to nothing about phython but was able to get past it by updating the getDateRange function in gekko.py to use:
Limits[1]['to'] instead of Limits['to']

Floats and Float Precision

Seems like all the output is in floats. This is just going to increase the combinations. Example output

 -- Settings for Gekko --ui webpage -- 
persistence = 2.5300000000000002
[PPO]
short = 10.67
long = 23.270000000000003
signal = 4.8
up = 0.1009
down = -0.79021

[TSI]
up = 10.0
down = -34.9
long = 36.56
short = 6.449999999999999

Here is my configStrat

"PPOTSI":{
        "PPO.short": (3,16),
        "PPO.long": (12,35),
        "PPO.signal":(3,21),
        "PPO.up": (0.001, 1),
        "PPO.down": (-1, -0.001),
        "TSI.up": (10,40),
        "TSI.down": (-40,-10),
        "TSI.short": (3,18),
        "TSI.long": (10,42),
        "persistence": (1,10)
    },

The only floats should be PPO.up and PPO.down but all the params are floats. I would also like to be able to set the precision on the ones that are floats. 0.001 should only test floats to that precision.

ASCII Art causes encoding issues

Not sure if this is a limitation of python on linux, my terminal, etc.

Traceback (most recent call last):
  File "japonicus.py", line 54, in <module>
    print(TITLE)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 12-14: ordinal not in range(128)

[suggestion] Requirements needed to run

Would be nice to know what version of Python and other requirements are needed to run gekkoJaponicus.

I've already determined that you need to run it under Python3 and you need to install "deap" by running
sudo pip3 install deap

Genetic evolution wont loop

EPOCH 599/600
Average profit 3.889% Deviation 3.148
Maximum profit 9.149% Minimum profit -1.130%

Traceback (most recent call last):
File "japonicus.py", line 63, in
gekko_generations(strat, GenerationMethod)
File "/opt/neural/evolution_generations.py", line 144, in gekko_generations
FinalIndividueSettings = reconstructTradeSettings(FinalIndividue)
NameError: name 'reconstructTradeSettings' is not defined

Can't run (json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0))

I am trying to get this to work but so far without luck. I found out that this requires Python3 and I've installed DEAR via pip. I've tried this on both a Raspberry pi and a Ubuntu Server.

This is the output of the Ubuntu Server:
$ python3 evolution.py using candlestick dataset {'from': 1451675160, 'to': 1503137160} DEBUG {'MIN_ VALUES': {'thresholds': {'high': 45, 'fibonacci': 0.1, 'persistence': 1, 'up': -0.125, 'down': -1.25, 'low': 10}, 'short': 1, 'long': 10, 'interval': 0, 'signal': 5}} DEBUG {'MAX_ VALUES': {'thresholds': {'high': 95, 'fibonacci': 1.0, 'persistence': 5, 'up': 1.525, 'down': 0.4, 'low': 60}, 'short': 21, 'long': 43, 'interval': 33, 'signal': 15}} Loading new date range; {'from': '2016-04-24 22:12:45', 'to': '2016-04-27 22:12:45'} multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/usr/lib/python3.5/multiprocessing/pool.py", line 119, in worker result = (True, func(*args, **kwds)) File "/usr/lib/python3.5/multiprocessing/pool.py", line 47, in starmapstar return list(itertools.starmap(args[0], args[1])) File "evolution.py", line 74, in Evaluate Score = runBacktest(Settings, DateRange) File "/home/nils/gekkoJaponicus/gekkoWrapper.py", line 91, in runBacktest RESULT = REQ.json() File "/usr/lib/python3/dist-packages/requests/models.py", line 808, in json return complexjson.loads(self.text, **kwargs) File "/usr/lib/python3.5/json/__init__.py", line 319, in loads return _default_decoder.decode(s) File "/usr/lib/python3.5/json/decoder.py", line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python3.5/json/decoder.py", line 357, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) """ The above exception was the direct cause of the following exception: Traceback (most recent call last): File "evolution.py", line 179, in <module> GA = gekko_generations() File "evolution.py", line 140, in gekko_generations fitnesses = parallel.starmap(toolbox.evaluate, to_simulation) File "/usr/lib/python3.5/multiprocessing/pool.py", line 268, in starmap return self._map_async(func, iterable, starmapstar, chunksize).get() File "/usr/lib/python3.5/multiprocessing/pool.py", line 608, in get raise self._value json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

And this is the output of the Pi:
python3 evolution.py using candlestick dataset {'from': 1483747620, 'to': 1491512820} Loading new date range; {'from': '2017-01-25 17:47:26', 'to': '2017-01-28 17:47:26'} Traceback (most recent call last): File "evolution.py", line 205, in <module> GA = gekko_generations() File "evolution.py", line 167, in gekko_generations fitnesses = toolbox.map(toolbox.evaluate, individues_to_simulate) File "evolution.py", line 20, in progrBarMap result.append(funct(array[w])) File "evolution.py", line 111, in Evaluate Score = runBacktest(Settings, DateRange) File "/home/nils/gekkoJaponicus/gekkoWrapper.py", line 91, in runBacktest RESULT = REQ.json() File "/usr/lib/python3/dist-packages/requests/models.py", line 808, in json return complexjson.loads(self.text, **kwargs) File "/usr/lib/python3.5/json/__init__.py", line 319, in loads return _default_decoder.decode(s) File "/usr/lib/python3.5/json/decoder.py", line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python3.5/json/decoder.py", line 357, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

The cli which runs Gekko UI outputs the following:
/home/nils/gekko/plugins/paperTrader/paperTrader.js:14 this.fee = 1 - (calcConfig['fee' + calcConfig.feeUsing.charAt(0).toUpperCase() + calcConfig.feeUsing.slice(1)] + calcConfig.slippage) / 100; TypeError: Cannot read property 'charAt' of undefined at new PaperTrader (/home/nils/gekko/plugins/paperTrader/paperTrader.js:14:57) at load (/home/nils/gekko/core/pluginUtil.js:100:22) at /home/nils/gekko/node_modules/async/dist/async.js:1156:9 at replenish (/home/nils/gekko/node_modules/async/dist/async.js:1030:17) at iterateeCallback (/home/nils/gekko/node_modules/async/dist/async.js:1015:17) at /home/nils/gekko/node_modules/async/dist/async.js:988:16 at /home/nils/gekko/node_modules/async/dist/async.js:1158:13 at load (/home/nils/gekko/core/pluginUtil.js:68:14) at /home/nils/gekko/node_modules/async/dist/async.js:1156:9 at replenish (/home/nils/gekko/node_modules/async/dist/async.js:1030:17) xxx POST /api/backtest 500 247ms - Error: non-error thrown: Child process has died. at Object.onerror (/home/nils/gekko/node_modules/koa/lib/context.js:105:40) at process._tickCallback (internal/process/next_tick.js:109:7)

ImportError: cannot import name supplement

Gekko is setup and working. Japonicus seems to be having an issue with the supplement file.

Ubuntu 17.04 - Node 6.12.1 - Gekko v0.5.10

python japonicus.py -g
Traceback (most recent call last):
File "japonicus.py", line 8, in
from evolution_generations import gekko_generations
File "/home/pete/Projects/gekko/gekkoJaponicus/evolution_generations.py", line 4, in
import promoterz
File "/home/pete/Projects/gekko/gekkoJaponicus/promoterz/init.py", line 5, in
from . import supplement, validation, utils
ImportError: cannot import name supplement

What am I missing?

Hey guys,

I keep getting this, any idea why?

I ran python3 japonicus.py -g --strat RSI -w with the latest gekko in paralel.

Traceback (most recent call last):
File "japonicus.py", line 93, in
gekko_generations(TargetParameters, GenerationMethod, EvaluationMode, web=APP)
File "/home/constantin/Development/gekkoJaponicus/evolution_generations.py", line 77, in gekko_generations
exchange_source=genconf.dataset_source)
File "/home/constantin/Development/gekkoJaponicus/promoterz/evaluation/gekko.py", line 69, in getAvailableDataset
raise "scanset not available: {}".format(watch)
NameError: name 'watch' is not defined

ValueError: empty range for randrange()

Hi,

I've tried long but I can't get the script running. I am now getting below error. Could you help me further with this? Thanks in advance!

pi@raspi:~/gekkoJaponicus $ python3 japonicus.py -g
Traceback (most recent call last):
File "japonicus.py", line 66, in
gekko_generations(settings_, GenerationMethod)
File "/home/pi/gekkoJaponicus/evolution_generations.py", line 34, in gekko_generations
World = promoterz.world.World(GlobalTools, loops, genconf, TargetParameters, NB_LOCALE, EnvironmentParameters=availableDataRange)
File "/home/pi/gekkoJaponicus/promoterz/world.py", line 24, in init
self.generateLocale()
File "/home/pi/gekkoJaponicus/promoterz/world.py", line 34, in generateLocale
L = promoterz.locale.Locale(self, name, position, random.choice(self.loops))
File "/home/pi/gekkoJaponicus/promoterz/locale.py", line 38, in init
World.EnvironmentParameters, World.genconf.deltaDays)
File "/home/pi/gekkoJaponicus/promoterz/evaluation/gekko.py", line 259, in getRandomDateRange
Starting= random.randint(FLms,TLms-deltams-testms)
File "/usr/lib/python3.5/random.py", line 227, in randint
return self.randrange(a, b+1)
File "/usr/lib/python3.5/random.py", line 205, in randrange
raise ValueError("empty range for randrange() (%d,%d, %d)" % (istart, istop, width))
ValueError: empty range for randrange() (1500662280,1500657061, -5219)

TypeError: '>' not supported between instances of 'tuple' and 'int'

Hello,
Getting the following TypeError:

`[root@cpaneldev gekkoJaponicus]# python3.6 japonicus.py -g
Connected Remote Hosts:
http://127.0.0.1:3000
Evolving DEMA strategy;

evaluated parameters ranges:
short (1, 10)
long (20, 50)
thresholds.down (-0.5, 0.1)
thresholds.up (-0.1, 0.5)
using candlestick dataset 2016-12-31 00:01:00 to 2017-10-30 00:00:00
-- Initializing Locale1
-- Initializing Locale2
====== EPOCH 0/500 ======
Locale1
Traceback (most recent call last):
File "japonicus.py", line 66, in
gekko_generations(settings_, GenerationMethod)
File "/home/btctrader/gekkoJaponicus/evolution_generations.py", line 62, in gekko_generations
World.runEPOCH()
File "/home/btctrader/gekkoJaponicus/promoterz/sequence/parallel_world.py", line 12, in world_EPOCH
LOCALE.run()
File "/home/btctrader/gekkoJaponicus/promoterz/locale.py", line 87, in run
self.loop(self.World, self)
File "/home/btctrader/gekkoJaponicus/promoterz/sequence/standard_loop.py", line 15, in standard_loop
locale.population)
File "/home/btctrader/gekkoJaponicus/promoterz/validation.py", line 32, in validatePopulation
elif not (checkPhenotypeAttributeRanges(TargetParameters, phenotype)):
File "/home/btctrader/gekkoJaponicus/promoterz/validation.py", line 20, in checkPhenotypeAttributeRanges
higher = cmp[1][K] > cmp[0][K][1]
TypeError: '>' not supported between instances of 'tuple' and 'int'
`

'float' object is not subscriptable

OS: Mac OS High Sierra
Python version: 3.6.3

the command used: python japonicus.py -g --strat custom

Full console response:

evaluated parameters ranges:
interval                      (1, 10)
short                         (1, 16)
long                          (18, 30)
stop                          1.15
signal                        (1, 10)
thresholds.down               (-0.5, -0.1)
thresholds.up                 (0.1, 0.5)
thresholds.high               (70, 90)
thresholds.low                (15, 30)
thresholds.persistence        (1, 4)
bbparameters.optInTimePeriod  (1, 5)
bbparameters.optInNbDevUp     (1, 5)
bbparameters.optInNbDevDn     (1, 5)
bbparameters.optInMAType      (1, 5)

using candlestick dataset 2017-09-30 14:09:00 to 2017-12-31 15:07:00

	======  EPOCH 0/400  ======
Locale1
Traceback (most recent call last):
  File "japonicus.py", line 99, in <module>
    gekko_generations(TargetParameters, GenerationMethod, EvaluationMode, web=APP)
  File "/Users/hollarves/dev/gekkoJaponicus/evolution_generations.py", line 103, in gekko_generations
    World.runEPOCH()
  File "/Users/hollarves/dev/gekkoJaponicus/promoterz/sequence/parallel_world.py", line 12, in world_EPOCH
    LOCALE.run()
  File "/Users/hollarves/dev/gekkoJaponicus/promoterz/locale.py", line 51, in run
    self.loop(self.World, self)
  File "/Users/hollarves/dev/gekkoJaponicus/promoterz/sequence/standard_loop.py", line 18, in standard_loop
    locale.population)
  File "/Users/hollarves/dev/gekkoJaponicus/promoterz/validation.py", line 32, in validatePopulation
    phenotype=IndividualToSettings(population[p])
  File "/Users/hollarves/dev/gekkoJaponicus/promoterz/representation/oldschool.py", line 28, in constructPhenotype
    Value = R(individue[K], stratSettings[AttributeNames[K]])
  File "/Users/hollarves/dev/gekkoJaponicus/promoterz/representation/oldschool.py", line 23, in <lambda>
    R = lambda V, lim: ((lim[1]-lim[0])/100) * V + lim[0]
TypeError: 'float' object is not subscriptable

I'm not sure if this is happening because I'm using ta-lib indicators, but I don't think so. The strat works perfectly using Gekko through the terminal. The process terminates after this response. If I use -w the process continues, but I keep getting a file not found error. (some .csv file)

Error evolution_generations.py

Hi,

Thanks for for your work.
I have a problem when I run the program.

py -2 japonicus.py -g --repeat 100 --strat RSI

Traceback (most recent call last):
File "japonicus.py", line 9, in
from evolution_generations import gekko_generations
File "C:\Users\User\Downloads\gekkoJaponicus\evolution_generations.py", line 36
print("\r\tevaluating %i:\t%.2f%%" % (l, ((w+1)/l*100)), end='')
^
SyntaxError: invalid syntax

There appears to be a problem in line 36 of the file evolution_generations.py but I do not know how to solve it.

Thanks

Cannot init the evolution, threw "name 'watch' is not defined" and "KeyError: 'global'" if launch with -k param

When the program launched without duplicated gekko instance, the outputs were following,

The profits reported here are the profit beyond market price change;
	i.e. shown profit =  <backtest profit> - <market profit in evaluated candlestick period>;
> StochRSI
Evolving StochRSI strategy;

evaluated parameters ranges:
interval                      (7, 21)
thresholds.low                (15, 45)
thresholds.high               (45, 140)
thresholds.persistence        (4, 10)
Traceback (most recent call last):
  File "japonicus.py", line 99, in <module>
    gekko_generations(TargetParameters, GenerationMethod, EvaluationMode, web=APP)
  File "/root/Gekko/gekkoJaponicus/evolution_generations.py", line 77, in gekko_generations
    exchange_source=genconf.dataset_source)
  File "/root/Gekko/gekkoJaponicus/promoterz/evaluation/gekko.py", line 69, in getAvailableDataset
    raise "scanset not available: {}".format(watch)
NameError: name 'watch' is not defined

and it changed as following if it was with -k param:

Traceback (most recent call last):
  File "japonicus.py", line 35, in <module>
    settings['global']['gekkoPath']+'/web/server.js']
KeyError: 'global'

Using screen with a gekko instance running continuously.
Environment: clean Debian9 + nodejs 7.10.1 + python 3.6.0 (installed with pyenv)
requirements.txt fully installed with pip

A bit confused because the name 'watch' should be already in Settings.py which had it initially even without any personal conf.
Is it because I haven't completely changed the Settings.py and some params lack their proper values, or that it lacks some dependencies to be installed?

Thanks

Updating the watch market

Can you provide some details on how to update the market like exchange , asset and currency ?
I tried updating Settings.py and example-config.js but it still hots USDT and BTC

Error EADDRINUSE

Hello,

I am trying to run Japonicus but I am getting error and there is nothing going on on the dashboard. Can somebody elaborate on this and give some ideas on what can be wrong?

I am starting it with
sudo python3 japonicus.py -b -c -k --repeat 10 -i -w
And I am running it on Virtualbox Ubuntu.

`events.js:160
throw er; // Unhandled 'error' event
^

Error: listen EADDRINUSE 127.0.0.1:3000
at Object.exports._errnoException (util.js:1020:11)
at exports._exceptionWithHostPort (util.js:1043:20)
at Server._listen2 (net.js:1262:14)
at listen (net.js:1298:10)
at net.js:1408:9
at _combinedTickCallback (internal/process/next_tick.js:83:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
at Module.runMain (module.js:606:11)
at run (bootstrap_node.js:383:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:496:3
WEBSERVER MODE

screenshot from 2018-01-17 14-10-48

Run Error with Bayesian

Hello, I've been trying to run GA with no success (I'll make separate post), so I thought I'd try Bayesian, and I'm getting the following error when trying to run python3 japonicus.py -b --strat PPO

The profits reported here are the profit beyond market price change;
	i.e. shown profit =  <backtest profit> - <market profit in evaluated candlestick period>;
Traceback (most recent call last):
  File "japonicus.py", line 102, in <module>
    import evolution_bayes
  File "/home/user/gekko/japonicus/evolution_bayes.py", line 19, in <module>
    import chart
  File "/home/user/gekko/japonicus/chart.py", line 6, in <module>
    import matplotlib.pyplot as plt
  File "/usr/local/lib/python3.6/site-packages/matplotlib/pyplot.py", line 114, in <module>
    _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
  File "/usr/local/lib/python3.6/site-packages/matplotlib/backends/__init__.py", line 32, in pylab_setup
    globals(),locals(),[backend_name],0)
  File "/usr/local/lib/python3.6/site-packages/matplotlib/backends/backend_tkagg.py", line 6, in <module>
    from matplotlib.externals.six.moves import tkinter as Tk
  File "/usr/local/lib/python3.6/site-packages/matplotlib/externals/six.py", line 90, in __get__
    result = self._resolve()
  File "/usr/local/lib/python3.6/site-packages/matplotlib/externals/six.py", line 113, in _resolve
    return _import_module(self.mod)
  File "/usr/local/lib/python3.6/site-packages/matplotlib/externals/six.py", line 80, in _import_module
    __import__(name)
  File "/usr/local/lib/python3.6/tkinter/__init__.py", line 36, in <module>
    import _tkinter # If this fails your Python may not be configured for Tk
ModuleNotFoundError: No module named '_tkinter'

Any thoughts would be appreciated, Thanks!

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.