Hi all,
I've been pulling data out of Iress using Python for a while now and decided to formally release my code.
The project is hosted at http://code.google.com/p/pyress/ and is available on PyPI at http://pypi.python.org/pypi/pyress/.
It only runs on Windows and Iress should be running and logged in. Because it's in PyPI you can install it quickly using either easy_install or pip. You'll also need the Python win32 extensions installed so you can dispatch to the Iress COM interface.
The Iress DataManager interface allows you to programmatically extract all the data that's presented through the user interface. I've found the ability to query data and insert it into a Postgres database hugely useful in my research.
The following example shows how you can pull out all the financials (EBITDA, NAV, etc) for BHP during 2008 using the pyress library.
Cheers,
James
I've been pulling data out of Iress using Python for a while now and decided to formally release my code.
The project is hosted at http://code.google.com/p/pyress/ and is available on PyPI at http://pypi.python.org/pypi/pyress/.
It only runs on Windows and Iress should be running and logged in. Because it's in PyPI you can install it quickly using either easy_install or pip. You'll also need the Python win32 extensions installed so you can dispatch to the Iress COM interface.
The Iress DataManager interface allows you to programmatically extract all the data that's presented through the user interface. I've found the ability to query data and insert it into a Postgres database hugely useful in my research.
The following example shows how you can pull out all the financials (EBITDA, NAV, etc) for BHP during 2008 using the pyress library.
Code:
import pprint
from iress import IressDataClient, DfsSec
idc = IressDataClient()
idc.connect()
financials = idc.execute(DfsSec.constants.dfsDataFinancial, dict(
Security='BHP',
Exchange='ASX',
StartDate='2008-01-01',
EndDate='2009-01-01',
ItemList=-1,
AnnualReport=True,
QuarterlyReport=True,
InterimReport=True,
PreliminaryReport=True,
))
pprint.pprint(financials)
Cheers,
James