Class RfqDealerScorecard

java.lang.Object
com.quantfinlib.rfq.RfqDealerScorecard

public final class RfqDealerScorecard extends Object
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

    Constructors
    Constructor
    Description
    RfqDealerScorecard(int dealerCount)
    5% per-auction weight.
    RfqDealerScorecard(int dealerCount, double alpha)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    avgResponseNanos(int dealer)
    EWMA response time in nanos (0 before any quote).
    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.
    int
     
    void
    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.
    double
    quoteRate(int dealer)
    EWMA probability this dealer quotes when asked (0 before any request).
    long
    quotesGiven(int dealer)
     
    void
    Restores the card.
    long
    requests(int dealer)
     
    double
    winRate(int dealer)
    Win rate over requests answered — lifetime, not decayed (small counts).
    long
    wins(int dealer)
     
    void
    Persists the learned panel quality — see persist.Checkpoint.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      public void onAuction(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. 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

      public void writeState(DataOutput out) throws IOException
      Persists the learned panel quality — see persist.Checkpoint.
      Throws:
      IOException
    • readState

      public void readState(DataInput in) throws IOException
      Restores the card. Throws on a panel-size or version mismatch.
      Throws:
      IOException