mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-04 02:43:12 +08:00
BUG: Fixes failure to account for Futures transaction prices
This commit is contained in:
@@ -1859,7 +1859,6 @@ class TestFutureFlip(TestCase):
|
||||
|
||||
def test_flip_algo(self):
|
||||
metadata = {1: {'symbol': 'TEST',
|
||||
'asset_type': 'equity',
|
||||
'end_date': self.days[3],
|
||||
'contract_multiplier': 5}}
|
||||
self.env.write_data(futures_data=metadata)
|
||||
|
||||
@@ -296,6 +296,8 @@ class PerformanceTracker(object):
|
||||
perf_period.handle_cash_payment(cash_adjustment)
|
||||
|
||||
def process_transaction(self, event):
|
||||
# Transaction events also count as trade events for the trackers
|
||||
self.process_trade(event)
|
||||
self.txn_count += 1
|
||||
self.position_tracker.execute_transaction(event)
|
||||
for perf_period in self.perf_periods:
|
||||
|
||||
Reference in New Issue
Block a user