From f474ee7eed25efa3f9a2d15f5d35d58599b1da54 Mon Sep 17 00:00:00 2001 From: Thomas Wiecki Date: Mon, 29 Dec 2014 11:36:44 +0100 Subject: [PATCH] BUG: Various functions were missing from the API. --- zipline/algorithm.py | 11 +++++++++-- zipline/api.py | 8 +++++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/zipline/algorithm.py b/zipline/algorithm.py index a28e553e..349741ee 100644 --- a/zipline/algorithm.py +++ b/zipline/algorithm.py @@ -608,14 +608,21 @@ class TradingAlgorithm(object): self._recorded_vars[name] = value @api_method - def symbol(self, symbol_str, as_of_date=None): + def symbol(self, symbol_str): """ Default symbol lookup for any source that directly maps the symbol to the identifier (e.g. yahoo finance). - Keyword argument as_of_date is ignored. """ return symbol_str + @api_method + def symbols(self, *args): + """ + Default symbols lookup for any source that directly maps the + symbol to the identifier (e.g. yahoo finance). + """ + return args + @api_method def order(self, sid, amount, limit_price=None, diff --git a/zipline/api.py b/zipline/api.py index 017efa76..6c94073b 100644 --- a/zipline/api.py +++ b/zipline/api.py @@ -26,6 +26,10 @@ from zipline.finance.slippage import ( VolumeShareSlippage, ) +from zipline.utils.events import ( + date_rules, + time_rules +) batch_transform = zipline.transforms.BatchTransform @@ -37,5 +41,7 @@ __all__ = [ 'math_utils', 'batch_transform', 'FixedSlippage', - 'VolumeShareSlippage' + 'VolumeShareSlippage', + 'date_rules', + 'time_rules' ]