This repository has been archived by the owner on Feb 15, 2022. It is now read-only.
Allow making some darwin values be sticky and not mutate by passing them on the command line #1175
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I wanted to be able to pass in extra args the commands, but previously everything was hard-coded. Only stuff specifically defined in darwin.js phenotype definitions would be passed along, and could not be overridden from the initial command line call. Now those parameters are passed along dynamically, along with it being possible to override them if you choose to add them to your command. The ultimate goal here being to make it convenient to more tightly control what kind of experiment you intend to run without having to go and change the source code.
Now if you run:
./scripts/genetic_backtester/darwin.js --selector="gdax.BTC-USD" --currency_capital=1000 --asset_capital=0 --use_strategies=trend_ema --period=60m --days=1 --population=8 --markdown_buy_pct=4.1 --min_periods=2
You'll see:
There you can see since I've passed
--markdown_buy_pct=4.1 --min_periods=2
into the original command, those get passed along to the inner commands and they never evolve or mutate.Also incidentally the change on line 613 fixes a bug in the current unstable branch where the "Best Results" would have an "undefined" in it: