Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

Genetic algorithm to fine tune strategy parameters #299

Closed
wants to merge 75 commits into from

Conversation

arpheno
Copy link

@arpheno arpheno commented Jun 16, 2017

I don't think it's in a state to be merged, but i'd like to have a discussion

swozny and others added 30 commits June 9, 2017 11:59
…tegy. To run:

`docker-compose up`
`docker-compose exec server bash`
`python zen/main.py <days> gdax.BTC-EUR`
…tegy. To run:

`docker-compose up`
`docker-compose exec server bash`
`python zen/main.py  gdax.BTC-EUR <days>`
@nao0811ta
Copy link

nao0811ta commented Jun 28, 2017

Thank you all
DQN Awesome..

Do you know why happen like below?

python -m scoop main.py ETH-BTC 10 30 macd backfill
[2017-06-28 15:51:12,306] launcher  INFO    SCOOP 0.7 1.1 on linux using Python 3.6.1 (default, Jun 20 2017, 15:15:55) [GCC 4.8.3 20140911 (Red Hat 4.8.3-9)], API: 1013
[2017-06-28 15:51:12,306] launcher  INFO    Deploying 2 worker(s) over 1 host(s).
[2017-06-28 15:51:12,306] launcher  INFO    Worker distribution:
[2017-06-28 15:51:12,306] launcher  INFO       127.0.0.1:       1 + origin 
Auto backfilling is ON
Executing inital backfilling, please wait...
Traceback (most recent call last):
  File "/home/ec2-user/.pyenv/versions/3.6.1/envs/zen-polo/lib/python3.6/site-packages/fabric/main.py", line 672, in main
    docstring, callables, default = load_fabfile(fabfile)
  File "/home/ec2-user/.pyenv/versions/3.6.1/envs/zen-polo/lib/python3.6/site-packages/fabric/main.py", line 173, in load_fabfile
    imported = importer(os.path.splitext(fabfile)[0])
  File "/home/ec2-user/workspace/zen4-polo/fabfile.py", line 5, in <module>
    from zen import path, pyexc, selectors
  File "/home/ec2-user/workspace/zen4-polo/zen/__init__.py", line 1, in <module>
    from conf import path, pyexc, selectors
ImportError: cannot import name 'path'

@Yroethiel
Copy link

Any suggestions why "docker-compose build" fails with this Dockerfile?

It breaks on Step 4/17:

RUN apt-get update && apt-get install -y --no-install-recommends tcl tk && rm -rf /var/lib/apt/lists/*

The error I get is:

ERROR: Service 'server' failed to build: the command '/bin/sh apt-get update && apt-get install -y --no-install-recommends tcl tk && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 1

Latest version of Debian Jessie, latest python, latest npm, latest Docker. Tried on ubuntu as well.

@arpheno
Copy link
Author

arpheno commented Jun 28, 2017 via email

@Yroethiel
Copy link

Yeah, has me confused as well. All cloned via git, using today's release. Same issue on the release from May 22.

@sandroid10
Copy link

@arpheno i am getting this error inside docker ( i did backfill)

Evaluating 10 individuals over 3 days in 2 partitions.
Mating function is <function cxTwoPoint at 0x7f9dc17ce400>
Mutating function is functools.partial(<function mutGaussian at 0x7f9dc01efae8>, mu=0, sigma=20, indpb=0.3)
Sampling an initial valid population, this may take a while...
Currently 0 valid individuals
|
...x......Currently 5 valid individuals
|
..........Traceback (most recent call last):
File "/usr/local/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/usr/local/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/usr/local/lib/python3.6/site-packages/scoop/bootstrap/main.py", line 302, in
b.main()
File "/usr/local/lib/python3.6/site-packages/scoop/bootstrap/main.py", line 92, in main
self.run()
File "/usr/local/lib/python3.6/site-packages/scoop/bootstrap/main.py", line 290, in run
futures_startup()
File "/usr/local/lib/python3.6/site-packages/scoop/bootstrap/main.py", line 271, in futures_startup
run_name="main"
File "/usr/local/lib/python3.6/site-packages/scoop/futures.py", line 64, in _startup
result = _controller.switch(rootFuture, *args, **kargs)
File "/usr/local/lib/python3.6/site-packages/scoop/_control.py", line 253, in runController
raise future.exceptionValue
File "/usr/local/lib/python3.6/site-packages/scoop/_control.py", line 127, in runFuture
future.resultValue = future.callable(*future.args, **future.kargs)
File "/usr/local/lib/python3.6/runpy.py", line 263, in run_path
pkg_name=pkg_name, script_name=fname)
File "/usr/local/lib/python3.6/runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "/usr/local/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "main.py", line 42, in
res = main(INSTRUMENT, TOTAL_DAYS, popsize, strategy)
File "main.py", line 25, in main
res = evolve(evaluate, Andividual, popsize)
File "/app/zen/evolution/init.py", line 18, in evolve
return algorithm(cls, popsize, futures.map, evaluate, select, breed, mutate, stats, history, hof)
File "/app/zen/evolution/core.py", line 21, in algorithm
log_stuff(g, history, hof, population, stats)
File "/app/zen/evolution/utils.py", line 30, in log_stuff
hof.persist()
File "/app/zen/halloffame.py", line 27, in persist
with open('logs/hof/{runid}.txt'.format(runid=runid), 'w') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'logs/hof/3520.txt'
[2017-07-25 17:02:54,946] launcher (127.0.0.1:37786) INFO Root process is done.
[2017-07-25 17:02:54,946] launcher (127.0.0.1:37786) INFO Finished cleaning spawned subprocesses.

@Ekliptor
Copy link

Ekliptor commented Jul 25, 2017

What's the difference between elites and specialists in your selection algorithm? I understand the goal of the algorithm is to find the most profitable strategy parameters. So what is the criteria for "profitable" for elites and specialists?

Repository owner deleted a comment from sandroid1 Jul 26, 2017
Copy link
Owner

@DeviaVir DeviaVir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arpheno I would like to merge your PR, but there are still a few unhandled comments and things I would like to see changed.

The most important one, in my eyes, is that this should live in the /scripts/ folder and not touch so many other files that have relatively little to do with the proposed additions.

@evseevnn-zz
Copy link
Contributor

evseevnn-zz commented Oct 3, 2017

@arpheno That work? how soon you wanna solve problem of PR?
May be somebody can help?

@DeviaVir
Copy link
Owner

DeviaVir commented Oct 6, 2017

Superseded by #598

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet