zenbot icon indicating copy to clipboard operation
zenbot copied to clipboard

Neural genetic_backtester bugs

Open vea45 opened this issue 9 years ago • 3 comments

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

vea45 avatar Dec 03 '17 20:12 vea45

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

DeviaVir avatar Dec 04 '17 09:12 DeviaVir

Why add selector when it automaticaly set by commonArgs?

BARBARIN-Michael avatar Dec 04 '17 20:12 BARBARIN-Michael

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) },

vea45 avatar Dec 04 '17 20:12 vea45