-
Notifications
You must be signed in to change notification settings - Fork 2k
Implement genetic algo for fine tuning strategy parameters #298
Comments
hurr hurr hurr, i'm waaaay ahead of you. Unfortunately it's in python but i'm getting some good results #299 I have very little documentation currently, unfortunately. Inside To launch:
I also wrote a thesis on parameter tuning with genetic algorithms, if you're interested: |
@arpheno How are you using your python strat with a JS based system? Does your python algo run theny ou take the outputted data over to zenbot? |
Yes.
…On Fri, Jun 16, 2017 at 6:57 PM Jordan ***@***.***> wrote:
@arpheno <https://github.com/arpheno> How are you using your python strat
with a JS based system? Does your python algo run theny ou take the
outputted data over to zenbot?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#298 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABBzGh2FMd3a-oRbJMK2MYmQ0I2UUyeaks5sErQHgaJpZM4N8Xyg>
.
|
@arpheno Great work, I'll take a look. Have you seen the algo that I have linked? |
I've setting up your work. I'm still waiting for backfilling.. |
Finally i've succeeded in run your genetics.. After a fight with the new f-strings feature in python 3.6 and after.. I'm go to run some simulations and we will see |
I will be glad to hear how it went. Currently 4 people are running it
including you and me.
…On Sun, Jun 18, 2017 at 11:49 PM gelotus ***@***.***> wrote:
Finally i've succeeded in run your genetics.. After a fight with the new
f-strings feature in python 3.6 and after.. I'm go to run some simulations
and we will see
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#298 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABBzGhTrr80VtSOnyldDRc19d8gmKWcxks5sFZtxgaJpZM4N8Xyg>
.
|
@arpheno sorry, i'm not expert in python, but seems to be a bug in evaluate_zen() that not pass the right values. If I print fitness var I obtain always [-100, -100]. Please take a look |
Ok, with your fix all seems to work right.
With long simulations the simulations directory grows fast in size, needs a fix. In the hall of fame all the population have the same parameters. |
can you pull the latest version? I think both issues should be addressed there. |
Well done, whit your last commit all work seamlessly. |
hey swozny what's happen in your repo? If someone want to try this is my repo: Take a look in conf.py, Selectors are in conf, days are the days of trade, polulation in the number of live individuals after a generation change, min 10 default 10, strategy is the same of zenbot, default trend_ema, if backfill is present, it will turn on autobackfill timer during sim for updating the trade history. Note that in my repo the docker files are absent. Pick those in carlos repo |
I tried to merge your PR and it deleted the dockerfiles. I got a lot of
complaints from other people when I merged it, so I had to revert :(
…On Thu, Jun 29, 2017 at 12:11 AM gelotus ***@***.***> wrote:
hey swozny what's happen in your repo?
Anyway I've tried to merge some of my ideas in your work. Environment
configuration, selectors configuration and autobackfilling. The draw
function is broken but i have create a little 'if' that point in conf for
turning on or off. I've also setting minimum limit in parameters.
Now i'm working in linux env, need some good guy that try this in docker,
because i'm the king of the ignorants on this env.
Will be a good thing to append a "date-time from to" to the hall of fame
for improve analisys of results with autobackfill turned on.
If someone want to try this is my repo:
https://github.com/gelotus/zenbot
Take a look in conf.py,
command syntax varied a little bit:
for manual backfilling <zenbot_dir>$ fab
autobackfill_local:"<selector>,<days>"
for starting sim
<zenbot_dir>/zen $ python3.6 -m scoop main.py <selector> <days>
[<population>][<strategy>] [backfill]
Selectors are in conf, days are the days of trade, polulation in the
number of live individuals after a generation change, min 10 default 10,
strategy is the same of zenbot, default trend_ema, if backfill is present,
it will turn on autobackfill timer during sim for updating the trade
history.
Note that in my repo the docker files are absent. Pick those in carlos repo
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#298 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABBzGv84k3scHIEKmRZwiSKM6N-bHdPyks5sIs-JgaJpZM4N8Xyg>
.
|
ok, let's try to implement a windows+docker env and test with it.. |
I think I'll get to work on this on the weekend :)
I'm absolutely amazed that someone is building on my work, not gonna let it
go to waste.
…On Thu, Jun 29, 2017 at 9:13 PM gelotus ***@***.***> wrote:
ok, let's try to implement a windows+docker env and test with it..
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#298 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABBzGo4P6BMB1gmgH-DupmY24cGNmCorks5sI_GegaJpZM4N8Xyg>
.
|
Just droppin my 2 cents: would be cool if trading would be performed by agent with best score, while in the background there is still evolution going on data of past day or so (quickly iterate) and if found better agent, use that. (While keeping backups in case of unpredicted disasters) |
I think you're very courageous if you're not double checking the strategy
the optimizer comes up with before throwing it at real money.
…On Thu, Jun 29, 2017 at 11:02 PM Maximus-CZ ***@***.***> wrote:
Just droppin my 2 cents: would be cool if trading would be performed by
agent with best score, while in the background there is still evolution
going on data of past day or so (quickly iterate) and if found better
agent, use that. (While keeping backups in case of unpredicted disasters)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#298 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABBzGqFtuWJh5i04MVIt0Wl29exXNHcUks5sJA2PgaJpZM4N8Xyg>
.
|
Well before agent would trade with real money, it would first need to run trough simulations to verify its profitability, If I had 2 agents with simulated +10% and +30% ROI respectively, I wouldnt really see a problem switching to better agent at runtime. |
A little question.. Who uses docker? And on windows or on linux? I've see that the last docker for windows works only on windows 10, both stable and edge versions. For windows 7-8-8.1 there is docker-toolbox. That's very fragmented, on linux i don't see the convenience of using docker.. But i don't know, need an advice |
@arpheno are you vanished? :) Take a look in my repo, docker was reinserted. |
Hey Guys, Just want to say thanks for all your efforts to implement genetic algorithms into zenbot. It has been the first introduction to the topic for me and i think im hooked 👍 For the last few weeks I have been trying to add covariance matrix adaptation evolution strategy, which i believe will automatically adjust cx and mut probabilities to help with convergence and to prevent getting stuck on local maximums allowing us to develop and optimise more complex strategies. I think this should be possible and relatively easy using the tools from the python deap package a la: http://deap.readthedocs.io/en/master/examples/cmaes.html Unfortunately this is my first introduction to both python and evolution strategies, and to be honest, i'm a bit out of my depth. @gelotus, @arpheno I was wondering if you guys, (or anyone else) would be able to have a look (im sad to see development seems to have stopped on this fork). I think this would be very beneficial to zenbot development and for me personally very rewarding (emotionally... maybe financially too !) =) So far I have basically tried to frankenstein the example into the code by swonzy but it is not working with the compiling error:
I think I need help to correctly register fitness and individual functions into the deap toolbox..
|
I too am interested in learning more about live ML/genetic algo integration for realtime trade-bot strategy optimization, but my knowledge here is limited at the moment. I'm more than happy to start digging into the code myself, and probably will, but am also curious if @gelotus and/or @arpheno have any news regarding their efforts 🔥 |
Has anybody encountered this problem? Im using a custom strategy and the only option it has is a --period option. It works fine for regular simulations and trading. I'm getting this error:
|
The randrange() function is being called on a range with no depth (1,1), hence the error. Looking up the trace, we see the function is calling randrange(a, b+1). On mobile right now so debugging is limited, but I would check to see what variable "b" is supposed to represent, and figure out why it's being passed through as 0 |
@jaketblank |
The problem isn't with the randrange() function - if it was there would be a major problem with all python code that uses it :) (That file should be located in "/usr/local/lib/python3.6/" on your system, just for reference) I'd start looking in "individual_base.py" and look at the "mate()" method. See, then track forwards to see where values are being generated/sent to randrange() |
that means b = 0 and if b = size - 1 then size = 1 |
I get a strange error: When genetic_algo starts it prints: Starting evolution.... Then after a while: The algo never stops, repeatedly printing: What could be wrong? The DB was correctly backfilled. |
Should I worry about this thing: /usr/local/lib/python3.6/dist-packages/deap/tools/_hypervolume/pyhv.py:33: ImportWarning: Falling back to the python version of hypervolume module. Expect this to be very slow. |
@albabosh I'm having the same output of you |
Have a look at pull request #1078. Now this issue doesn't come up any more for me (because a set can hold more than 1 individual now, after deleting the overwritten version of eq . |
Can this be closed? |
For me it's ok
Il 06 mar 2018 10:13 PM, "LoneWolf345" <notifications@github.com> ha
scritto:
… Can this be closed?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#298 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA9DL5I96Va_CsxDMxZyyaYjLvE8UZsrks5tbvwMgaJpZM4N8Xyg>
.
|
Take a look genetic-js
It is also present on npm.
Let's discuss here
The text was updated successfully, but these errors were encountered: