mirror of
https://github.com/wassname/catalyst.git
synced 2026-06-30 19:58:17 +08:00
BUG: Various functions were missing from the API.
This commit is contained in:
@@ -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,
|
||||
|
||||
+7
-1
@@ -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'
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user