Skip to content

Commit

Permalink
added max consecutive wins/losses to full report
Browse files Browse the repository at this point in the history
  • Loading branch information
ranaroussi committed Apr 23, 2022
1 parent d13a419 commit 43bf52c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions quantstats/reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,10 @@ def metrics(returns, benchmark=None, rf=0., display=True,

metrics['~~~~~~'] = blank

if mode.lower() == 'full':
metrics['Max Consecutive Wins *int'] = _stats.consecutive_wins(df)
metrics['Max Consecutive Losses *int'] = _stats.consecutive_losses(df)

metrics['Gain/Pain Ratio'] = _stats.gain_to_pain_ratio(df, rf)
metrics['Gain/Pain (1M)'] = _stats.gain_to_pain_ratio(df, rf, "M")
# if mode.lower() == 'full':
Expand Down

0 comments on commit 43bf52c

Please sign in to comment.