You can calculate the correlation coefficient to find the correlation between any two variables, whether they are market indicators, stocks, or anything else that can be tracked numerically.
This example defines modules to compute correlation coefficients between numeric variables and standardized values for a set of data. /* Module to compute correlations */ start corr; n=nrow(x); /* ...