pyQ v#.##, by Rimon Barr:
Python Yahoo Quote fetching utility
Usage: pyQ [-i] [start_date [end_date]] ticker [ticker...]
rimdu -h | -v
-h, -?, --help display this help information
-v, --version display version
-i, --stdin tickers fed on stdin, one per line
date formats are yyyymmdd
if enddate is omitted, it is assume to be the same as startdate
if startdate is omitted, we use *current* stock tables
and otherwise, use historical stock tables.
(current stock tables will give previous close price before
market closing time.)
tickers are exactly what you would type at finance.yahoo.com
output format is "ticker, date (yyyymmdd), open, high, low, close, volume"
Send comments, suggestions and bug reports to <barr-AT-cs.cornell.edu>.
The stock data is output in the format:
ticker, date (yyyymmdd), open, high, low, close, volume
For example, typing in the following command:
pyq 20010401 20010407 ibm t
retrieves the data for IBM and AT&T for the first week in April 2001:
The following command takes ticker symbols from a file, and output today's
pyq -i < tickers
Giving a similar kind of output:
Note, that if the market close data is unavailable, the previous
close price is listed. In general, the following two commands do not
necessarily agree, even if yymmdd is today.
pyq yymmdd ibm
The first command uses Yahoo historical data tables, while the second one uses
Yahoo current stock quotes. When downloading many stock tickers the second
method is much faster as stock requests can be aggregated. However, if you
want to be sure that you have market close conditions, use the first version.
This software is distributed under the terms of the GNU General Public License.
The script merely requires python to run. Enjoy.
15/03/07 - pyq v0.7
06/02/07 - pyq v0.6
27/01/05 - pyq v0.5
29/09/04 - pyq v0.4
31/10/02 - pyq v0.3
14/10/02 - pyq v0.02
10/01/02 - pyq v0.01