Features in the NeuroShell Trader Professional

The following are the primary new features in the NeuroShell Trader Professional:

I. An Overview of the NeuroShell Trader Professional

The Trader and the Professional Trader are actually the same program, but the software protection will determine whether or not a user can run the Professional features. Therefore, if you have the regular Trader release 2.0 or higher, you can easily upgrade to the Professional by email or phone.

There are more details below, but as promised, the Professional Trader has features to optimize the inputs to nets. There have been others who have used Genetic Algorithms (GAs) to find inputs to feed a net before, but we are also finding optimum parameters for the indicators you are using, as well as the buy/sell thresholds when training by profit. Additionally, there are several new objective functions, not just simple profit.

However, the most exciting thing about the Professional Trader may not have anything to do with neural nets. The most exciting thing may be the trading strategy optimizer, which optimizes systems by GA even if they don’t have neural nets! For example, you can enter a traditional trading strategy (using crossovers and breakouts, say) and then find optimal parameters for those crossovers and breakouts. Not only that, but you can tell the optimizer to get rid of useless rules if you have provided several. We have actually built some pretty good trading systems that didn’t use nets at all.

Of course, you can use nets and re-optimize thresholds. This may be useful if your strategy has rules other than AB thresholds that should be optimized with the AB, or you want to optimize on different periods.

II. A System for Professionals Only.

Precisely because of its power, the NeuroShell Trader Professional is not for everybody; that’s why we call it “Professional”. DO NOT ORDER THE NEUROSHELL TRADER PROFESSIONAL IF YOU ARE LOOKING FOR A SILVER BULLET! As you can see, there will be a lot of fantastic features with which you can experiment. But in fact the NeuroShell Trader Professional is not a panacea. You shouldn’t just throw “everything but the kitchen sink” at it and expect immediate gratification in the form of fantastic out-of-sample predictions. Although that works sometimes, it often does not.

As a powerful optimizer, the NeuroShell Trader Professional can, with very little effort, build highly over-fit models much easier than you can do it yourself! They will look great in-sample, but fall apart out-of-sample and during later trading. Also, even genetic algorithms can take a great deal of time optimizing with too many variables. For these reasons, you must be professional enough to recognize that powerful optimizers can do this, and professional enough to experiment and take steps to avoid over-fitting.

Among the suggestions we have relative to the above are:

1. Start with pretty good models and use optimization to make modest improvements to them. Search only a little on either side of the indicator parameters that are presently being used.

2. Make sure you stick to a very few inputs to neural nets (usually about 5). When finding an optimum set of inputs, tell the optimizer to use at most 5 inputs.

3. Make sure that you do out of sample testing when you optimize trading strategies.

4. Experiment with stopping optimization not long after it has begun to avoid over optimizing.

5. When optimizing neural nets, consider optimizing on out of sample evaluation sets instead of the oldest walk-forward training set. (But don’t go back too far in time when the market was different.)

6. Consider and experiment with optimizing neural nets or trading strategies, but not both in the same trading system.

7. When optimizing neural nets, use very few hidden neurons. This will not only help prevent over-fitting, but will keep it from taking forever to optimize.

8. Use different objective (fitness) functions when optimizing. These can make all the difference in the world. We are providing plenty and considering offering more in the future. Unfortunately, there are no rules on when to use which ones.

The NeuroShell Trader Professional is a power tool, and like most power tools, it can help you but only if used properly and carefully.

III. How Are Genetic Algorithms Different than other Optimizers?

Most optimization techniques used today are simple “exhaustive search” methods, meaning that every possible combination is tried to see what was the best one. This is a very accurate approach, since you are bound to find the best combination of variables – eventually. However, it is a very inefficient approach, because whenever there are more than a few thousand combinations, it takes too long to try them all. That is why users of exhaustive search optimizers tend to limit the number of variables they use, or tend to limit the number of values these variables can take.

