The MIM Correlation Tool is a Java application that runs from a command prompt on the MIM server. The application applies an XMIM correlation query against a list of equities that are contained in a file named “indlist”. The file is provided separately to the application and consists of a list of equities or securities in the MIM database (as many as 7000 North American Securities can be listed) and the industry categories into which they fall. The Correlation Tool compares each equity price in the “indlist” file to its category peers and outputs the results, ranked by correlation co-efficient (value between -1 and 1) and by category. The output is generated as a .csv file that can be viewed easily in Microsoft Excel.
The MIM Correlation Tool may take up to 9 hours to process an “indlist” file of 7000 equities, so the user should run it overnight or at the weekend to avoid any impact on the daytime server operation.
The following shows the correlation query that is applied to all securities in the security category list file: “indlist”.
The correlation query cannot be modified as the code is embedded in the MIM Correlation software. |
Listed below are the parameters that run over each set of securities in the indlist file.
LET
stocks1 = FILE "/home/lim/correlation/work/FilenameA.sector"
stocks2 = FILE "/home/lim/correlation/work/FilenameB.sector"
AS_LONG_AS
number_of_occurrences is more than 0
SHOW
1: corr_value
WHEN
Date is stocks1 last_data_day
AND
Date is stocks2 last_data_day
# check that both stocks have liquid data
AND
100 day count of Close of stocks1 is more than 85
AND
100 day count of Close of stocks2 is more than 85
AND
Volume of stocks1 is more than 100000
AND
volume of stocks2 is more than 100000
AND
stocks1 is at least 5
AND
stocks2 is at least 5
# compute the correlation 1 time into a variable
AND
corr_value = 100 day correlation of stocks1 and stocks2
# check the quality of the correlation
AND
corr_value < 1.0