QS.SNAPSHOT.SELECTOR

Creates a native timestamp and quote-side selector; defaults to Previous and Mid

Category: QuantSupport - Market.

QS.SNAPSHOT.SELECTOR(name: text, timestamp: text, rule: text or blank, quote_level: text or blank) → text handle
Parameters:
  • name (text) – Workbook-unique object name; unchanged recalculation reuses its current handle

  • timestamp (text) – Required offset-aware RFC 3339 text, e.g. 2026-01-15T16:00:00Z or 2026-01-15T17:00:00+01:00; normalized to UTC; date-only and naive timestamps are rejected

  • rule (text or blank) – Optional Exact, Previous, or Closest matching rule; omitted, blank, or empty text defaults to Previous; Closest may select future data, with ties preferring the earlier snapshot

  • quote_level (text or blank) – Optional Mid, Bid, or Ask; omitted, blank, or empty text defaults to Mid; missing quote sides raise errors; zero-rate quotes use the selected side; FX spots are side-independent

Returns:

Revisioned SnapshotSelector handle. Defaults to Previous and Mid. Closest may choose future data and prefers the earlier snapshot on ties. Selection never rolls the market valuation date.

Return Type:

text handle

Errors:

#VALUE! for invalid or naive timestamps, unknown matching rules or quote levels, or registry failures.

Formula

=QS.SNAPSHOT.SELECTOR(name, timestamp, rule, quote_level)

Calculation

Runs on Excel’s main calculation thread.

Native Declaration

fn qs_snapshot_selector (name : & str , timestamp : & str , rule : Option < String > , quote_level : Option < String > ,) -> Result < String , XllError >

Rust source