diff --git a/MALKHUT/README.md b/MALKHUT/README.md index 65ca756..0c8719d 100644 --- a/MALKHUT/README.md +++ b/MALKHUT/README.md @@ -516,13 +516,18 @@ reward = w_fill_probability * fill_value_score ← PRIMARY (fill quality) - w_inventory_risk * inventory_risk - w_tail_loss * tail_risk - w_time_decay * time_in_loss - + w_fee_quality * maker_fee_benefit - - spread_cost - taker_fee + + 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 ``` -The `fill_value_score` = price_quality - adverse_selection. For maker fills: -`price_quality = price_improvement_bps` (how much better than best bid/ask). -For taker fills: `price_quality = spread_bps - slippage_bps` (how efficiently we crossed). +**Fee model (BingX, no rebates):** +- Maker fee: 2.0 bps (you pay) +- 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 diff --git a/MALKHUT/docs/HFTBACKTEST_CWM_INTEGRATION.md b/MALKHUT/docs/HFTBACKTEST_CWM_INTEGRATION.md index e707387..57b7eba 100644 --- a/MALKHUT/docs/HFTBACKTEST_CWM_INTEGRATION.md +++ b/MALKHUT/docs/HFTBACKTEST_CWM_INTEGRATION.md @@ -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 + 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 ... ``` +**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`, `avg_fill_value_score` per (regime, strategy, venue) — enabling: "Which strategy achieves the best fill quality in regime X on venue Y?" diff --git a/MALKHUT/docs/OB_MICROSTRUCTURE_STUDY.md b/MALKHUT/docs/OB_MICROSTRUCTURE_STUDY.md index eceb2c4..5d30d3c 100644 --- a/MALKHUT/docs/OB_MICROSTRUCTURE_STUDY.md +++ b/MALKHUT/docs/OB_MICROSTRUCTURE_STUDY.md @@ -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. +### 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 probability is driven by **trade-arrival intensity** (the tape), not the static book.