Detecting Leading Indicators with Correlation Analysis

 

Neural networks work by modeling the relationship between the inputs and the outputs. The stronger that this relationship is, the more likely that a neural network will be able to model an appropriate output for each set of inputs.

 

To facilitate finding good inputs, TradingSolutions includes the Correlation Analysis Wizard, which allows you to compare potential desired outputs to potential inputs to determine if there is a relationship between them.

 

Correlation analysis uses the Pearson product moment correlation coefficient ("r") to determine whether two values increase and decrease at the same times by the similar amounts. It performs this analysis on the previous values of potential inputs to determine the best potential leading indicators based on this type of analysis.

Ä    Note: Since correlation analysis uses a linear relationship and neural networks detect non-linear relationships, correlation analysis does not find all possible inputs or even the best possible inputs. However, it can identify strong relationships that may be useful for predictions.

Analyzing Data for Correlations

Correlation analysis is begun by selecting a primary field to analyze. This field is then compared to a list of other fields to determine if there is a correlation between them. The analysis can check if other fields may be good inputs for predicting this field. It can also be reversed to determine if this field may be a good input for predicting other fields.

 

The primary field for the correlation analysis can be a field in a data series or a field in a group. If a group field is selected, all of the underlying data fields are analyzed as primary fields at the same time.

:    For example, if you select the Close field for the entire portfolio, the closing price of every data series in the portfolio will be examined against whichever fields you specify.

 

Depending on whether you are analyzing a data series field or a group field, there are several ways to start the Correlation Analysis Wizard.

 

If you would like to analyze a field in a data series:

·      From the Portfolio View

Select Analyze Correlations… from the context menu for a data series. This will display a field selection tree dialog that allows you to select which field to analyze.

·      From the Modify Field Dialog for a data series field

Press the Correlation Analysis button from the Quick Actions section of the Overview page.

·      From a Chart View

Select Analyze Field… from the context menu for a field. If a prediction or signal field is selected, a training analysis or signal analysis will appear instead of a correlation analysis. In this case, simply switch to the Overview page and press the Correlation Analysis button.

·      From a Spreadsheet View

Select Analyze Field… from the context menu for the heading of a field in the spreadsheet. However, if a prediction or signal field is selected, a training analysis or signal analysis will appear instead of a correlation analysis. In this case, simply switch to the Overview page and press the Correlation Analysis button.

 

If you would like to analyze a field for an entire group:

·      From the Portfolio View

Select Analyze Correlations… from the context menu for the portfolio of a subgroup. This will display a field selection tree dialog that allows you to select which field to analyze.

·      From the Modify Field Dialog for a group field

Press the Correlation Analysis button from the Quick Actions section of the Overview page.

 

If a correlation analysis has been performed for the selected field, the results of the previous analysis will be displayed on the Modify Field Dialog: Correlation Analysis page. Otherwise, the Correlation Analysis Wizard will be displayed.

Ä    Note: If you would like to replace an existing analysis with a new analysis, you can either press the Change Analysis button to modify the existing analysis or press the Delete Analysis button and then start a new one. Both of these buttons appear beneath the current analysis on the Modify Field Dialog: Correlation Analysis page.

Using the Correlation Analysis Wizard

The Correlation Analysis Wizard begins by asking what type of analysis you would like to perform. As stated above, you can check if other fields may be good inputs for predicting this field or determine if this field may be a good input for predicting other fields.

 

The next page of the wizard is the Analysis Fields page, which allows you to select which fields to analyze. Any field in the portfolio can be analyzed. To narrow the search significantly, you can elect to analyze only one or two fields from each data series. For example, if you are searching for leading indicators to the Close field for IBM, you may want to only analyze the Close fields of other technical stocks, rather than all of the fields in those stocks.

 

After selecting the fields to analyze, the Correlation Analysis Wizard concludes with the Analysis Options page, which includes settings for the date range to analyze and other options. It is important to note that the date range is restricted to dates that all of the data has values for. This means that if one or more short-term data series are included in the analysis, only a limited date range may be available for analysis.

 

Once the Correlation Analysis Wizard is completed, TradingSolutions will begin the analysis process. If a large number of fields and leads has been selected, this may take a significant amount of time, especially when analyzing group fields. The Status Dialog will quickly determine a good estimate of the length of the overall process and display that while the analysis is taking place.

 

Once the analysis has completed, the Modify Field Dialog: Correlation Analysis page will be displayed with the results of the analysis, sorted in order of the strength of correlation. Since a large analysis could potentially produce tens of thousands of results, only the top results are kept and displayed.

 

This information can be used directly from this page to create new predictions. For data field predictions, simply select the fields you would like to include in a prediction and press Create a New Prediction from the Selected Fields…. For group field predictions, select one primary data field to predict and press Display Correlation for Selected Data Field Only…. Once the display has been narrowed to one data field, you can create a prediction the same as if the analysis had been run for only that field.

 

Creating a prediction using this method can be a good way to identify an initial set of potential inputs. As stated above, these inputs may not be the only inputs or the best possible inputs. However, one or more highly correlated inputs should provide a good basis for a new prediction.