The genetic algorithm, by contrast, does not try every possible combination. It attempts instead to intelligently get closer and closer to the best solution. Therefore, far more variables can be utilized, and you can allow all values of a variable. Optimization can still take a good deal of time if you give a GA a fair number of variables, but it will be doing much more work in that amount of time.

More efficient optimizers than exhaustive search optimizers are in use. If they are not genetic algorithms, however, they are most likely only searching one section of the search space at a time. Genetic algorithms are searching dozens or hundreds of parts of the search space simultaneously. This means they are far less susceptible to becoming stuck in “local minima” as the others quite often do. (Local minima are decent solutions that the optimizer can never “get out of” in order to find better solutions.) However, many of these optimization techniques are faster than a GA provided the problem is easily solved, and not subject to deep local minima.

IV. Features of the Professional Trader

The hallmark of the Professional Trader is the integration of genetic algorithms for a number of different optimizations. The GeneHunter engine is now in the NeuroShell Trader. You can optimize the creation of networks or trading strategies. As previously mentioned, optimization of trading strategies does not require that the strategy contain a neural network.

A. Prediction Wizard Optimizations.


The Prediction Wizard now has a screen (above) that allows one of the following four options (not in this order):

1) Input selection. In this mode the genetic algorithm selects which of many inputs you have chosen are most useful. Only the ones it decides are best are used in the final training. Note that the usefulness of an input is evaluated in conjunction with all other inputs. In other words, the GA is really finding an optimum SET of inputs, not inputs that are by themselves necessarily useful. These inputs do not have to be indicators built by the Trader. They can be any data stream you load. You load quite a few more indicators than you want to eventually use (we wouldn’t suggest many more than 20 to 60 for best results). Elsewhere in the wizard you will specify the maximum number of inputs that you want the GA to keep (we like between 3 and 12 to enhance chances of good generalization). The GA will search through combinations looking for the set of inputs which is less than or equal to the maximum number of inputs that you specified and which, as a set during training, optimizes the training criteria (e.g., maximize profit, minimize error, etc.). No parameters of any inputs that are indicators are modified or optimized; they are used just as you have specified them.

2) Parameter Search. In this mode, the genetic algorithm will use all of the inputs you have chosen, but it will optimize the parameters of all indicators you have used as inputs, even if they are embedded in other indicators. In other words, if one of your inputs is the 10 period lag of the 5 period momentum of the close, the genetic algorithm may change the periods to 6 and 3 respectively if the resulting indicator works best. (You can even tell it to select among open, high, low, and close). Note that the optimized parameters are evaluated in combination with the other optimized indicators and other inputs. In other words, it is possible that the parameterization of an indicator does not produce an indicator that is useful by itself. It may only be useful in combination with the entire set of optimized inputs. Note that optimization can only be accomplished on indicators which you have entered using the Trader’s Indicator Wizard (even if it was entered from the Prediction Wizard). Other data streams used as inputs will still be used during optimization, but not optimized. Keep your number of inputs between 5 and 30 for best results.

3) Full Optimization. In this mode, both input selection and parameter optimization are accomplished at the same time. This is a very advanced concept, and we are not currently aware of any other programs capable of this using a GA. Note however, that the GA is doing more work (i.e., using more variables) than in doing either input selection or parameter optimization separately. Therefore, for best results, keep your number of inputs below about 30 if they are all indicators.

4) No Optimization. In this mode, neither input selection nor parameter optimization takes place. The inputs are used just as you have selected them.

There is another form of optimization called threshold optimization that can take place or not in any of the modes above, including the no optimization mode. More on threshold optimization later.

B. Setting Parameter Ranges for Input Indicator Optimization

When the GA needs to do parameter optimization, it needs to know an appropriate range of numbers in which to search. For example, how far back is it reasonable to go for the periods in a lag or a regression slope?

