October 17, 2013
|
NeuroShell Trader Tricks and Techniques
by Marge Sherald, CEO
|
We often get technical support questions that sound complex but can be answered by a few simple tricks. For example, if you have an indicator that calculates an output in the range from 0 to minus 10, and you would rather have that indicator be in the 0 to plus 10 range for your trading system, all you have to do is apply the negative indicator to your original indicator. The negative indicator is located in the Arithmetic category.
Different Order Types If you are working with daily bars and want your Trading Strategy to exit on market close on the same day you entered a trade, you can change the order type from the default of market to Market on Close (current). This order type exits at the closing price of the last completed bar. The exit price is the closing price plus slippage. ChoosingMarket on Close (current)will prevent you from holding a position overnight. *
There’s also a Market on Close (next bar) order that allows you to exit at the closing of the next bar. The exit price is the closing price plus slippage.
*Note that both market on close orders work for backtesting, but in realtime trading they still fire at the end of the bar (and not before the bar ends). In order to get out before the end of the day in real time, you would have to place a manual trade. Otherwise, the order would be filled at the next day’s open.
These order types may also be used with intraday charts, but will exit upon completion of a bar or the next bar rather than waiting for the end of day.
In the example above, the close was used as an entry condition, but other conditions may be substituted. (Since the close of a bar is always present it makes the condition true, which then triggers an entry or exit.)
Different Prediction Outputs The Output tab in the Prediction Wizard defaults to the Percent Change in Open. We set that default based on our experience that it is better to predict a normalized value over time such as Percent Change rather than predicting a price directly. Even if the prices in your training history have doubled in value over several years of daily training data, the percent change from one day to the next does not usually vary that much. Therefore, if you predict a percent change your prediction model should be more accurate.
However, it sometimes pays to experiment and I took advantage of the Prediction Wizard’s ability to choose a different output. You can choose any of the other options in the drop down list or you can specify any other data stream on your chart by selecting Other Data/Indicators. For this example, I chose the Optimal Buy/Sell Hold based on Open because I wasn’t as much interested in predicting the amount of the change, but whether the price was approaching a peak or a valley. The output produces a 1 when prices are going upwards towards a peak or a -1 when prices are going downwards towards a price valley. When values are 0, it signals a hold. (See the help topic Neural Network – Output Discussion for details.)
The inputs for the model are the Relative Strength indicator from the Price Momentum Category, and the Money Flow Index, which is a volume weighted form of RSI that uses an Average of Open, High, Low, and Close instead of just one price stream. The closer the Index is to 100, the more positive the money flow, while values near 0 indicate a negative money flow.
When I fed those inputs to the net, the in-sample signals were not very frequent because the market was in trend mode. The out-of-sample period was more choppy but the model was smart enough to generate signals on the more frequent peaks and valleys.
Position Sizing Now that I had a prediction model that performed well in the out-of-sample period, I wanted to see what the position sizing option in the Power User version could add to the model. I created a Trading Strategy based on the neural network entry and exit conditions and I locked the rules. In the Trading Strategy parameters on the Sizing tab, I chose a fixed size of 10000 units, Fixed leverage, Kelly formula, and Optimal f. (These different methods are described in detail in the Position Sizing Methods help topic.) I let the optimizer choose the most appropriate sizing method.
The optimizer chose the Kelly formula as the sizing method. The net profit for the out-of-sample period rose to $14,818.21 compared to $273.00 for the original prediction.
The chart is available from www.ward.net in the New and Updated Examples section.
|
|
|
|
ChaosHunter Finds Net Inputs – Revised Version
by Marge Sherald, CEO
|
ChaosHunter can create readable formulas to model your data using the inputs and functions that you select. You can save a ChaosHunter model and import it into the NeuroShell Trader so it may be used in combination with other trading rules or neural network predictions.
However, sometimes I don’t want to use the entire formula found by ChaosHunter in my Trader model. Instead I want to use the different optimization technique in ChaosHunter to search for the best inputs to a neural network that I later create in NeuroShell Trader.
I’ll give you can example. I exported the data from the NeuroShell Trader FOREX model described in the September newsletter and opened the file in ChaosHunter. I set the open* as the output and used AUD/GBP, AUD/EURO, AUD/CAD, and gold as inputs to the model. *In the previous newsletter I incorrectly used the %change in open as the output. ChaosHunter needs a price stream such as the open in order to calculate the returns correctly.
Next I loaded the Steve Ward Intraday model template from the ChaosHunter File Menu, Load Template option. The template saved me from individually changing the optimization model settings that he recommended in the ChaosHunter help file. I removed the option to use technical indicators and the chaos variable because I wanted ChaosHunter to find a fairly simple model.
I let the model optimize on 12 cores, taking advantage of ChaosHunter’s ability to use other computers on my network. As optimization progressed I dismissed the formulas that included only one of the three Aussie cross pairs and the price of gold from the Trader model. When ChaosHunter found a model with reasonable results that used the AUD/GBP and AUD/CAD cross pairs plus gold, I stopped optimization.
I returned to NeuroShell Trader and fed the two cross pairs plus gold into an Adaptive TurboProp3 indicator that was included in anotherTrading Strategy. The Adaptive TurboProp indicator was set to retrain on every bar.
The result was an improved Trading Strategy that increased profits compared to the original Trading Strategy while still being able to keep up with changing markets.
The revised ChaosHunter data and model files are available from the ChaosHunter section of www.ward.net.
|