Python stock market analysis tools?

Raymond Hettinger python at rcn.com
Mon Mar 5 06:41:30 CET 2007


On Mar 4, 7:52 pm, "Mudcat" <mnati... at gmail.com> wrote:
> I have done a bit of searching and can't seem to find a stock market
> tool written in Python that is active. Anybody know of any? I'm trying
> not to re-create the wheel here.

What kind of tool do you want?  Getting quotes is the easy part:

import urllib
symbols = 'ibm jpm msft nok'.split()
quotes = urllib.urlopen( 'http://finance.yahoo.com/d/quotes.csv?s=' +
         '+'.join(symbols) + '&f=l1&e=.csv').read().split()
print dict(zip(symbols, quotes))

The hard part is raising capital and deciding what to buy, sell, or
hold.


Raymond




More information about the Python-list mailing list