Modeling Quote Win Probability from RFQ Trade Logs
Machine LearningModel answerLast updated
Build features from RFQ trading data, fit a logistic win-probability model, and quantify your pricing signal edge relative to competitors.
Context
You work with a dataset of Request for Quote (RFQ) records for a financial instrument. Each record corresponds to one RFQ and includes:
rfq_id: unique identifiermid_price: fair market value at quote timeyour_quote_price: the price you submitted (you are acting as a buyer, so higher bids are more competitive)best_competitor_price: the strongest competing bid (may be missing when you win)result: 1 if you won the trade, 0 if you lost
Your Task
Part 1: Feature Construction
Define a metric that captures how aggressively you priced your quote relative to the market mid. Explain how you would normalize this metric so it remains meaningful across periods of high and low volatility.
Part 2: Win Probability Model
Assume the probability of winning follows a logistic function of your pricing aggressiveness. Write the equation for P(win = 1) in terms of your normalized pricing metric and explain what the model coefficients represent.
Part 3: Information Edge Estimation
You observe that your win rate tends to be higher when the competitor's bid is closer to the mid price. Using only the result column and the observed prices, propose a method to estimate whether your pricing model contains proprietary information that competitors do not have. Describe how you would measure the strength of this information advantage.
Considerations
- You are always bidding (buying), so a higher bid is more competitive and more likely to win.
- Competitor prices are typically visible only when you lose; when you win, you know only that you outbid them.
- The mid price may occasionally be stale or unreliable in low-liquidity conditions.
- Your approach should account for the incomplete observability of competitor behavior.
Example
Suppose the mid is 100.00. You bid 99.95 and the competitor bids 99.98. Since 99.98 > 99.95, the competitor wins and you observe result = 0 and best_competitor_price = 99.98. If you had bid 99.99, you would likely have won (result = 1), but you would not observe the competitor's exact price in that case.
Hints
Hint 1
Express your bid distance from mid in units that adjust for market volatility or typical spread width.
Hint 2
The win probability curve reveals the distribution of competitor quotes; winning means you exceeded an unobserved threshold.
Hint 3
When you lose, you see the competitor's exact bid; when you win, you only know a lower bound. Use censored-data likelihood methods.
Model answer
Medium Try it yourself first — then compare your approach, complexity and edge cases.
Model Answer
This problem tests your understanding of market microstructure, feature normalization, probabilistic modeling with incomplete data, and causal inference in a competitive setting.
Part 1: Feature Construction and Normalization
Since you are buying, a more aggressive bid is closer to (or above) the mid price. Define your bid deviation as:
$$\text{deviation}_i = \text{mid}_i - \text{your_quote_price}_i$$
A smaller deviation means a more competitive bid. To normalize across volatility regimes, divide by a scale factor $S_i$:
$$d_i = \frac{\text{mid}_i - \text{your_quote_price}_i}{S_i}$$
Two common choices for $S_i$:
-
Half-spread normalization: $S_i = \frac{\text{ask}_i - \text{bid}_i^{\text{market}}}{2}$
This measures your bid in units of "half-spreads." A value $d_i = 1$ means you bid exactly at the market touch; $d_i < 1$ means you improved inside the spread. -
Volatility normalization: $S_i = \hat{\sigma}_i \cdot \text{mid}_i \cdot \sqrt{\tau}$
Here $\hat{\sigma}_i$ is recent realized volatility (e.g., exponentially weighted moving average of returns) and $\tau$ is the RFQ response window. This expresses your bid as a z-score: how many standard deviations of expected price movement you are away from mid.
Use only information available before each RFQ to avoid look-ahead bias. Apply floors and caps to $S_i$ to handle illiquid or wide-spread regimes. When spreads are unreliable, fall back to the volatility-based measure.
Example: Mid = 100.00, your bid = 99.95, half-spread = 0.05. Then $d = (100.00 - 99.95) / 0.05 = 1.0$. If a competitor bids 99.98, their deviation is $d_c = 0.4$. Since $d_c < d$, they are more aggressive and win.
Part 2: Logistic Win Probability Model
The probability of winning given your normalized deviation $d_i$ is:
$$P(\text{win} = 1 \mid d_i) = \frac{1}{1 + \exp(-(\beta_0 + \beta_1 d_i))}$$
where $\beta_1 < 0$ (larger deviation = less aggressive = lower win probability).
Interpretation: Reparameterize as:
$$P(\text{win} \mid d) = \sigma\left(\frac{d^* - d}{s}\right)$$
where $d^* = -\beta_0 / \beta_1$ and $s = -1 / \beta_1$.
- $d^*$ is the deviation at which you win 50% of the time. It represents the median competitor quote (in normalized units).
- $s$ captures the dispersion of competitor quotes. A small $s$ means competitors cluster tightly (commoditized market); a large $s$ means varied pricing.
Why logistic? You win if and only if your bid exceeds the best competitor bid: $d_i < D_c$ (where $D_c$ is the competitor's deviation). The win probability is $P(d < D_c) = 1 - F_c(d)$, the survival function of the competitor distribution. If competitor deviations follow a logistic distribution, the win curve is exactly logistic.
Fit $\beta_0, \beta_1$ via maximum likelihood (minimizing log-loss). The model slope tells you how sensitive win probability is to pricing changes.
Part 3: Information Edge Estimation
Challenge: Competitor prices are observed mainly when you lose, creating selection bias. You cannot simply model competitor behavior from observed prices alone.
Step 1: Censored Likelihood
Each RFQ gives you partial information about the competitor's deviation $D_c$:
- Loss with observed competitor price: $D_c = c_i$ exactly → likelihood contribution is the density $f_c(c_i)$
- Loss without observed price: $D_c \leq d_i$ (they beat you) → likelihood contribution is $F_c(d_i)$
- Win: $D_c > d_i$ (you beat them) → likelihood contribution is $1 - F_c(d_i)$
Model the competitor deviation as:
$$D_c \sim \text{Logistic}(\mu_c + \boldsymbol{\gamma}^\top \mathbf{z}_i, ; s)$$
where $\mathbf{z}_i$ includes market features (volatility, size, time of day). Maximize the censored likelihood to estimate $\mu_c, \boldsymbol{\gamma}, s$ without bias.
Step 2: Decompose Your Quote
Separate your quote into a base margin and a model-driven adjustment:
$$d_i = h_i + k_i$$
where $k_i = \frac{\text{mid}_i - v_i}{S_i}$ and $v_i$ is your internal fair value estimate. $h_i$ is the markup you add on top of your model.
Fit:
$$P(\text{win}) = \sigma(\beta_0 + \beta_h h_i + \beta_k k_i)$$
The ratio $\kappa = \beta_k / \beta_h$ measures information edge:
- $\kappa \approx 1$: Your model-driven adjustments affect win probability just like margin changes. Competitors do not respond to your signals → you have private information.
- $\kappa \approx 0$: When you adjust based on your model, competitors adjust similarly. They have the same information → no edge.
Quantitatively, the competitor's quote shifts by $(1 - \kappa) k_i$ in response to your signal. Your information edge in normalized units is roughly $\kappa \cdot \mathbb{E}[|k_i|]$.
Step 3: Interpreting the Observation
The prompt notes higher win rates when competitors bid near mid. Holding your quote fixed, a competitor closer to mid is more aggressive, which should lower your win rate. If the opposite is observed, the two variables are confounded.
Likely explanation: When competitors sit near mid, they lack special information, and you win when your model suggests bidding aggressively. When they deviate far from mid, they may have superior information or the mid is stale, and you lose.
Test this by adding $|D_c|$ or regime indicators as interaction terms with $k_i$ in the censored model. Validate with post-trade markouts: measure mid price at $t + \Delta$ minus your fill price on wins. High $\kappa$ with negative markouts indicates winner's curse, not true edge.
Implementation sketch:
import numpy as np
from scipy.optimize import minimize
from scipy.special import expit
def fit_censored_competitor(d_yours, won, d_competitor):
"""
d_yours: your normalized deviation
won: boolean array
d_competitor: competitor deviation (NaN when you win or unobserved)
"""
observed = ~np.isnan(d_competitor)
def neg_log_likelihood(params):
mu, log_scale = params
scale = np.exp(log_scale)
ll = 0.0
# Observed competitor quotes (usually losses)
if np.any(observed):
z = (d_competitor[observed] - mu) / scale
ll += np.sum(-np.log(scale) - z - 2 * np.log(1 + np.exp(-z)))
# Wins: competitor was worse (D_c > d_yours)
if np.any(won):
ll += np.sum(np.log(expit(-(d_yours[won] - mu) / scale)))
# Losses without observed competitor: D_c <= d_yours
unobserved_loss = ~won & ~observed
if np.any(unobserved_loss):
ll += np.sum(np.log(expit((d_yours[unobserved_loss] - mu) / scale)))
return -ll
result = minimize(neg_log_likelihood, x0=[np.median(d_yours), 0.0])
mu_star, scale = result.x[0], np.exp(result.x[1])
return mu_star, scale
Edge Cases and Practical Considerations
- Stale mid prices: Flag quotes where the mid has not updated recently or lies outside the national best bid-offer. Use microprice or last trade as fallback, or exclude these records.
- Illiquid markets: Wide spreads and sparse data make normalization unstable. Consider aggregating across similar instruments or using longer volatility windows.
- Small sample bias: Logistic regression can overfit with few observations. Regularize coefficients or use Bayesian priors.
This approach combines market microstructure intuition, censored-data methods, and causal decomposition to rigorously estimate competitive advantage from incomplete trading logs.