feat(hedger): switch Shadow Order to fixed 600s timeout for data collection
This commit is contained in:
@ -900,13 +900,9 @@ class ScalperHedger:
|
|||||||
# --- Shadow Order Creation ---
|
# --- Shadow Order Creation ---
|
||||||
# Simulate: "What if we placed a Maker order instead?"
|
# Simulate: "What if we placed a Maker order instead?"
|
||||||
try:
|
try:
|
||||||
# Dynamic Timeout: Inverse to Volatility
|
# Fixed Timeout for Data Collection (10 min)
|
||||||
# Low Vol (0.025%) -> 60s wait. High Vol (0.15%) -> 10s wait.
|
# We want to capture the full distribution of fill times.
|
||||||
base_vol = Decimal("0.0005") # 0.05%
|
dynamic_timeout = 600.0
|
||||||
# Avoid div by zero
|
|
||||||
safe_vol = max(Decimal("0.0001"), vol_pct)
|
|
||||||
calc_timeout = float(30 * (base_vol / safe_vol))
|
|
||||||
dynamic_timeout = max(10.0, min(60.0, calc_timeout))
|
|
||||||
|
|
||||||
# Shadow Price (Passive)
|
# Shadow Price (Passive)
|
||||||
# If we Taker BUY, we would have Maker BUY at BID
|
# If we Taker BUY, we would have Maker BUY at BID
|
||||||
|
|||||||
Reference in New Issue
Block a user