소스 검색

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

skyffire 1 년 전
부모
커밋
9658864e9b
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  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);
     }