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

Conversation

@glennfu
Copy link
Contributor

@glennfu glennfu commented Feb 1, 2018

The roi calculation in darwin.js does nothing but dump to the generation's json file. It's not used for fitness calcs or anything, it's just extra stuff. The problem with it is that if you run a backtest with currency_capital == 0 and asset_capital > 0 then it'll crash because it doesn't know how to compute roi without any starting currency. There's lots and lots of ideas about how to get the right information to calculate this correctly, but there's already plenty of other values actually being displayed and used for comparison's sake besides roi so it's easier to just get rid of this.

To see it crash for yourself, here's the command:

./scripts/genetic_backtester/darwin.js --days=1 --selector="gdax.BTC-USD" --asset_capital=0.4 --currency_capital=0 --use_strategies=trend_ema --periodLength=15m --population=2

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.

👍 agreed

@DeviaVir DeviaVir merged commit b4ec1f6 into DeviaVir:unstable Feb 1, 2018
This was referenced Feb 1, 2018
DeviaVir pushed a commit that referenced this pull request Feb 1, 2018
ROI is used in the status display

This brings back the ROI and fixes the glitch reference in #1258
Heerpa pushed a commit to Heerpa/zenbot that referenced this pull request Feb 25, 2018
Heerpa pushed a commit to Heerpa/zenbot that referenced this pull request Feb 25, 2018
ROI is used in the status display

This brings back the ROI and fixes the glitch reference in DeviaVir#1258
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.

2 participants