Tutorial: Creating Trading Signals
Predicting the Optimal Signal
Add an Input to a Prediction
i Tutorial Task
Predict the current value of an optimal signal.
The most common way to create a signal in TradingSolutions is to model the optimal signal. In essence, this is predicting the correct position to be in to take advantage of the anticipated short-term variations in the prices.
Neural networks work by "training" a mathematical model to take a group of known "input" data and transform it as best as possible into a "desired output". In this case, we would like to take what we know about the market and predict what position we should be in. Therefore, our desired output is the position we should be in throughout the history of the stock.
To determine what position we should have been, TradingSolutions creates an "optimal signal". It does this by looking forward at each point in the history of the stock to determine what position would have produced the best profit within a given set of guidelines.
Step-by-step Instructions
Part 1: Create an Optimal Signal
First, let’s create the optimal signal.
1. Right-click on Merck & Co., Inc. and select Add New Field…. This will display the Create a Field Wizard.

Figure 1. Selecting "Add New Field…".
2. Select Generate an optimal signal and press Next.

Figure 2. Location of "Generate an optimal signal".
3. Review the introduction to the Generate an Optimal Signal Wizard and press the Next button.
4. TradingSolutions uses several parameters to determine what type of profit opportunities to look for. For now, accept the default values by pressing Next.

Figure 3. Parameters for optimal signal.
5. Press Finish. TradingSolutions will perform some brief processing and the optimal signal will be ready to use.
Ä Note: You only need to create one optimal signal for each stock. The exception to this would be if you are experimenting with other parameters to the optimal signal.
Step-by-step Instructions
Part 2: Predict the Optimal Signal
Now, let’s predict the current value of the optimal signal.
6. Right-click on Merck & Co., Inc. and select Add New Field… again.
7. Select Predict or model a value.

Figure 4. Location of "Predict or model a value".
8. Review the introduction to the Predict a Value Wizard and press the Next button to advance to the Select Desired Outputs page.
9. Set the Value to Predict to Optimal Signal (Default Stock/ETF Trading Style).
Ä Note: Optimal signals with other names and parameters may be also created for this stock if you applied trading solutions to this stock. For this example, select the optimal signal with the name listed here.
![]()
Figure 5. Setting "Value to Predict".
10. Press Next to advance to the Select Inputs page.
11. Now we indicate what information is available to the neural network for predicting the desired output. This can be any of the following:
· Raw price data for this stock
· Pre-calculated indicators or other fields for this stock
· Raw price data or indicators for another data series, such as an index.
· Optimizable functions, which are typically indicators you want to try multiple values for.
12. Let’s add all of the raw data. Using Select from fields in this data series, select Raw Data. Then, press Add Selected Input.
Ä Note: If you have previously applied a trading solution to this stock, it may be necessary to scroll up to see "Raw Data" above the Close field.

Figure 6. Selecting "Raw Data".
13. Let’s add an optimized percent difference between the closing price and its moving average. Change Select from fields in this data series to Select from optimizable functions.

Figure 7. Selecting "Select from optimizable functions".
14. Expand Series Averaging Functions, scroll down and select Percent Difference from Moving Average. Then, press Add Selected Input.
Ä Note: There may be several similarly named functions in this list. Select the first one. Function names which are longer than the list box can be seen by scrolling the mouse over the abbreviated listings.

Figure 8. Selecting "Percent Difference from Moving Average".
15. Press Next to advance to the Select Options page.

Figure 9. Options for creating prediction.
16. 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.
17. On the Create Prediction page, press Finish. TradingSolutions will begin optimizing the prediction.
18. Let TradingSolutions perform the requested tasks. Optimizing a new signal can take several minutes. For information on monitoring this processing, see the Notes.
19. After processing has completed, you will have a new signal for this stock which can be used for trading. For information on how to analyze signal or use it for trading, see the Notes.
Congratulations!
You have learned the basics of creating a model of the optimal signal. In most cases, you will want to select additional functions or pre-calculated indicators as inputs to provide more information. For more information on this, see the Video Help and help documentation.
Applying a trading solution performed many of these steps for us. Once you find a set of inputs that works well, you will probably want to create a trading solution based on that approach so that you do not need to select each input again.
_ Continue to the next task.