After you enter an indicator into the list of neural network (prediction) inputs, a default range is already set up for you, (e.g., periods might be 1 to 10.) These defaults are pretty reasonable, but you can change them if you wish before the optimization starts. If you narrow the range, (e.g., 1 to 5), the optimization may take less time to find a good solution. However, if the BEST solution was 15, you will not find it. If you expand the range, say 1 to 100, the optimization may take much longer because the search space is larger. Longer lookbacks may not be reasonable to use in many predictions, so the GA is wasting time.

In order to change the range of a parameter, click in the plus sign (+) next to the indicator as listed in the input list (see below). The indicator will be “expanded” to show all of the parameters in it or its embedded indicators. If you double click on any parameter, a dialog box will appear to allow you to set the range.

After you click on plus (+), the parameters are listed below the indicator in the order in which they appear in the indicator. E.g., for the indicator lag(momentum(close,5),5), the 5 for the momentum will be listed before the 5 for the lag.

C. Controlling the Optimizations – The Objectives Tab


The objective tab gives the user a choice of training objective functions (genetic algorithm fitness functions). The combo box has a broad assortment of built-in functions from which you can choose, including the familiar error minimization of the pervious release. There are now quite a number of profit oriented functions, including:

return on account, net profit, ratio gross profit/loss, % profitable trades, average trade profit, max drawdown, max open trade drawdown, ratio net profit/max drawdown, average bar profit.

There are also some new error oriented functions, including:

correlation, mean squared error, and R squared.

Not all functions may result in the type of trading you like to accomplish, and how they perform could depend upon many factors, like the issue you are trading, the inputs you have chosen, the time periods chosen, and many other things. If some objective functions don’t perform for you, try some others.

Note that even if you select minimize error, trading statistics for the net can still be calculated based on the trading rules on the bottom of the dialog box. You can still choose whether you want trading simulated with long positions, short positions, or both.

At the bottom of the dialog box, you may specify your own trading rule thresholds, or you may let the genetic algorithm find them.

Note that the “profit” objective in the old Trader is the one that is now called “Return on Trades”.

D. Controlling Optimizations ‘ the Advanced Tab

The advanced tab can play a very important role in how optimization is accomplished. Since this is a professional program, you have some flexibility in determining how the program works. You also have a responsibility to experiment and find out what is right for you; we cannot do more than provide general guidelines.

Realize that during optimization, the genetic algorithm is choosing inputs, parameters, and thresholds (depending upon your selections) and then training and applying a network with each such choice. Hundreds or even thousands of networks might be trained.

Understand too that the Turboprop 2 network paradigm trains by adding hidden neurons one by one, up to a maximum of 80. Zero hidden neurons produce a linear model, and the model becomes more and more non-linear the more hidden neurons are added. Generally speaking, the more hidden neurons added, the “tighter” the fit becomes and the longer the training takes. (Previous practitioners of older types of neural nets like the primitive “backpropagation” nets are cautioned not to try to equate Turboprop 2 performance with a certain number of hidden neurons with backpropagation performance using the same number. These are very different algorithms.)

Therefore, it should be obvious that the more hidden neurons that are added during training of the many nets of the optimization phase, the longer optimization will take. We have therefore provided a sliding bar to allow you to set the maximum number that can be added during the genetic optimization. The default is 10. It is under the heading Optimization Parameters.

Next, if you have selected the Input Selection or Full Optimization mode of optimization, you may select the MAXIMUM number of inputs that the GA is allowed to use. The GA may determine that less is better. Remember that the more inputs in a network, the greater the chances of “over-fitting”.

Finally, we will discuss the small check box marked “Adjust training for trending markets by evenly distributing training bars.” Understand that neural networks are pattern recognition devices: they make predictions based upon what happened during training when they encountered similar patterns. If your training set covered a period of a strong and sustained bull or bear market, the majority of the patterns are likely to be all in one direction. Neural nets aren’t likely to predict the other direction well at all in such a case. Ideally, you’d like to have about half of your training patterns showing uptrends, and the other half showing downtrends, to varying degrees.

