in Search

Utility for MS -> MySQL for mutual funds?

Last post 05-22-2007, 19:00 by wabbit. 3 replies.
Sort Posts: Previous Next
  •  10-18-2006, 22:14 21529

    Utility for MS -> MySQL for mutual funds?

    I think I need some help with MetaStock File Library API in the Developer’s Kit.


    I am looking for a utility to read data from MetaStock and input into a MySQL database.  Specifically, I need to convert the close quotes only for about 18,000 U.S. mutual funds into one MySQL database.  My database will retain 3 years of historic data.  (This seems to be beyond the Downloader’s capability to do, at least quickly and simply.)


    I buy my data from Reuters DataLink and use MetaStock’s Downloader 9.1.


    In addition to updating MySQL for each day’s new close data, I also need to update MySQL for funds that have had their historic data adjusted by Reuters when a dividend or a capital gains distribution is paid out (and subsequently the price goes down, like with a stock split).  Is there a way to “read” each day’s data download to identify a fund whose historic data has been changed?  In other words, is there an alternative to converting every day the 3-year history for 18,000 funds?


    This is probably a common need, but it is new for me and I cannot find something to do it.  Is there a free or commercial utility to do this or do I need to find a programmer?  (The programming would be beyond my skill and time.)

  •  05-22-2007, 12:19 24097 in reply to 21529

    Re: Utility for MS -> MySQL for mutual funds?

    I have the same need.... an aplication would be awesome !

    But I think its possible to convert the CSV files (exported from downloader) into a simple MySQL query that insert the data into the database.

    any thoughts ?
  •  05-22-2007, 15:08 24101 in reply to 24097

    Re: Utility for MS -> MySQL for mutual funds?

    I have not used MySQL very much, but I do use Micro$oft SQL 7 & 2000 quite a bit. Exporting the data from the downloader would work great as long as your table is formatted the same way. Identify how long you want to export on downloader. One issue with SQL I ran into on another project is with the date & time columns. I used the DateTime type. Each column will have both a date & time. The date column will have the accurate date, but some funky time. The time column, if used, will have the correct time but the dates will be the same.

    If you are going to want to update previous dates you are either going to have to compare each value with the imported data and update if necessary or wipe the entire table and enter all the current data.

    Again - I rarely use MySQL, but I assume there is similar functionality to the M$ version of the enterprise manager. Imports take about 5 clicks if your import file is formatted, which it would be from the downloader.

    If you are a db god this might be an easy path to success. I know enough to get by, so I am trying to learn better coding for metastock language as strange as it might appear {compared to other programming languages}.
  •  05-22-2007, 19:00 24105 in reply to 24101

    Re: Utility for MS -> MySQL for mutual funds?

    The "funky time" usually comes from the intraday data where the format is hh (for hours) mm (minutes) xxx (ticks in that minute, NOT seconds!!)  The whole answer is in the MDK manual, if yuo have it?

    So the question is how to get around this?  I did a project where the client didn't need super-accurate times, so we divided the minute into 2000 segments and wrote a tick into each segment (see the manual for why we needed more than 1000 segments) and output this to the file.

    Hope this helps.

    wabbit Big Smile [:D]





    MS: 6.52 EOD, 7.x EOD, 8.0 PRO, 9.2 PRO w/QC, 10 PRO w/QC & MDK
    For custom MetaStock programming : http://www.wabbit.com.au
    My SkyPE status : wabbit.com.au SkyPE online status
    My SkyPE account : wabbit.com.au

View as RSS news feed in XML