Skip to content

Commit

Permalink
removed spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
ranaroussi committed Apr 23, 2022
1 parent 98362f9 commit 8b5d447
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions quantstats/reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,24 +503,24 @@ def metrics(returns, benchmark=None, rf=0., display=True,

d = today - relativedelta(months=3)
metrics['3M %'] = comp_func(df[df.index >= d]) * pct

d = today - relativedelta(months=6)
metrics['6M %'] = comp_func(df[df.index >= d]) * pct

metrics['YTD %'] = comp_func(df[df.index >= _dt(today.year, 1, 1)]) * pct

d = today - relativedelta(years=1)
metrics['1Y %'] = comp_func(df[df.index >= d]) * pct

d = today - relativedelta(months=35)
metrics['3Y (ann.) %'] = _stats.cagr(df[df.index >= d], 0., compounded) * pct

d = today - relativedelta(months=59)
metrics['5Y (ann.) %'] = _stats.cagr(df[df.index >= d], 0., compounded) * pct

d = today - relativedelta(years=10)
metrics['10Y (ann.) %'] = _stats.cagr(df[df.index >= d], 0., compounded) * pct

metrics['All-time (ann.) %'] = _stats.cagr(df, 0., compounded) * pct

# best/worst
Expand Down

0 comments on commit 8b5d447

Please sign in to comment.