proof-of-portfolio 0.0.89__py3-none-any.whl → 0.0.91__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
1
  # This file is auto-generated during build
2
- __version__ = "0.0.89"
2
+ __version__ = "0.0.91"
@@ -40,15 +40,19 @@ pub fn omega(
40
40
  sum_weights_negative = OMEGA_LOSS_MINIMUM;
41
41
  }
42
42
 
43
- let positive_sum = product_sum_positive * sum_weights_negative;
44
- let negative_sum = -product_sum_negative * sum_weights_positive;
43
+ let positive_sum_u128 = (product_sum_positive as u128) * (sum_weights_negative as u128);
44
+ let negative_sum_u128 = ((-product_sum_negative) as u128) * (sum_weights_positive as u128);
45
+
46
+ let positive_sum = (positive_sum_u128 / 1000000) as i64;
47
+ let negative_sum = (negative_sum_u128 / 1000000) as i64;
45
48
 
46
49
  let effective_denominator = if negative_sum >= OMEGA_LOSS_MINIMUM {
47
50
  negative_sum
48
51
  } else {
49
52
  OMEGA_LOSS_MINIMUM
50
53
  };
51
- ((positive_sum * RATIO_SCALE_FACTOR) / effective_denominator) as i64
54
+ let final_calc = ((positive_sum as u128) * (RATIO_SCALE_FACTOR as u128)) / (effective_denominator as u128);
55
+ final_calc as i64
52
56
  } else {
53
57
  let mut positive_sum: u64 = 0;
54
58
  let mut negative_sum: u64 = 0;