Time for a new thread .
This time I have written a DLL that ranks ASX securities by previous 6 month median daily turnover (daily turnover = close x volume) and writes the rank to the securities Open Interest field of a MetaStock database for the duration of the current period. The current period or Re-balance can be Monthly, Quarterly or Half Yearly (March/September). So at the close of the 3rd Friday of the month of the start of the current period in question, I calculate the median daily turnover for all found 3 letter ASX securities over the previous 6 months. Rank/Sort the securities based on this value, then write the ranking to the securities Metastock database Open Interest field for the duration of the current period/Re-balance.
Note: To proceed any further, you need to have either Perl or Python installed and have a Metastock database with ASX securities.
So after downloading the attached files (later post), if you have 64 bit perl/python installed, unzip 64 bit dll, otherwise unzip 32 bit dll. The directory structure should look like this (with dll in same folder as scripts):
Since we need to write to your Metastock Database, it's probably a good idea to create a copy of it just in case I stuffed up . For example if your Metastock files are stored in Trading Data, simply copy to Trading Data2.
Next step is to tell my dll where your copied Metastock Listed and Delisted securities are stored by editing either perl or python scripts in notepad like so:
Special Note: If you don't have a Delisted securities path or don't want to include Delisted securities, change value to "" in script.
Now all we need to do is run either script (not both) from the command prompt. When you do, you will be asked a couple of questions.
Re-balance method effects how often we do the 6 month calculations from the 3rd Friday of the starting period's month.
Process Last 2 Re-balances only. If we answer yes, then we only update Metastock database for the 2 most current periods otherwise we calculate from earliest found date.
Minimum Trading Days means if a security traded less than this amount of days in the previous 6 month period, a value of 0 rank will be written to the Metastock database indicating that security was not included in the constituents list for that Re-balance period.
Write to MS files. If we answer yes, we will update the Metastock database otherwise we don't. In either case, the constituents list is written to a log file.
Below is an example of what happens at the command prompt when we run either script: