From 463037ab59da75847f5930b64fc48976be1131c4 Mon Sep 17 00:00:00 2001 From: antoniouaa Date: Tue, 8 Oct 2024 00:51:01 +0100 Subject: [PATCH] replaced np.product as it is deprecated --- quantstats/stats.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quantstats/stats.py b/quantstats/stats.py index e544f373..8248e09a 100644 --- a/quantstats/stats.py +++ b/quantstats/stats.py @@ -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):