API documentation for tradeexecutor.strategy.weighting.clip_to_normalised Python function.
- clip_to_normalised(weights, epsilon=3e-05, very_small_subtract=1e-05)#
If the sum of the weights are not exactly 1, then decrease the largest member to make the same sum 1 precise.
A dict of pair id -> fixed weight mappings.
New weights where the largest weight have been clipped to make exactly 1
- Return type: