Skip to content

Commit

Permalink
replaced np.product as it is deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniouaa committed Oct 7, 2024
1 parent fa0a91a commit 463037a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion quantstats/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,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.prod(1 + returns) ** (1 / len(returns)) - 1


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

0 comments on commit 463037a

Please sign in to comment.