Class RfqDealerScorecard
java.lang.Object
com.quantfinlib.rfq.RfqDealerScorecard
Streaming per-dealer RFQ quality — the structured-products sibling of
execution.VenueScorecard and fx.LpScorecard: over many
auctions, which dealers actually show up, how fast, how competitively,
and how often they win. This is what decides tomorrow's panel — a
dealer who quotes 95% of requests two ticks off fair beats one who
wins occasionally and declines the rest, because panel slots are
finite and a decline is information you paid for with a revealed
intention to trade.
Feed each finished RfqAuction via onAuction(com.quantfinlib.rfq.RfqAuction): every
panel dealer records quoted-or-declined, quoters record their response
time and spread-to-fair, the winner records the win. All statistics
are per-event EWMAs seeded from the first observation (the library's
convention: a dealer's first quote is never blended against zero).
Zero allocation per auction, single writer; the learned panel quality
persists via persist.Checkpoint.
-
Constructor Summary
ConstructorsConstructorDescriptionRfqDealerScorecard(int dealerCount) 5% per-auction weight.RfqDealerScorecard(int dealerCount, double alpha) -
Method Summary
Modifier and TypeMethodDescriptiondoubleavgResponseNanos(int dealer) EWMA response time in nanos (0 before any quote).doubleavgSpreadToFairBps(int dealer) EWMA quoted spread to model fair in bps — the competitiveness number: how far off theory this dealer's ink lands, win or lose. 0 before any anchored quote.intvoidonAuction(RfqAuction auction) Records a finished auction: every dealer on the panel is scored (quoted or declined), quoters add response time and — when the auction carried a fair-value anchor — spread to fair.doublequoteRate(int dealer) EWMA probability this dealer quotes when asked (0 before any request).longquotesGiven(int dealer) voidRestores the card.longrequests(int dealer) doublewinRate(int dealer) Win rate over requests answered — lifetime, not decayed (small counts).longwins(int dealer) voidwriteState(DataOutput out) Persists the learned panel quality — seepersist.Checkpoint.
-
Constructor Details
-
RfqDealerScorecard
public RfqDealerScorecard(int dealerCount, double alpha) - Parameters:
dealerCount- panel size (dense indices, aligned with the auctions you feed)alpha- EWMA weight per auction, e.g. 0.05
-
RfqDealerScorecard
public RfqDealerScorecard(int dealerCount) 5% per-auction weight.
-
-
Method Details
-
onAuction
Records a finished auction: every dealer on the panel is scored (quoted or declined), quoters add response time and — when the auction carried a fair-value anchor — spread to fair. The panel sizes must match; a mismatched auction throws rather than misattributing dealers. -
quoteRate
public double quoteRate(int dealer) EWMA probability this dealer quotes when asked (0 before any request). -
winRate
public double winRate(int dealer) Win rate over requests answered — lifetime, not decayed (small counts). -
avgResponseNanos
public double avgResponseNanos(int dealer) EWMA response time in nanos (0 before any quote). -
avgSpreadToFairBps
public double avgSpreadToFairBps(int dealer) EWMA quoted spread to model fair in bps — the competitiveness number: how far off theory this dealer's ink lands, win or lose. 0 before any anchored quote. -
requests
public long requests(int dealer) -
quotesGiven
public long quotesGiven(int dealer) -
wins
public long wins(int dealer) -
dealerCount
public int dealerCount() -
writeState
Persists the learned panel quality — seepersist.Checkpoint.- Throws:
IOException
-
readState
Restores the card. Throws on a panel-size or version mismatch.- Throws:
IOException
-