November 2014 Newsletter – Adding ChaosHunter Models to NeuroShell Trader

November 19, 2014

Adding ChaosHunter Models to NeuroShell Trader

You can design your ChaosHunter model to either predict the future value of some time series, or to create profit based signals, depending on what you select for an Optimization goal function on the Optimization tab.

ChaosHunter Error Models
If you want your ChaosHunter model to make a prediction for the next’s bar’s open and you want to set a ChaosHunter optimization goal to Maximize the R-squared value or minimize mean squared error, your training data file must include a column for the close the number of days into the future that you want to predict.  In

NeuroShell Trader, it’s easy to create that value in your training data file by using the Lead indicator from the Basic category and set the periods ahead to the number of bars ahead you want to predict.   In ChaosHunter, this lead value becomes the output value you are trying to predict.

 

ChaosHunter Profit Based Models
If you select an optimization goal under theTrading Strategies sectionin ChaosHunter, you will need to select the Open as the output on the Inputs tab. (ChaosHunter calculates profit based on entering a trade at the Open.)  ChaosHunter presumes that the trade will be executed on the next bar’s open.  If you want your model to execute on more than one bar in advance, you need to add a column to your training data that is the value of the open the same number of bars into the future that you are trying to predict and select that column as the output for the model.

Execute the Model in NeuroShell Trader

Once you have saved your ChaosHunter model, you can load it into NeuroShell Trader as an indicator.   Go to the NeuroShell Trader’s insert menu and look for the category called External Program and Library Calls, which is usually near the bottom of the list.

 

ChaosHunter Output – this is the actual value of the formula.

ChaosHunter Signal – this is a buy or sell signal produced by comparing the output to the buy/sell thresholds.

ChaosHunter Equity – this is shows the sum of the profit made by the model.

We will discuss each of the possible indicators that can be inserted. All of them use the same inputs (parameters in NeuroShell) that the model in ChaosHunter selected.    Click here to read more.

 

Adding ChaosHunter Models to NeuroShell Trader continuedChaosHunter

ChaosHunter Output

This is the result of the calculations of the ChaosHunter formula derived on every bar. If you are doing a profit based calculation, this formula is compared to a buy threshold and a sell threshold that the ChaosHunter also evolved. If you want to use the NeuroShell Relational indicators to compare this computation to the thresholds and use those indicators in a NeuroShell Trading Strategy, you may do so. Otherwise, it might be easier to use the Signal – see the discussion below about the ChaosHunter Signal.

If you have built a “scientific model”, in other words you built a non-profit based model that tries to predict price or some indicator, you can still make a NeuroShell Trading strategy with the ChaosHunter Output. In these cases you will also use the relational indicators to compare to a threshold in the Trading Strategy Wizard. You can even use the NeuroShell Optimizer to find the best thresholds to use.

ChaosHunter Signal

This signal tells you whether you should enter or exit a long or short position. You can examine this signal in the Trading Strategy Wizard to make a decision about when to take a position, instead of comparing the ChaosHunter Output to thresholds. The Signal implicitly knows about the thresholds.

Below are the signal values and meanings. The signal starts out at 0, which is a neutral (not in any position). The signal stays at a given value until a new entry or exit occurs.

signal = 1:  Enter into a long position on the next bar.

signal = 0:  Exit the current position on the next bar and enter neutral (no position).

signal = -1: Enter into a short position on the next bar.

To implement the ChaosHunter signal in a NeuroShell Trader Trading Strategy rule, use the  A = B indicator from the Relational Category as follows:

If you have specified a true reversal when you created the model in ChaosHunter, the signal will start out at 0 but when trading starts it will go directly between 1 and -1 without ever becoming 0 again. (Long Exit and Short Exit Rules are not needed for a true reversal).  In this case, the switch of signal implicitly signals an exit from the current position simultaneous with an entry into the opposite position.  Note that if you select true reversal in ChaosHunter, in NeuroShell Trader you need to turn on the option for Long/Short entries exit existing short/long positions on the Sizing tab in the Trading Strategy Parameters to insure the results will be the same.

ChaosHunter Equity

If you put this indicator into a chart, you will see the equity curve from the beginning of the chart. It will be slightly different than the NeuroShell equity curve because NeuroShell restarts the curve and statistics at the end of the Optimization period and at the end of the Paper Trading period (if any). Also, the NeuroShell equity curve has access to both Open and Close prices and can compute the equity based on the Close of each bar. ChaosHunter has only one price stream in the main program (Open is recommended), so there will be slight differences in the equity curves based upon the two different methodologies.

Note About Data Files When Applying ChaosHunter Models
It should be noted that the ChaosHunter itself requires all model inputs to be present in the data file when firing the model. The model remembers all inputs (including all potential inputs) on which it was optimized. If any of the model inputs is missing from the data file, the program will issue a warning that inputs are missing and will not fire the model. This ensures that the results of the optimization session always match the results produced by firing the model.

The NeuroShell Trader chart file along with the ChaosHunter model and data files are available fromwww.ward.net in the examples section for both products.

This is the first in a series of articles about using ChaosHunter models in other trading platforms.

Was this article helpful?

Related Articles