check_normalised_weights#

API documentation for tradeexecutor.strategy.weighting.check_normalised_weights Python function.

check_normalised_weights(weights, epsilon=0.0001)[source]#

Check that the sum of weights is good.

  • If there are any entries in weights the sum must be one

  • If the weights are empty the sum must be zero

Parameters:

weights (Dict[int, float]) –