NOTE: In NeuroShell Trader, open the chart named “Example 20 – Eminis Combined Nets Hybrid” which is the basis for following example:
It is possible to load predictions (neural nets) into a trading strategy. You could to this to enhance the simplified trading strategy that the Prediction Wizard creates. Some reasons for doing this include:
Making a strategy with a neural net that has added trailing stops.
Making a trading strategy that uses several neural nets to make a decision (called ensemble nets in the literature).
Incorporating rules with the neural net for a hybrid strategy.
In this example we examine both number 2 and number 3 above by making a strategy with three neural networks and a traditional rule. Our strategy makes entries and exits when two of the four conditions (3 nets and a rule) are true.
First note that our three predictions where not optimized (i.e. the inputs were not optimized), but we did optimize the threshold (trading) rules as selected in the Positions tab. Of course, we could have optimized the predictions if we had wanted to.
Next examine the trading strategy to see how we inserted the completed nets. The Prediction Wizard makes these long and short entry and exit rules just so that we can insert them into a trading strategy. If you insert Existing Data/Calculations, then open up the Prediction outputs by clicking on plus signs, you can see where we found them.
Note – these prediction rules inserted into a trading strategy cannot be further optimized by parameter search because they are fixed. If you use rule selection or full optimization, the optimizer can eliminate them if it desires, however. They cannot be re-trained in the trading strategy either (we sell several add-on neural nets which CAN be optimized and trained inside trading strategy, however.)
Note – there is another way you can insert predications from the Prediction Wizard into a trading strategy that is a little harder but gives you more flexibility. You can insert an A>B indicator, where A is the prediction signal, and B is the threshold – either the one the Prediction Wizard found, or another one you choose. This way, you can re-optimize the threshold in the trading strategy along with other variables in the trading strategy.
In our trading strategy we used the venerable RSI rule that we have used as an example often. Then we optimized the trading strategy with custom optimization. We thus instructed the optimizer to do a combination or rule selection and parameter search. The optimizer was forced to keep the RSI rule, but could optimize its parameters. It was not forced to keep all of the prediction rules. We used the recommended optimization goal (return times equity curve correlation), which attempts to build a smoothly rising equity curve, rather than trying to make the most money it can.
In this case the combined strategy out-performed the individual nets, which is what we hoped for in combining them.
You should examine the rules dialog to see how we did the custom optimization, and then examine the result summary to see which rules were kept and how the optimizer changed the parameters.
In this example we used continuous futures contracts where the historical contracts are “glued” together to make a long running contract that we can use when we want plenty of historical data. In this case we used eSignal data to load the NASDAQ and S&P 500 eminis, but other data suppliers have similar contracts with different symbol nomenclature. We set the point values but did not bother declaring the margin, because we were more interested in finding correct peaks and valleys than in correct profit calculations.