Jelajahi Sumber

窗口大小改成五分钟试试。

skyffire 1 tahun lalu
induk
melakukan
9658864e9b
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 2 2
      strategy/src/avellaneda_stoikov.rs

+ 2 - 2
strategy/src/avellaneda_stoikov.rs

@@ -51,7 +51,7 @@ pub struct AvellanedaStoikov {
 
 impl AvellanedaStoikov {
     // 时间窗口大小(微秒)
-    const MAX_TIME_RANGE_MICROS: i64 = 2 * 60_000_000;
+    const MAX_TIME_RANGE_MICROS: i64 = 5 * 60_000_000;
     const ONE_MILLION: Decimal = dec!(1_000_000);
     const TWENTY_THOUSAND: Decimal = dec!(20_000);
     const IRA: Decimal = dec!(1);
@@ -186,7 +186,7 @@ impl AvellanedaStoikov {
     }
 
     pub fn update_sigma_square(&mut self) {
-        self.sigma_square = self.spread_max / Decimal::TEN;
+        self.sigma_square = self.spread_max;
         self.sigma_square.rescale(10);
     }