Skip to content

Commit

Permalink
Merge pull request #9 from kartiksubbarao/patch-2
Browse files Browse the repository at this point in the history
Update stats.py
  • Loading branch information
grzesir authored Feb 7, 2024
2 parents d4e8f6c + 366b8c2 commit ed85422
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion quantstats_lumi/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def expected_return(returns, aggregate=None, compounded=True, prepare_returns=Tr
if prepare_returns:
returns = _utils._prepare_returns(returns)
returns = _utils.aggregate_returns(returns, aggregate, compounded)
return _np.product(1 + returns) ** (1 / len(returns)) - 1
return _np.product(1 + returns, axis=0) ** (1 / len(returns)) - 1


def geometric_mean(retruns, aggregate=None, compounded=True):
Expand Down

0 comments on commit ed85422

Please sign in to comment.