Python script to import security price history from a csv file

This script was written by the user Carl. It was written specifically for importing data exported from QuotesPlus and it expect the csv file to be in that format.

QuotesPlus exports .CSV data as "symbol,mm/dd/yy,open,high,low,close,volume". Comments in the script should help others modify the code to match their data format. The Script expects a list of symbols (XOM, IBM, MO), one symbol per line, in a file named Symbol.txt. Each symbol should have a corresponding file named .csv, such as XOM.CSV for example. The first line of the script identifies the directory containing the Symbols.txt and .csv files.

Before you can run this script you must install the Python Interface extension. Starting the Python Interface will pop-up the Python Console. Click the "Read from file" button, navigate to the directory containing the loadhistory.mdpy script and open the script to execute it. This isn't a particularly speed process, until you contemplate entering this data by hand, so you might start with one stock to make sure your data is properly formatted and everything is working for you. I couldn't not figure out how to flush the print statements to the Python Console (the standard sys.stdout.flush() didn't work ) so you won't see the list of modified stocks until the process is complete.

loadhistory.mdpy

Discussion of this script is located in the following thread:

http://help.infinitekind.com/discussions/moneydance-development/7-s...