Explorar o código

inventory不要

skyfffire hai 1 ano
pai
achega
2140058a92
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      strategy/src/avellaneda_stoikov.rs

+ 1 - 1
strategy/src/avellaneda_stoikov.rs

@@ -230,7 +230,7 @@ impl AvellanedaStoikov {
 
     pub fn update_delta(&mut self) {
         if self.gamma != Decimal::ZERO {
-            let pos_edge = self.gamma * self.sigma_square * self.inventory.abs().powd(dec!(3.14)) * self.t_diff / Decimal::TWO;
+            let pos_edge = self.gamma * self.sigma_square * self.inventory.abs() * self.t_diff / Decimal::TWO;
 
             self.base_delta = self.sigma_square * self.t_diff;
             self.ratio_edge = dec!(3.14) * self.flow_ratio * self.sigma_square;