sign of qty changed in trade_log

This commit is contained in:
Camilo1704
2020-03-25 14:04:23 -03:00
parent 53af4c0464
commit f063ffc983
+1 -1
View File
@@ -197,7 +197,7 @@ class Backtest:
qty_to_sell = (to_sell - sold) // exit_cost
if qty_to_sell != 0:
trade_log_append = self._options_inventory.loc[row_index].copy()
trade_log_append['totals', 'qty'] = qty_to_sell
trade_log_append['totals', 'qty'] = -qty_to_sell
trade_log_append['totals', 'date'] = date
trade_log_append['totals', 'cost'] = exit_cost
for i, leg in enumerate(self._options_strategy.legs):