From ca78b1b9e1b162107e6cdeb2daa08071a11c3454 Mon Sep 17 00:00:00 2001 From: Eddie Hebert Date: Tue, 9 Oct 2012 12:55:21 -0400 Subject: [PATCH] Makes ordering of transaction parameters consistent. The order of open_orders and event were inconsistent across invocations. Standardizing on one order. --- zipline/finance/slippage.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zipline/finance/slippage.py b/zipline/finance/slippage.py index 016911dd..161d304c 100644 --- a/zipline/finance/slippage.py +++ b/zipline/finance/slippage.py @@ -21,12 +21,12 @@ from functools import partial import zipline.protocol as zp -def transact_stub(slippage, commission, open_orders, events): +def transact_stub(slippage, commission, event, open_orders): """ This is intended to be wrapped in a partial, so that the slippage and commission models can be enclosed. """ - transaction = slippage.simulate(open_orders, events) + transaction = slippage.simulate(event, open_orders) if transaction and transaction.amount != 0: direction = abs(transaction.amount) / transaction.amount per_share, total_commission = commission.calculate(transaction)