mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-20 12:20:29 +08:00
BUG: Removed SlippageModel from olmar example.
Fix crash due to 'delay' was no longer supported. But removing SlippageModel override, since current configs should be functionally equivalent to FixedSlippage.
This commit is contained in:
committed by
Eddie Hebert
parent
b8b21b347f
commit
d56f1b73f8
@@ -1,12 +1,11 @@
|
||||
import sys
|
||||
import logbook
|
||||
import datetime
|
||||
import numpy as np
|
||||
|
||||
from zipline.algorithm import TradingAlgorithm
|
||||
from zipline.transforms import MovingAverage
|
||||
from zipline.utils.factory import load_bars_from_yahoo
|
||||
from zipline.finance import slippage, commission
|
||||
from zipline.finance import commission
|
||||
|
||||
zipline_logging = logbook.NestedSetup([
|
||||
logbook.NullHandler(level=logbook.DEBUG, bubble=True),
|
||||
@@ -38,11 +37,6 @@ class OLMAR(TradingAlgorithm):
|
||||
self.add_transform(MovingAverage, 'mavg', ['price'],
|
||||
window_length=window_length)
|
||||
|
||||
no_delay = datetime.timedelta(minutes=0)
|
||||
slip = slippage.VolumeShareSlippage(volume_limit=0.25,
|
||||
price_impact=0,
|
||||
delay=no_delay)
|
||||
self.set_slippage(slip)
|
||||
self.set_commission(commission.PerShare(cost=0))
|
||||
|
||||
def handle_data(self, data):
|
||||
|
||||
Reference in New Issue
Block a user