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

Neural genetic_backtester bugs #792

Open
vea45 opened this issue Dec 3, 2017 · 3 comments
Open

Neural genetic_backtester bugs #792

vea45 opened this issue Dec 3, 2017 · 3 comments

Comments

@vea45
Copy link

vea45 commented Dec 3, 2017

I tried the genetic backtester with the new neural strategy and during the process the simulations performed by the algorithm never performs any trade or any profit.

So I modified the 'darwin.js' file to correct a couple of things that I think was wrong:
[Neural strategy]
-Changed the 'momentum' and 'decay' range of values to float values between 0 and 1.
-Added the '--selector' option on the runCommand (it is specified on the neural strategy).

[Backfilling]
-This script didn't backfilled the data so I fixed the command order.

I attached the fixed file (in .txt...). It now performs the backtesting on neural correctly. If someone can validate my changes... Thank you!
darwin.js.txt

@DeviaVir
Copy link
Owner

DeviaVir commented Dec 4, 2017

Please send a PR with the changes so we can review.

@BARBARIN-Michael
Copy link

Why add selector when it automaticaly set by commonArgs?

@vea45
Copy link
Author

vea45 commented Dec 4, 2017

Ok sorry I will do the PR.

Inside the "neural" strategy js module the "selector" is reincluded... so I didn't checked if it really does something important but just in case I respected it.
This is a fragment of the neural strategy module (zenbot/extensions/strategies/neural/strategy.js):
return {
name: 'neural',
description: 'Use neural learning to predict future price. Buy = mean(last 3 real prices) < mean(current & last prediction)',
getOptions: function () {
this.option('period', 'period length - make sure to lower your poll trades time to lower than this value', String, '1m')
this.option('activation_1_type', "Neuron Activation Type: sigmoid, tanh, relu", String, 'sigmoid')
this.option('neurons_1', "Neurons in layer 1 Shoot for atleast 100", Number, 1)
this.option('depth', "Rows of data to predict ahead for matches/learning", Number, 5)
this.option('selector', "Selector", String, 'Gdax.BTC-USD')
this.option('min_periods', "Periods to calculate learn from", Number, 300)
this.option('min_predict', "Periods to predict next number from", Number, 100)
this.option('momentum', "momentum of prediction", Number, 0.9)
this.option('decay', "decay of prediction, use teeny tiny increments", Number, 0)
this.option('threads', "Number of processing threads you'd like to run (best for sim)", Number, 1)
this.option('learns', "Number of times to 'learn' the neural network with past data", Number, 10)
this.option('markup_pct', "Defaulting a markup percent", Number, 0.05)
},

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

No branches or pull requests

3 participants