Skip to content

Commit 589a018

Browse files
committed
change compute stats method to show all trades instead of closed trades.
1 parent 699080b commit 589a018

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backtesting/backtesting.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1533,7 +1533,7 @@ def _compute_stats(self, broker: _Broker, strategy: Strategy) -> pd.Series:
15331533
'DrawdownDuration': dd_dur},
15341534
index=index)
15351535

1536-
trades = broker.closed_trades
1536+
trades = broker.trades
15371537
trades_df = pd.DataFrame({
15381538
'Size': [t.size for t in trades],
15391539
'EntryBar': [t.entry_bar for t in trades],

0 commit comments

Comments
 (0)