Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Python has a similar library like quantmod in R that can download financial statement data? [closed]

Tags:

python

r

quantmod

Does Python has a similar library like quantmod in R that can download financial statement data? I want to download the historical revenue of each stock in Python. Can someone give me a hint? Thanks.

like image 274
user2668789 Avatar asked Aug 16 '13 14:08

user2668789


1 Answers

Yes a lot of them, zipline, pandas and even matplotlib can download data from Yahoo Finance. I recommend you use pandas:

>>> from pandas_datareader.data import DataReader
>>> from datetime import datetime

>>> goog = DataReader("GOOG",  "yahoo", datetime(2000,1,1), datetime(2012,1,1))
>>> goog["Adj Close"]
Date
2004-08-19     49.982655
2004-08-20     53.952770
2004-08-23     54.495735
2004-08-24     52.239197
2004-08-25     52.802086
...
like image 176
elyase Avatar answered Sep 24 '22 01:09

elyase