QS.CONTEXT.ADD.CREDIT.CURVE

Defines a credit curve and its CDS quotes directly in a context

Category: QuantSupport - Pricing.

QS.CONTEXT.ADD.CREDIT.CURVE(context: text, market_index: text, currency: text, discount_index: text, recovery: number, identifiers: cell or range, mid: cell or range, bid: cell or range, ask: cell or range, day_counter: text or blank, premium_frequency: text or blank) → text
Parameters:
  • context (text) – The same root context cell from QS.CONTEXT.CREATE for every addition; never reference the previous addition

  • market_index (text) – Market index, for example SOFR; prefixes include Equity:, Credit:, FX:, and Collateral:

  • currency (text) – Three-letter ISO currency code, for example USD or EUR

  • discount_index (text) – Market index, for example SOFR; prefixes include Equity:, Credit:, FX:, and Collateral:

  • recovery (number) – Recovery rate as a decimal between 0 and 1

  • identifiers (cell or range) – Independent quote-identifier array: scalar, row, column or spilled array; may be nonadjacent to quote sides; all supplied arrays must have the same entry count; omit for automatic matching in CONTEXT.ADD.CURVE

  • mid (cell or range) – Optional independent quote-side array; scalar, row, column or spill; blank omits this side; interior blanks preserve missing observations; supplied arrays match identifier count regardless of orientation

  • bid (cell or range) – Optional independent quote-side array; scalar, row, column or spill; blank omits this side; interior blanks preserve missing observations; supplied arrays match identifier count regardless of orientation

  • ask (cell or range) – Optional independent quote-side array; scalar, row, column or spill; blank omits this side; interior blanks preserve missing observations; supplied arrays match identifier count regardless of orientation

  • day_counter (text or blank) – Required day-count convention, for example Actual360, Actual365, or Thirty360; no blank-input default

  • premium_frequency (text or blank) – Required frequency such as Annual, Semiannual, Quarterly, Monthly, or NoFrequency; no blank-input default

Returns:

Context contribution owned by its source cell. All additions reference the same stable root; edits, removals and failed inputs invalidate registered consumers after the definition pass.

Return Type:

text

Errors:

#VALUE! for invalid root context, malformed arrays or conventions, invalid configuration, duplicate observations or registry errors. Market-dependent validation runs at pricing.

Formula

=QS.CONTEXT.ADD.CREDIT.CURVE(context, market_index, currency, discount_index, recovery, identifiers, mid, bid, ask, day_counter, premium_frequency)

Calculation

Runs on Excel’s main calculation thread.

Native Declaration

fn qs_context_add_credit_curve (context : & str , market_index : & str , currency : & str , discount_index : & str , recovery : f64 , identifiers : * const XLOPER12 , mid : * const XLOPER12 , bid : * const XLOPER12 , ask : * const XLOPER12 , day_counter : Option < String > , premium_frequency : Option < String > ,) -> Result < String , XllError >

Rust source