mirror of
https://github.com/wassname/catalyst.git
synced 2026-06-30 06:44:50 +08:00
Merge pull request #1761 from quantopian/futures-cashflow-bugfix
BUG: use isinstance
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user