imbalance

Function imbalance 

Source
pub fn imbalance(i: &[FPDecimal], p: &[FPDecimal], w: &[FPDecimal]) -> FPDecimal
Expand description

§Description

Calculates the cluster imbalance.

§Params

  • i is a reference to an array containing objects of type FPDecimal which
    is the asset inventory.

  • p is a reference to an array containing objects of type FPDecimal which
    are the prices of the assets.

  • w is a reference to an array containing objects of type FPDecimal which are the target weights of the assets.