|
|
@@ -269,6 +269,8 @@ impl AvellanedaStoikov {
|
|
|
|
|
|
Decimal::ONE_HUNDRED - Decimal::ONE_HUNDRED / (Decimal::ONE + money_flow_ratio)
|
|
|
};
|
|
|
+
|
|
|
+ self.update_flow_ratio();
|
|
|
}
|
|
|
|
|
|
pub async fn update_inventory(&mut self, inventory: &Decimal, min_amount_value: &Decimal) {
|
|
|
@@ -462,7 +464,7 @@ impl AvellanedaStoikov {
|
|
|
inventory: self.inventory,
|
|
|
sigma_square: self.sigma_square,
|
|
|
gamma: self.money_flow_index,
|
|
|
- kappa: self.kappa,
|
|
|
+ kappa: self.flow_ratio,
|
|
|
|
|
|
flow_ratio: Decimal::ZERO,
|
|
|
ref_price: self.fair_price_vec[0],
|