Merge pull request #383 from quantopian/welcome-to-the-family

symbol as an api_method
This commit is contained in:
Joe Jevnik
2014-08-06 18:43:33 -04:00
2 changed files with 9 additions and 9 deletions
+9
View File
@@ -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,
-9
View File
@@ -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',