Tutorial: Using Advanced Features
Writing Custom Entry/Exit Systems
Predicting Future Prices
Predicting Future Prices
i Tutorial Task
Predict the next closing price and generate a trading signal based on that prediction.
When people think of using neural networks and predictions on financial data, they typically think of predicting prices. The theory is that if you can create a reasonably accurate prediction of future prices, you can use that information to determine whether you should be in or out of the market.
The problem with this approach is that financial price information is inherently noisy. There are so many different influences on the prices that predicting the next price or even the direction of the next price can be difficult to do.
Most predictions in TradingSolutions are of the optimal signal. This is essentially predicting what would be the best action to take for the current market conditions. However, it is also possible to predict prices in TradingSolutions and use that information for trading. Let’s see how this can be done.
Ä Note: This particular example works well with the Weyerhaeuser (WY) sample data that we imported in the Using the Interface tutorial. If that data is not available, any data can be used.
Step-by-step Instructions
Part 1. Predict Tomorrow’s Close
1. Right-click on Weyerhaeuser in the Portfolio View and select Add New Field….

Figure 1. Selecting "Add New Field…"
2. Select Predict or model a value and press the Next button.

Figure 2. Location of "Predict or model a value".
3. Review the introduction to the Predict a Value Wizard and press the Next button to advance to the Select Desired Outputs page.
4. Set the Value to Predict to Close.
![]()
Figure 3. Setting "Value to Predict" to "Close".
5. Samples in Advance will automatically update to 1, meaning that the value of the Close field one bar in the future will be predicted. The Preprocessing will automatically set to Percent Change so that the values are kept in a fairly constant range.
6. Press Next to continue.
7. For this example, let’s use only the prices and volume as inputs. Select Raw Data and press Add Selected Input.

Figure 4. Selecting "Raw Data".
8. Press Next to advance to the Select Options page.

Figure 5. Options for creating prediction.
9. By default, TradingSolutions will optimize the selected inputs and neural network settings to find the best results using the last five years of data. Accept these values by pressing Next.
10. On the Create Prediction page, press Finish. TradingSolutions will begin optimizing the prediction.
Step-by-step Instructions
Part 2. Trade Based on Price Prediction
After TradingSolutions has completed optimizing the prediction, you may want to view it in a chart. Typically, price predictions will appear to lag the price by the number of days in the prediction.
When predictions do not have adequate information to work from, they will tend to predict near the mean (average) value. In this case, since we are predicting the percent change in the closing price, that mean value is 0, meaning no change.
This is not to say that no useful information has been predicted. Some directional information can often be derived from even minor price predictions. Let’s see how you can use a simple entry/exit system to determine when to trade based on this information.
11. Right-click on Weyerhaeuser in the Portfolio View and select Add New Field….
12. Select Apply a rule-based entry/exit system and press Next.

Figure 6. Location of "Apply a rule-based entry/exit system."
13. Review the introduction to the Apply an Entry/Exit System Wizard and press the Next button to advance to the Select Entry/Exit System page.
14. By default, all groups of entry/exit systems will be selected. Select the General Entry/Exit Systems group, then select the Predicted Percent Change System and press Next.

Figure 7. Selecting "Predicted Percent Change System".
15. For the Predicted Value input, select Predict: Close in 1 sample.

Figure 8. Selecting "Predict: Close in 1 sample".
16. Press the Next button. This will select the new value for the input and advance to the next step.
17. On the Select Name page, press Finish. TradingSolutions will automatically optimize the entry/exit system settings to extract the best signal from the price prediction.
18. After processing has completed, you will have a new signal for this stock which can be used for trading.
Congratulations!
You have learned the basics of predicting prices with TradingSolutions. As with predicting the optimal signal, the selection of inputs will have a lot to do with how successful your individual signals are.
You have also learned how to use a basic entry/exit system to extract directional information from the prediction and use it for trading.
_ Continue to the next task.