QS.CONTEXT.CREATE

Creates a stable workbook-scoped pricing context; additions update its owned market definitions

Category: QuantSupport - Pricing.

QS.CONTEXT.CREATE(name: text, reference_date: text, base_currency: text, base_index: text, quote_level: text or blank, anchor_fixings: logical or blank) → text
Parameters:
  • name (text) – Workbook-unique name for the stable root context; every CONTEXT.ADD cell for this market references the returned handle

  • reference_date (text) – Required market reference and evaluation date as ISO text in YYYY-MM-DD format; relative instrument dates resolve against this date

  • base_currency (text) – Required base collateral currency as a three-letter ISO code, e.g. USD or EUR; used with base_index for market construction and default discounting

  • base_index (text) – Required base collateral remuneration curve index, e.g. SOFR for USD or ESTR for EUR; add its curve to this context for valuations that require it

  • quote_level (text or blank) – Optional Mid, Bid or Ask; omitted or blank defaults to Mid; a missing selected side raises an error

  • anchor_fixings (logical or blank) – Optional TRUE/FALSE; omitted or blank defaults to TRUE; TRUE requires stored index fixings strictly before evaluation and projects today/future; FALSE projects all index observations

Returns:

Stable root context identity containing date, base currency/index and quote side. CONTEXT.ADD cells own contributions on this context; evaluation commits them and builds markets lazily on workers.

Return Type:

text

Errors:

#VALUE! for invalid name, date, currency, index or quote side.

Formula

=QS.CONTEXT.CREATE(name, reference_date, base_currency, base_index, quote_level, anchor_fixings)

Calculation

Runs on Excel’s main calculation thread.

Native Declaration

fn qs_context_new (name : & str , reference_date : & str , base_currency : & str , base_index : & str , quote_level : Option < String > , anchor_fixings : Option < bool > ,) -> Result < String , XllError >

Rust source