diff --git a/pypfopt/hierarchical_portfolio.py b/pypfopt/hierarchical_portfolio.py index 6dc76d07..248aac15 100644 --- a/pypfopt/hierarchical_portfolio.py +++ b/pypfopt/hierarchical_portfolio.py @@ -176,9 +176,6 @@ def optimize(self, linkage_method="single"): OrderedDict weights for the HRP portfolio """ - if linkage_method not in sch._LINKAGE_METHODS: - raise ValueError("linkage_method must be one recognised by scipy") - if self.returns is None: cov = self.cov_matrix corr = cov_to_corr(self.cov_matrix).round(6) diff --git a/requirements.txt b/requirements.txt index 7c90d815..1b8a9410 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ cvxpy>=1.1.19 -numpy>=1.0.0 -pandas>=0.19 +numpy>=1.26.0,<3.0.0 +pandas>=1.0.0,<4.0.0 scikit-base<0.14.0 scikit-learn>=0.24.1 scipy>=1.3.0