We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9e15e1c commit 5166de0Copy full SHA for 5166de0
src/riskparityportfolio/tests/test_modern_rpp.py
@@ -102,7 +102,8 @@ def test_constraints():
102
w = my_portfolio.weights
103
np.testing.assert_almost_equal(np.sum(w), 1)
104
np.testing.assert_equal(all(w >= 0), True)
105
- np.testing.assert_array_less(w, 0.03 + 1e-3)
+ print(max(w))
106
+ np.testing.assert_array_less(w, (0.03 + 1e-3)*np.ones(N))
107
108
# Bounds for sum: 0.5 <= sum(w) <= 1 (
109
my_portfolio = rpp.RiskParityPortfolio(Sigma)
0 commit comments