qis.df_to_long_only_allocation_sum1¶
- qis.df_to_long_only_allocation_sum1(df)[source]¶
normalise each row to sum to one after setting negative values to zero.
The long-only counterpart of
df_to_weight_allocation_sum1(): negatives are dropped before normalising rather than after, so the surviving positives carry the full weight. A row with no positive value returns all zeros rather than dividing by zero.