Data - remote retrieval (pynance.data.retrieve)

Wraps Pandas Remote Data Access.

pynance.data.retrieve.equities(country='US')[source]

Return a DataFrame of current US equities.

New in version 0.4.0.

Changed in version 0.5.0: Return a DataFrame

Parameters:

country : str, optional

Country code for equities to return, defaults to ‘US’.

Returns:

eqs : pandas.DataFrame

DataFrame whose index is a list of all current ticker symbols. Columns are ‘Security Name’ (e.g. ‘Zynerba Pharmaceuticals, Inc. - Common Stock’) and ‘Exchange’ (‘NASDAQ’, ‘NYSE’, ‘NYSE MKT’, etc.)

Notes

Currently only US markets are supported.

Examples

>>> eqs = pn.data.equities('US')
pynance.data.retrieve.get(equity, start=None, end=None)[source]

Get DataFrame for an individual equity from Yahoo!

Changed in version 0.5.0: Default start (2010-01-01) and end (current date).

Examples

>>> import pynance as pn
>>> aapl = pn.data.get('aapl', '2014-03-01', '2015-03-01')
>>> goog = pn.data.get('goog', '2014')