I don’t know what I could add over and above the section in the user’s guide “Neural Networks”. This section gives the details down to the equations. Here are some of the relevant sections, with the parts I think address your question highlighted in red:
The output from the network is defined by the following equations:
H1 = tanh(w11 * I1 + w21 * I2 + … + wn1 * In)
H2 = tanh(w12 * I1 + w22 * I2 + … + wn2 * In)
…
Hm = tanh(w1m * I1 + w2m * I2 + … + wnm * In)
Output = tanh(wnm+1 * H1 + wnm+2 * H2 + … + wnm+m * Hm)
The Ii represent the inputs. In the context of trading, these could be anything that might have some predictive value for trading, such as momentum, stochastics, ADX, moving averages, etc. The Hj represent the hidden nodes, the weights are given by the wkl, and the output value by Output. The hyperbolic tangent function, tanh, returns a value in the range -1 to +1, so the output will lie in this range. The inputs are typically scaled so that they also lie between -1 and +1.
…
In Builder, the inputs to the network are chosen by the genetic programming process and evolved along with the entry and exit conditions using the same processes of crossover and mutation used to evolve the entry and exit conditions. …
In addition to evolving the inputs to the network, Builder also evolves the number of nodes in the hidden layer and the weight values. The initial number of inputs is a user-selectable option, along with the maximum number of nodes in the hidden layer. The number of inputs may change from strategy to strategy over successive generations as the inputs from different strategies are combined using crossover.
The total number of weights in the network will be given by (n + 1) * m, where n is the number of inputs and m is the number of nodes in the hidden layer, provided m is at least one. If there is no hidden layer (i.e., m is zero), the number of weights is the same as the number of inputs. In the resulting strategy code, each weight is listed as a strategy input. Other strategy inputs may result from the network inputs, such as the look-back length of a moving average.
So, provided you’re selecting non-zero values for the maximum number of hidden nodes and initial number of inputs, you should be seeing hidden nodes in at least some cases. If not, just increase the maximum number of hidden nodes and/or the initial number of inputs.
Mike Bryant
Adaptrade Software
I would say that hidden nodes are the rule rather than the exception. Initially, the number of hidden nodes is chosen randomly between 0 and the value you specify. You can therefore increase the number of hidden nodes by increasing the maximum allowable value chosen as input. During evolution of the strategies, your other settings and metrics will determine whether networks with more or fewer hidden nodes will rise to the top. If you’ve selected “complexity” as a metric, that could be biasing the results to ones with simpler neural networks. It also might simply be the nature of your market and other metrics. If you want to see the full range of diversity in the initially chosen neural networks, just run it with zero generations.
Mike Bryant