Turning on this option will cause your training sets to be automatically balanced in this way. If you are predicting some output that shows both positive and negative numbers (like percent change), the algorithm will produce a training set having roughly the same number of both signs. If your output is an indicator that always has the same sign (like an indicator that is always between 0 and 100) then the algorithm will select even numbers above and below the mean based on the data’s distribution.

E. Optimization of Trading Strategies Using Genetic Algorithms.

As previously mentioned, this may be the most exciting feature of the Professional Trader, because it enables optimum trading strategies to be built even if they do not involve neural nets. It will also optimize all of a strategy if some conditions use nets and some do not. It means the Professional Trader is no longer just a neural network package, but a complete artificial intelligence driven trading system.


The Trading Strategy Wizard now has a dialog box like the one shown above. There are several choices for optimizing trading strategies. Instead of selecting inputs, or selecting parameters of indicators used as inputs like the Prediction Wizard does, the Trading Strategy Wizard does something different but similar.

Recall that trading strategies are essentially rules (conditions) that initiate buying or selling whenever some number that you specify are true. The conditions are indicators that may have parameters associated with them, e.g., AB where A is the net prediction and B is lag(momentum(close,3),2). The GA will select amongst multiple conditions, and also select the parameters in those conditions, as follows:

1. Parameter Search – all of your conditions (rules) are used, but the GA evolves optimum parameters for you. These parameters do not produce rules that are individually optimum, but optimal as a complete set.

2. Rule Selection – Chooses among all the rules you have specified, leaving you with only the ones that work best together.

3. Full Optimization – performs both Parameter Search and Rule Selection at the same time.

4. No Optimization – Performs just like the Trader’s Trading Strategy, not modifying deleting any rules and not modifying any rule parameters.

F. Controlling Trading Optimization – the General Tab


In this tab, the label “Range of dates Used to Evaluate Trading Strategy” is new. If you choose “User specified date ranges”, then the Dates tab becomes active for more specific selections (see below).

If you choose, “Match date ranges to prediction(s) used in trading strategy”, then the wizard will match in-sample and out-of-sample sets to those used by the Prediction Wizard. This feature is only available if you have nets somewhere in your trading strategy, and those nets had walk-forwards. The evolution optimization is performed on the in-sample data the nets used (marked on the out-of-sample net as a gray line), and the backtest itself is done on the networks’ out-of-sample data (shown on the chart as a green prediction line). Using this option gives you the most protection against over-fitting, because the final backtest is done on a time period that was neither in-sample for the neural nets nor for the genetic algorithms.

G. Controlling Trading Optimizations – the Dates Tab


This tab allows you to set your own dates for both optimization (shown on the bottom of the dialog box) and for the subsequent backtest. Only the bottom of this dialog box is new in the Professional Trader.

In the picture above, we have elected to optimize over the same period as the subsequent backtest. This is a little risky, because we are really looking at in-sample results. On the other hand, the NeuroShell Professional Trader is, we believe, the first software to optimize trading strategies that actually offers an alternative. In other words, we are the first to provide a backtest out of sample from the optimization. Therefore, you might want to take some risk here since it has been standard practice for some time.

If you do not want to take that risk, you can elect to optimize over a time period prior to the backtest (like two years as shown above), or back to a specific date.

If you select the option back to a specific date, the optimization will end when the backtest begins, unless the specific date you choose is actually within the backtest period. In that case, the optimization period will end when the backtest ends.

H. Optimization Progress Bar.

During an optimization of a prediction or a trading strategy, there is a progress bar that shows approximately the progress of the optimization and the amount of time remaining. Please don’t set your watch by this bar! Due to the method of genetic optimization we are using, it is impossible to know exactly when the optimization will end. Frequently, the bar will even be moved backwards when a better solution is found and the algorithm decides to continue longer. So the time estimate is very rough indeed.

