malkhut(docs): updated all docs — fee model, markout, urgency threshold

This commit is contained in:
Codex
2026-07-18 19:14:34 +02:00
parent ebf7f17132
commit c868dbfb66
3 changed files with 29 additions and 5 deletions

View File

@@ -516,13 +516,18 @@ reward = w_fill_probability * fill_value_score ← PRIMARY (fill quality)
- w_inventory_risk * inventory_risk - w_inventory_risk * inventory_risk
- w_tail_loss * tail_risk - w_tail_loss * tail_risk
- w_time_decay * time_in_loss - w_time_decay * time_in_loss
+ w_fee_quality * maker_fee_benefit + w_fee_quality * fee_savings ← maker saves (taker-maker) bps
- spread_cost - taker_fee - w_fee_quality * taker_fee ← taker pays full fee
- w_fee_quality * markout_cost * 0.3 ← markout = honest execution cost
``` ```
The `fill_value_score` = price_quality - adverse_selection. For maker fills: **Fee model (BingX, no rebates):**
`price_quality = price_improvement_bps` (how much better than best bid/ask). - Maker fee: 2.0 bps (you pay)
For taker fills: `price_quality = spread_bps - slippage_bps` (how efficiently we crossed). - Taker fee: 5.0 bps (you pay)
- Fee savings: 3.0 bps (maker saves 3bp vs taker)
**Markout = quality:** slippage_bps + post_fill_adverse_bps = honest execution cost.
The system learns: pay the friction (fee + slippage) when urgency × (fee + slippage) < threshold.
#### Fill Quality in the PerformanceMatrix #### Fill Quality in the PerformanceMatrix

View File

@@ -387,10 +387,19 @@ The reward function weights fill quality via `w_fill_probability` (default 0.5):
``` ```
reward = w_fill_probability * fill_value_score ← PRIMARY reward = w_fill_probability * fill_value_score ← PRIMARY
+ w_expected_pnl * pnl ← secondary + w_expected_pnl * pnl ← secondary
+ w_fee_quality * fee_savings ← maker saves (taker-maker) bps
- w_fee_quality * taker_fee ← taker pays full fee
- w_fee_quality * markout_cost * 0.3 ← markout = honest execution cost
- w_adverse_selection * toxicity - w_adverse_selection * toxicity
... ...
``` ```
**Fee model:** BingX has NO rebates. Maker=2.0bp (you pay), taker=5.0bp (you pay).
Fee savings = 3.0 bps. System learns: prefer maker when savings > fill probability cost.
**Markout = quality:** slippage_bps + post_fill_adverse_bps = honest execution cost.
System learns: pay the friction when urgency × (fee + slippage) < threshold.
PerformanceMatrix stores `avg_fill_rate`, `avg_slippage_bps`, `avg_price_improvement_bps`, PerformanceMatrix stores `avg_fill_rate`, `avg_slippage_bps`, `avg_price_improvement_bps`,
`avg_fill_value_score` per (regime, strategy, venue) — enabling: `avg_fill_value_score` per (regime, strategy, venue) — enabling:
"Which strategy achieves the best fill quality in regime X on venue Y?" "Which strategy achieves the best fill quality in regime X on venue Y?"

View File

@@ -405,6 +405,16 @@ if the market moves adversely after execution. The system scores fills by markou
**Generalizable:** score fills by post-fill markout. Model fill-CONDITIONAL-on-adverse-flow. **Generalizable:** score fills by post-fill markout. Model fill-CONDITIONAL-on-adverse-flow.
### Fee Model (BingX, No Rebates)
BingX reports fees as NEGATIVE. MALKHUT convention: positive = cost.
- Maker fee: 2.0 bps (you pay)
- Taker fee: 5.0 bps (you pay)
- Fee savings: 3.0 bps (maker saves 3bp vs taker)
- There are NO rebates on BingX.
The system learns: prefer maker when fee savings > fill probability cost.
### Fill = Queue × Flow Intensity ### Fill = Queue × Flow Intensity
Fill probability is driven by **trade-arrival intensity** (the tape), not the static book. Fill probability is driven by **trade-arrival intensity** (the tape), not the static book.