mirror of
https://github.com/wassname/options_backtester.git
synced 2026-06-27 16:30:55 +08:00
sign of qty changed in trade_log
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user