Parameter optimization of Neural strategies
Hi friends,
Is there any guide on how to optimize the parameters for neural strategies? I found several posts about using the genetic algorithm to optimize the parameters. I did not see any information if it can be used for neural strategies as well. However, I could not run the genetic algorithm and appreciate if anybody could help. The steps mentioned by Gekko warez did not work for me. I found some others had the same problem with running the genetic algorithm.
I help you with the config.
All other things solve by yourself.
Apply that pull request from git.
const randomExt = require('random-ext');

const config = {
 stratName: 'neuralnet',
 gekkoConfig: {
   watch: {
     exchange: 'binance',
     currency: 'BTC',
     asset: 'NCASH'

    daterange: {
       from: '2018-04-10 19:15',
       to: '2018-04-14 19:13'

   simulationBalance: {
     'asset': 0,
     'currency': 100

   slippage: 0.10,
   feeTaker: 0.10,
   feeMaker: 0.10,
   feeUsing: 'maker', // maker || taker

 apiUrl: 'http://localhost:3000',

 // Population size, better reduce this for larger data
 populationAmt: 20,
 //  How many completely new units will be added to the population (populationAmt * variation must be a whole number!!)
 variation: 0.5,

 // How many components maximum to mutate at once
 mutateElements: 3,

 // How many parallel queries to run at once
 parallelqueries: 8,

 // profit || score
 // score = profit * sharpe -- feedback?
 // profit = recommended!
 mainObjective: 'profit',

 // optionally recieve and archive new all time high every new all time high
 notifications: {
   email: {
     enabled: false,
     receiver: '',
     senderservice: 'gmail',
     sender: '',
     senderpass: '',
 candleValues: [ 2, 3, 5 ],
 getProperties: () => ({
   // Strat settings must be flattened and cannot be nested for mutation to work properly!

 historySize: 20,
 threshold_buy: randomExt.float(1.20,0.30).toFixed(2),
 threshold_sell: randomExt.float(-0.30,-0.80).toFixed(2),
 price_buffer_len: 100,
 learning_rate: randomExt.float(1.10,0.01).toFixed(2),
 momentum: 0.10,
 decay: 0.10,
 min_predictions: 20,
 candleSize: randomExt.pick(config.candleValues)    

module.exports = config;
And ofc tailor the parameters as you wish
Good luck
Hi Remo,
I appreciate your help. It's working now, let's see what will be the best output. On a different note, if you are using the neural network, I'm wondering what is your impression about it. There are many classical strategies which use a combination of indicators like RSI and MACD. Do you think sophisticated strategies like neural network works better than those classical ones? Any advantage or disadvantage? Also, since we are in a bearish market now, what is your suggestion for the time period of backtesting? One month, two or more?

Forum Jump:

Users browsing this thread: