From b9bd928862d921881b014421958bac7bd4f8c916 Mon Sep 17 00:00:00 2001 From: Ben McCann Date: Thu, 11 Jul 2013 18:35:32 -0700 Subject: [PATCH] DOC: Fix documentation compilation warnings; improve output formatting Fix warnings when compiling the docs. Removes the documentation of the default types, which already gets included automatically and was wrong because not kept in sync with the function signature. Changed, the formatting to the Sphinx formatting. This looks much better in the compiled documents, but does make the source a bit harder to read. --- zipline/utils/factory.py | 47 +++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/zipline/utils/factory.py b/zipline/utils/factory.py index c9591012..a605543f 100644 --- a/zipline/utils/factory.py +++ b/zipline/utils/factory.py @@ -428,18 +428,16 @@ def load_from_yahoo(indexes=None, which removes the impact of splits and dividends. If the argument 'adjusted' is False, then the non-adjusted 'close' field is used instead. - :Arguments: - indexes : dict (Default: {'SPX': '^GSPC'}) - Financial indexes to load. - stocks : list (Default: ['AAPL', 'GE', 'IBM', 'MSFT', - 'XOM', 'AA', 'JNJ', 'PEP', 'KO']) - Stock closing prices to load. - start : datetime (Default: datetime(1993, 1, 1, 0, 0, 0, 0, pytz.utc)) - Retrieve prices from start date on. - end : datetime (Default: datetime(2002, 1, 1, 0, 0, 0, 0, pytz.utc)) - Retrieve prices until end date. - adjusted : bool (Default: True) - Adjust the price for splits and dividends. + :param indexes: Financial indexes to load. + :type indexes: dict + :param stocks: Stock closing prices to load. + :type stocks: list + :param start: Retrieve prices from start date on. + :type start: datetime + :param end: Retrieve prices until end date. + :type end: datetime + :param adjusted: Adjust the price for splits and dividends. + :type adjusted: bool """ data = _load_raw_yahoo_data(indexes, stocks, start, end) @@ -460,6 +458,7 @@ def load_bars_from_yahoo(indexes=None, """ Loads data from Yahoo into a panel with the following column names for each indicated security: + - open - high - low @@ -471,19 +470,17 @@ def load_bars_from_yahoo(indexes=None, impact of splits and dividends. If the argument 'adjusted' is True, then the open, high, low, and close values are adjusted as well. - :Arguments: - indexes : dict (Default: {'SPX': '^GSPC'}) - Financial indexes to load. - stocks : list (Default: ['AAPL', 'GE', 'IBM', 'MSFT', - 'XOM', 'AA', 'JNJ', 'PEP', 'KO']) - Stock closing prices to load. - start : datetime (Default: datetime(1993, 1, 1, 0, 0, 0, 0, pytz.utc)) - Retrieve prices from start date on. - end : datetime (Default: datetime(2002, 1, 1, 0, 0, 0, 0, pytz.utc)) - Retrieve prices until end date. - adjusted : bool (Default: True) - Adjust open/high/low/close for splits and dividends. The 'price' - field is always adjusted. + :param indexes: Financial indexes to load. + :type indexes: dict + :param stocks: Stock closing prices to load. + :type stocks: list + :param start: Retrieve prices from start date on. + :type start: datetime + :param end: Retrieve prices until end date. + :type end: datetime + :param adjusted: Adjust open/high/low/close for splits and dividends. + The 'price' field is always adjusted. + :type adjusted: bool """ data = _load_raw_yahoo_data(indexes, stocks, start, end)