Tutorial: Using Correlation Analysis to Identify Inputs: Use Correlation Analysis for an Entire Group

Use Correlation Analysis for an Entire Group

i   Tutorial Task
Run correlation analysis on a Close field for group of stocks.

 

You can perform correlation analysis on a field at the group level. In other words, rather than analyzing the closing price for a specific stock, such as BellSouth, you can perform correlation analysis on the closing prices for all of the stocks in a group by running it on the Close field of the group containing those stocks.

Commentary

In the previous task, we used correlation analysis to search for potential inputs for predicting the closing price of a specific stock. In this task, we will take a more broad-based approach.

 

In this case, let’s say that you have imported data for several stocks you are interested in working with. Now, you would like to use correlation analysis on the closing prices of all of those stocks to determine the data in your portfolio can be used as leading indicators for any of them. In effect, you want to perform correlation analysis on multiple fields at once and compare the results.

 

You can do this in TradingSolutions by performing correlation analysis on a field at the group level. In other words, rather than using the closing price for a specific stock, such as BellSouth, we are going to perform correlation analysis on the closing prices for all of the stocks in a group by running it on the Close field of the group containing those stocks.

Step-by-step Instructions

1.    Select Analyze Correlations… from the context menu for “Sample Stocks” in the Portfolio View.

Right-click on “My Stocks” in the Portfolio View and select Analyze Correlations… from the context menu. This will display a select dialog labeled Select a Field to Analyze. This is a list of all of the fields in “Sample Stocks” that are available for analysis.

 

2.    On the dialog labeled Select a Field to Analyze, select the “Close” field and press OK.

We want to be able to analyze correlations to the closing prices of stocks in “Sample Stocks”. Select the Close field from the selection tree and press the OK button to continue. This will display the Correlation Analysis Wizard.

Ä    Note: If you have previously run correlation analysis for this field, the results from that correlation analysis will be displayed. To follow this tutorial step-by-step, press the Delete Analysis button, then press the Correlation Analysis button on the Overview page. You should now be in the Correlation Analysis Wizard.

 

3.    On the first page of the Correlation Analysis Wizard, press Next.

The Correlation Analysis Wizard for the group level looks exactly the same as it does for the data level. Once again, select the default type and press the Next button. This will advance you to the Analysis Fields page.

 

4.    On the Analysis Fields page, select “My Portfolio” and press the Add Field from Selection… button.

The Analysis Fields page allows you to select which fields to analyze. We would like to compare the closing price of BellSouth to the previous closing prices of all of the data in the portfolio. To do this, select “My Portfolio” and press the Add Field from Selection… button. This will display a selection dialog named Select a Field Name to Add.

 

5.    On the dialog labeled Select a Field Name to Add, select the “Close” field and press OK.

This dialog allows you to select a specific field name from all of the data that you have selected. In this case, we would like to analyze the closing prices of all of the data, so accept the default selection of the Close field and press the OK button.

 

This combination of selecting the portfolio and selecting the Close field adds the Close field for all of the data in the portfolio. In this case, we left the default preprocessing of “Percent Change” selected, so the percent change of each Close field was selected.

Ä    Note: Again, if you have imported a significant amount of data other than the data in the “Sample Data” directory, you may want to modify this step to reduce the number of fields being analyzed.

 

6.    On the Analysis Fields page, press Next.

We have selected all of the fields we want to analyze, so press the Next button. This will advance you to the Analysis Options page.

 

7.    On the Analysis Options page, press Finish.

The Analysis Options page allows you to specify the date range and other options to use for the analysis. Accept the default values on this page and press the Finish button to being the analysis.

Ä    Note: The available date range is determined by the date ranges of the data series for each of the selected fields. The default size is also limited to the default size of a prediction date range. If you use only the sample data, the default will be to analyze 12/31/1994 through 12/31/1999. However, if you have imported and selected other stocks that do not include data for this entire range, the available date range may be different, causing different results.

 

After the analysis has completed, a Correlation Analysis page for the selected field will be displayed.

Ä    Note: Group-level correlation analysis will typically take significantly longer than correlation analysis for a single field. Remember, the analysis is now being performed for each Close field in “Sample Stocks”. If there are three data series in “My Stocks”, it will take three times longer to analyze all of them.

 

8.    Let TradingSolutions perform the requested task.

9.    Examine the Modify Field Dialog: Correlation Analysis page.

The Correlation Analysis page for a group-level analysis is slightly different than that for a data-level analysis.

 

The primary difference is that an additional column has been to the display. This column, labeled “Data Field”, indicates the field that the correlation analysis is being performed for. This column was not needed for a data-level analysis since all of the analyses were performed for the same field.

 

Again, the results are sorted in order of absolute value of correlation. The following entries should be near the top.

Bellsouth BellSouth  0

Baxter S&P 500  2

Ä    Note: If a different date range or additional data was used, your results may differ.

 

10.  Select one of the entries where Output Field is “Baxter Intl Inc: Close”.

11.  Press the Display Correlation for Selected Data Field Only… button. This displays just the correlations for a single output field.

12.  Notice that this opens the Modify Field dialog for “Baxter Intl Inc: Close”, opened to the Correlation Analysis sub-page. From here, you can create predictions just like you did in the previous tasks.

This new correlation analysis is the same information that we would find if we ran the correlation analysis for “Baxter Intl Inc: Close” by itself.

Ä    Note: There is actually a slight difference between the two analyses. Only the 100 highest and 100 lowest are kept for any analysis. Therefore, if a substantial number of data series are used in the group analysis, there is a chance that fewer correlated inputs will be displayed when a single data field is extracted.

 

13.  Press OK to return to the group correlation analysis.

14.  Press OK when you are finished with the analysis.