From 90405b1c9952761a77a4c62023f0576adfba9ceb Mon Sep 17 00:00:00 2001 From: llllllllll Date: Tue, 5 Aug 2014 15:23:19 -0400 Subject: [PATCH] MAINT: Adds `symbol` to the list of api_methods. --- zipline/algorithm.py | 9 +++++++++ zipline/api.py | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/zipline/algorithm.py b/zipline/algorithm.py index 96438f81..835152c3 100644 --- a/zipline/algorithm.py +++ b/zipline/algorithm.py @@ -486,6 +486,15 @@ class TradingAlgorithm(object): for name, value in chain(positionals, iteritems(kwargs)): self._recorded_vars[name] = value + @api_method + def symbol(self, symbol_str, as_of_date=None): + """ + 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 order(self, sid, amount, limit_price=None, diff --git a/zipline/api.py b/zipline/api.py index 99c49d99..97436932 100644 --- a/zipline/api.py +++ b/zipline/api.py @@ -30,16 +30,7 @@ from zipline.finance.slippage import ( batch_transform = zipline.transforms.BatchTransform -def symbol(symbol_str, as_of_date=None): - """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 - __all__ = [ - 'symbol', 'slippage', 'commission', 'math_utils',