Skip to content

Commit

Permalink
Merge pull request #200 from TradingDominion/bug-monthly_returns
Browse files Browse the repository at this point in the history
Fix EOY compound return bug
  • Loading branch information
ranaroussi authored Jul 5, 2022
2 parents faba38e + 02a6693 commit baabc2c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion quantstats/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,9 @@ def monthly_returns(returns, eoy=True, compounded=True, prepare_returns=True):

if eoy:
returns['eoy'] = _utils.group_returns(
original_returns, original_returns.index.year).values
original_returns,
original_returns.index.year,
compounded=compounded).values

returns.columns = map(lambda x: str(x).upper(), returns.columns)
returns.index.name = None
Expand Down

0 comments on commit baabc2c

Please sign in to comment.