James McCool
commited on
Commit
·
8a560d8
1
Parent(s):
0b4291c
Fix logic for 'Similarity Score' comparison in trim_portfolio.py to ensure correct filtering of portfolios based on performance thresholds. This change enhances the accuracy of the trimming process.
Browse files
global_func/trim_portfolio.py
CHANGED
@@ -10,7 +10,7 @@ def trim_portfolio(portfolio: pd.DataFrame, trim_slack: float, performance_type:
|
|
10 |
|
11 |
for i in range(1, len(working_portfolio)):
|
12 |
if own_type == 'Similarity Score':
|
13 |
-
if working_portfolio.loc[i, own_type]
|
14 |
working_portfolio.loc[i, performance_type] > performance_threshold_low and \
|
15 |
working_portfolio.loc[i, performance_type] <= performance_threshold_high and \
|
16 |
working_portfolio.loc[i, own_type] > own_threshold_low and \
|
|
|
10 |
|
11 |
for i in range(1, len(working_portfolio)):
|
12 |
if own_type == 'Similarity Score':
|
13 |
+
if working_portfolio.loc[i, own_type] < curr_own_type_max and \
|
14 |
working_portfolio.loc[i, performance_type] > performance_threshold_low and \
|
15 |
working_portfolio.loc[i, performance_type] <= performance_threshold_high and \
|
16 |
working_portfolio.loc[i, own_type] > own_threshold_low and \
|