I. Saving of Custom indicators.

Indicators you build can now be saved and used later in different charts. Saved indicators can also be loaded into the regular Trader, meaning that you can now sell or distribute indicators to all NeuroShell Trader users. You can save them in existing indicator categories, or invent your own.

To create a custom indicator, first build it in the Indicator Wizard as usual. In order to save your indicator, you use the Save Indicator button in the Indicator Wizard. To activate this button, click on any level of the indicator as shown in the picture below:


Then the following dialog box appears:

Furthermore, if you distribute one of these custom indicators, you can specify the help topic and help file that will be displayed if the end user presses “Indicator Help”. Of course, you are responsible for writing this help file yourself.

The Advanced button brings up the following:


The parameters of those indicators can be hidden from end users, meaning that your proprietary secrets will be safe. Also, parameters the user sees can be mapped to multiple parameters in the indicators. For example, if your custom indicator uses close a lot, the user only had to define it once.


J. Alerts

The Professional Trader can allow creation of sound and/or popup custom text alerts when an event occurs. Unlike some packages that have a limited number of alerts available, the NeuroShell Trader alerts are unlimited in scope and can be based upon any combination of indicators, predictions, and/or trading strategies.

Alerts are inserted from the Insert menu, just like indicators:


You can give your alerts special names and even notes to yourself:


Then, when you later view the Alert window, you are notified of all alerts (like all such layouts in the Trader, clicking on a column sorts the display by that column):


Alerts can be modified in the same manner in which you modify indicators, predictions, and trading strategies.

K.  Calls to NeuroShell 2 and Predictor/Classifier Nets

You can now call neural networks you created with NeuroShell 2, NeuroShell Predictor, or NeuroShell Classifier within the Trader. These net calls are special indicators in the ‘External Program & Library Calls’ category in the Indicator Wizard. You still have to train these nets within the respective programs, but they can be fired in the Trader, looking like an indicator. This indicator can then be used in a trading strategy, another indicator, or even another net. It is easy to train nets in these programs using Trader data if you use the Trader’s file export facility.

In order to call Predictor/Classifier networks, you must own the NeuroShell Run-Time Server.

When you call the indicator to fire NeuroShell 2 nets you must not only pass it the inputs to the net in the proper order, but the path to the .DEF file as well. For Predictor and Classifier nets, you will need the path to the saved network file as well as the inputs.



L.  Calls to user created DLL functions/subroutines

The NeuroShell Trader Professional now has indictors that can call external DLLs created (usually) in C or C++ (‘External Program & Library Calls’ category in the Indicator Wizard). This is a very powerful feature, because it means that now you can build custom indicators and other functions and use them in the NeuroShell Trader. You can even build a business selling these to NeuroShell Trader users. However, you will need to have a programmer available to help you set up the calls to the DLLs, and the programmer will have to know something about the DLL he/she is trying to call.

There are two types of DLL calls:

1. Calling DLL by value. In this mode, the DLL is called once for each bar. The inputs to the DLL will usually be some current or lagged values, and the output will be associated with that bar on the chart. This mode would be perfect for building a custom indicator in C++.



2. Calling DLL by array. In this mode, the DLL is called only once for the entire chart. Each parameter is an array that is as large as the number of bars loaded in the chart. The output is an array of the same size. This mode is for building some sort of process that needs all the data at once. One example might be your own custom model, like a neural network. Note, however, that training a neural network could take some time, during which the user is staring at a frozen chart. Also, the indicator is called each time the chart is refreshed, so you will want to have a mechanism that is aware that it shouldn’t retrain each time the DLL is called.

M. New Indicators

We have added 10 Fast Fourier Transform indicators, 21 Principle Component Analysis indicators, and 12 Wavelet indicators (a new indicator category exists for each type).


Was this article helpful?

Related Articles