From bed00a1b774c49a14026a600d02d41fce101966c Mon Sep 17 00:00:00 2001 From: Jean Bredeche Date: Mon, 24 Apr 2017 17:06:26 -0400 Subject: [PATCH] BUG: use isinstance --- zipline/finance/performance/period.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zipline/finance/performance/period.py b/zipline/finance/performance/period.py index 89ddbfd8..97664654 100644 --- a/zipline/finance/performance/period.py +++ b/zipline/finance/performance/period.py @@ -384,7 +384,7 @@ class PerformancePeriod(object): """ Calculates the cash flow from executing the given transaction """ - if txn.asset is Future: + if isinstance(txn.asset, Future): return 0.0 return -1 * txn.price * txn.amount