Skip to content

Commit a8082f1

Browse files
committed
Add Tag column to stats._trades
1 parent 374eeef commit a8082f1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

backtesting/_stats.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ def compute_stats(
6565
'ReturnPct': [t.pl_pct for t in trades],
6666
'EntryTime': [t.entry_time for t in trades],
6767
'ExitTime': [t.exit_time for t in trades],
68+
'Tag': [t.tag for t in trades],
6869
})
6970
trades_df['Duration'] = trades_df['ExitTime'] - trades_df['EntryTime']
7071
del trades

0 commit comments

Comments
 (0)