Category Archives: Money

Consumer, money, financial topics.

Import Prices – Quicken

Source code includes the script and command file for Microsoft Windows: github.com/avinash311/QImportP.
The link can be used to view individual files and download entire package.

Quicken is a package that works pretty well, but the manufacturer has a tendency to periodically block functionality.

For example, Quicken 2006 has been unable to download updated stock prices since April 2009. Quicken 2006 itself installs on even the latest Windows 10 (2016) just fine. [As an aside, it is just amazing that Windows 10 has kept compatibility alive for old software – Quicken 2006, as well as the SendKeys method used by the script below! Kudos to Microsoft!]

There is certainly no technical decision to disable automatic stock price updates – it is just a marketing push, so make people upgrade even if they do not desire to move to a new version.

Quicken does have a manual “Import Prices” command seen when viewing the Portfolio. Therefore, it is not too hard to write a script that will download current prices, and import them into Quicken.

It is a .WSF file, a Windows Shell Scripting program. It has been tested to work on Windows XP, Windows Vista as well as Windows 10 (2016), and is available in source code form.

The script looks up current prices for a list of symbols, and stores the prices in the format Quicken needs. Optionally, it can automate the import of the prices in Quicken by using Windows automation SendKeys method.

Ticker symbols are used to lookup quotes. There are two ways of doing this:

1: Google Docs Spreadsheets can be used for current quotes using the GOOGLEFINANCE function, such as in this example spreadsheet.
This supports a wide range of ticker symbols from US and non-US exchanges, as well as currency exchange rates. It does not support historical quotes and the some of the ticker symbols such as mutual funds have stale quotes, up to 4 days old.
See the /gcsv: option to this script.

2: Alpha Vantage TIME_SERIES_DAILY API can be used to download current and historical prices. This supports US exchanges, see their website for details. Using this requires creating a personal key at their web site and then passing that key to your invocation of this QImportP script, see the /avkey: and /s: options.
This is a very slow interface. Unlike the Google Spreadsheets method which downloads entire spreadsheet and all symbols in one web lookup, Alpha Vantage API only supports one ticker symbol quote lookup per second for the TIME_SERIES_DAILY API call.

Both methods above can be used in a single invocation of QImportP. For example, current currency exchange rates and stock quotes are better handled by using Google Spreadsheets, while fresher prices for mutual funds are available using Alpha Vantage API.

2017: Yahoo and Google no longer supports historical or even just current price downloads.
So ichart.finance.yahoo.com for historical data and yahoo quotes both don’t work anymore.
Google Finance web pages also do not work: finance.google.com or www.google.com/finance either.

The source code which includes the script and command file for Microsoft Windows is here: github.com/avinash311/QImportP.
The link can be used to view individual files and download entire package: QImportP latest .zip

Older versions:
QImportP-0.6.0.zip [2015-04-09] QImportP-0.5.0.zip [2009] (Older version download may be disabled by Chrome. Use Microsoft Edge browser, or use the source code link to browse older versions.)

The script automates loading of the price data into Quicken, but the mechanism of using SendKeys may be fragile, though in practice it usually works.

Version 0.3 of this package added support for non-US users, based on the code given in a comment (#5535), the /dmy and /div100 options provide that support. From what has been reported elsewhere on the web, shares and mutual fund price downloads in UK are priced differently – shares in pence, funds in pounds (or vice-versa?). So QImportP provides the /div100 option which can be used when needed.
More recent versions of QImportP support downloading from a Google Docs Spreadsheet, which allows for doing any arithmetic on the quotes so there may not a need to use /div option anymore.

The QImportP package is placed into Public Domain.

[The original post with all old comments here: Archived Import Prices Script – 2009-2013]