Stockroach - A program for downloading financial data  

 stock 

Download: stock.tar.gz

The progam stock will download financial data automatically from Yahoo Finance. The program runs from the command line.


Installation

The installation of the program is very simple. Download the program, then, compile from source.

       $ ./configure
       $ make
       $ make install
  





Usage

Once stock is installed, it is very easy to use. For example, to get the current stock price for RedHat execute the following command.

  
 $ stock rhat
"RHAT",22.68,"6/29/2006","1:12pm",-2.33,23.10,23.10,21.88,18198956

The following example shows how to get 10 days of rhat stock data.
  
$ stock rhat -H `date -d '-10 day' '+%m%d%Y'`
(stock: rhat, date: 06192006)
Date,Open,High,Low,Close,Volume,Adj. Close*
28-Jun-06,25.49,25.50,24.54,25.01,6438900,25.01
27-Jun-06,26.09,26.48,25.21,25.34,2591600,25.34
26-Jun-06,26.70,26.70,25.92,26.18,2927100,26.18
23-Jun-06,25.94,26.92,25.85,26.67,2790100,26.67
22-Jun-06,25.92,26.16,25.39,26.14,2026100,26.14
21-Jun-06,25.05,26.44,24.86,26.02,3400900,26.02
20-Jun-06,25.47,25.99,24.96,24.97,2221500,24.97
19-Jun-06,25.93,26.30,25.19,25.53,2889100,25.53

It's also possible to get multiple stock listings.
  
$ stock rhat,msft,intl
"RHAT",22.5882,"6/29/2006","1:47pm",-2.4218,23.10,23.10,21.88,18799032
"MSFT",23.31,"6/29/2006","1:47pm",+0.15,23.32,23.56,23.28,45701060
"INTL",21.05,"6/29/2006","1:44pm",-0.05,21.14,21.29,21.00,60571


Changes
06.29.06  First release.
 


Chirico img Mike Chirico, a father of triplets (all girls) lives outside of Philadelphia, PA, USA. He has worked with Linux since 1996, has a Masters in Computer Science and Mathematics from Villanova University, and has worked in computer-related jobs from Wall Street to the University of Pennsylvania. His hero is Paul Erdos, a brilliant number theorist who was known for his open collaboration with others.


Mike's notes page is souptonuts. For open source consulting needs, please send an email to mchirico@comcast.net. All consulting work must include a donation to SourceForge.net.

 
SourceForge.net Logo