mirror of
https://github.com/wassname/catalyst.git
synced 2026-10-30 13:10:53 +08:00
updated based on PR feedback.
This commit is contained in:
1 parent
ebde40ab05
commit
7a8697f0e5
8 files changed
+80
-47
No files matched your search
@@ -5,7 +5,7 @@ from zipline.gens.tradegens import DataFrameSource
|
||||
from zipline.utils.factory import create_trading_environment
|
||||
from zipline.gens.transform import StatefulTransform
|
||||
from zipline.lines import SimulatedTrading
|
||||
from zipline.finance.slippage import FixedSlippage, simulate_method_factory
|
||||
from zipline.finance.slippage import FixedSlippage, transact_partial
|
||||
from zipline.finance.commission import PerShare
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ class TradingAlgorithm(object):
|
||||
transforms,
|
||||
self,
|
||||
environment,
|
||||
simulate_method_factory(FixedSlippage(), PerShare(0.0))
|
||||
transact_partial(FixedSlippage(), PerShare(0.0))
|
||||
)
|
||||
|
||||
def run(self, source, start=None, end=None):
|
||||
@@ -180,5 +180,5 @@ class TradingAlgorithm(object):
|
||||
def initialize(self, *args, **kwargs):
|
||||
pass
|
||||
|
||||
def set_simulate_override(self, slippage_callable):
|
||||
def set_transact_setter(self, transact_setter):
|
||||
pass
|
||||
Reference in new issue
Block a user