ThirdMomentQuantX

Excel function reference

Contents
  1. Loading the add-in
  2. Conventions
  3. Markets
  4. Time series
  5. Historical volatilities and correlations
  6. Data settings
  7. Functions

The Excel add-in calls the QuantX library from worksheet functions. It holds no financial logic of its own.

Loading the add-in

The add-in is for 64-bit Excel on Windows and needs the .NET 10 Desktop Runtime (x64), as the desktop app does: its Data settings dialog is a WPF window.

  • For users: open QuantX-AddIn64.xll, a single file that holds the add-in and the library. In Excel: File → Options → Add-ins → Manage: Excel Add-ins → Go… → Browse…, then select the file.

Conventions

  • Every function name starts with QX. followed by a mixed-case name, so typing =QX. lists all of them. In the Insert Function dialog they are under the category "QuantX".
  • When the library rejects an input, the cell shows the text #QX! followed by the reason, for example #QX! The volatility must be positive.. Because this is text, ISERROR does not catch it; test LEFT(cell, 4) = "#QX!" instead.
  • Every function except the market and series functions below is pure: the same inputs always give the same result, and Excel recalculates it only when an input changes. Functions may run on several threads at once.
  • Dates are returned as Excel dates (serial numbers), so that charts, lookups and date arithmetic work. A function cannot format its own cells: format a date column once as dd-mmm-yyyy (Format Cells → Custom) to show 14-Oct-2026. A date argument accepts an Excel date or text in that form or in ISO form (2026-10-14).
  • When nothing is stored for what a series function is asked, it returns Excel's own #N/A, which IFNA and ISNA catch.

Markets

The market functions read the data store the settings name (below), by default the desktop app's database, %LOCALAPPDATA%\ThirdMoment\QuantX\Data\quantx.db, which the data providers fill.

There is one market: every shipped curve, spot rate, fixing series and volatility grid. You pick its date, never a name.

  1. =QX.MarketDates() lists the dates of the last two years on which the store can build the market, each "complete" or "issues". Format its first column as dd-mmm-yyyy, then point a data validation list at it to pick a date from a drop-down.
  2. =QX.Market(A1) builds the market on the date in A1 and shows its handle, for example Market 14-Oct-2026 #1. The market date is the valuation date. Every part the store cannot fill on that date (a curve without one of its quotes and the curves that read it, a volatility grid without a snapshot, fixings) is left out; the handle then ends in the count of issues, for example (2 issues), and a price that needs a part left out says so. After Excel restarts, a handle whose market is no longer in memory is built again on first use.
  3. Pricing functions (to come) take the handle's cell as their market argument. Changing A1 builds the other date, and every dependent cell recalculates. Several handles on different dates can be used side by side, for example for a day-on-day change.

A market is built once, however many cells ask for it; building it takes a few seconds, during which Excel waits. After quotes of the market's date are edited or loaded, change the cell given as second argument, =QX.Market(A1, $D$1): any new value in D1 (a counter, a time) builds the market again and raises the build number in its handle (#2), so every cell that uses the handle recalculates. Recalculating without changing D1 builds nothing. A failed build is not kept: once a provider has written the missing quotes, the next calculation builds the market. Markets stay in memory until Excel closes.

Time series

The series functions read any series in the same database: data series such as FRED's, fixings and market quotes. A series is named as on the desktop's Time series page: a data series by its identifier (DGS10), a quote series by its key, instrument and field separated by | (USD-SOFR | Fixing, USD-SOFR-OIS 5Y | Mid). Values are as stored: data series in their provider's units (4.25 for 4.25 percent), quotes in the library's (0.0425, FX points, FX outright).

  1. =QX.SeriesList() lists every series: name, kind (data, fixing or quote), title, units, count, first and last date. =QX.SeriesList("sofr", "fixing") keeps the fixings whose name or title contains "sofr".
  2. =QX.Series("DGS10") spills the whole history as two columns, dates and values, oldest first; =QX.Series("USD-SOFR | Fixing", A1, B1) keeps the dates from A1 to B1. Select the two columns and insert a line chart to plot it.
  3. =QX.SeriesValue("USD-SOFR | Fixing", A1) is the fixing of the date in A1, #N/A if there is none; with TRUE as third argument, the last one on or before that date.

Historical volatilities and correlations

The statistics functions compute from the same stored series (0048, methodology chapter 17). They keep only the dates on which every series named has a value in the window, and measure returns between those dates: log returns for FX outrights and for data series not in percent or basis points, differences for rates, spreads and the rest, unless returns says otherwise.

  1. =QX.Correlation(A1:A3) spills the correlation matrix of the series named in A1:A3, with their names as a header row and column. Returns span two common dates by default (horizon), which softens the bias from Riyadh closing hours before New York; give 1 for daily returns. =QX.Correlation(A1:A3, "01-Jan-2024", , "EWMA") weights recent returns more (decay 0.94); a number such as 0.97 as method is EWMA with that decay.
  2. =QX.Volatility(A1:A3) spills one row per series: name, annualised volatility, the return kind used, the number of returns and the first and last common dates. A log-return volatility is a decimal (0.08 for 8%); a difference volatility is in the series' units per year.
  3. =QX.NearestCorrelation(B2:D4) returns the nearest valid correlation matrix to a symmetric range, for example a matrix edited by hand.

To try them before real series are stored, add the dummy series (codes starting with DUMMY-, listed in the data providers page), for example =QX.Correlation({"DUMMY-EURUSD";"DUMMY-USD-SOFR-5Y";"DUMMY-USDSAR"}).

The functions read the store each time their arguments change. After a provider has written new values, change the cell given as refresh argument (as for QX.Market) to read them. A long series takes a moment to spill, as cells recalculating together read the database one after the other.

Data settings

The add-in reads the data store that the settings name, the same settings file as the desktop app's Settings > Data page (0054, settings file). The Data settings button on the ribbon's QuantX tab opens a dialog to choose the store and its options, test the connection, choose the default series provider and the folders searched for plug-ins and providers. Saved choices apply when Excel next starts. A choice that the machine's settings file locks is shown but cannot be changed.

=QX.DataStore() shows which store a workbook reads, and =QX.Providers() lists the providers the settings find, with those that could not be read.

Functions

Function Arguments Returns Since
QX.Version() None The version of the QuantX library loaded in Excel: the version number, a plus sign and the source commit, for example 0.1.0+a7e23c1d… 0.1.0
QX.Market(date, [refresh]) date: the market date; refresh: any value whose change builds the market again The market's handle, such as Market 14-Oct-2026 #1 or Market 14-Oct-2026 #1 (2 issues), for other functions to take 0.1.0
QX.MarketDates([first], [last]) first: two years before last by default; last: today by default Two spilled columns: each date the store can build the market on, as an Excel date, and "complete" or "issues" 0.1.0
QX.SeriesList([search], [kind], [refresh]) search: text to find in the name or title; kind: data, fixing or quote; refresh: any value whose change reads the store again Seven spilled columns, one row per series: name, kind, title, units, count, first and last date (Excel dates, blank when nothing is stored); #N/A when none matches 0.1.0
QX.Series(name, [first], [last], [refresh]) name: a series such as DGS10 or USD-SOFR \| Fixing; first, last: the first and last dates, all history by default; refresh Two spilled columns, oldest first: Excel dates and values; #N/A when nothing is stored in the range 0.1.0
QX.SeriesValue(name, date, [previous], [refresh]) name; date; previous: TRUE for the last value on or before the date (FALSE by default); refresh The value; #N/A when none is stored 0.1.0
QX.Correlation(names, [first], [last], [method], [horizon], [returns], [refresh]) names: a range of series names; first, last: the window, all history by default; method: Pearson (default), EWMA, or a decay factor for EWMA; horizon: common dates each return spans, 2 by default; returns: auto (default), log or difference, one or one per series; refresh The correlation matrix with the names as a header row and column; #N/A when a series has nothing stored in the window 0.1.0
QX.Volatility(names, [first], [last], [method], [horizon], [returns], [refresh]) As QX.Correlation One row per series: name, annualised volatility, return kind, number of returns, first and last common date (Excel dates); #N/A when a series has nothing stored in the window 0.1.0
QX.DataStore([refresh]) refresh: any value whose change calculates it again Two spilled columns: the store's name, its description, its location, the contract version and the settings files read 0.1.0
QX.Providers([refresh]) refresh: any value whose change looks for the providers again Four spilled columns under a header: each provider's name, what it serves (quotes, series), its file version and folder; then a "Not loaded" row for each provider that could not be read 0.1.0
QX.NearestCorrelation(matrix, [weights]) matrix: a square, symmetric range of numbers; weights: one positive weight per row, equal by default The nearest correlation matrix: symmetric, ones on the diagonal, no negative eigenvalue 0.1.0

Reconnecting Connection paused Could not reconnect Could not resume Session expired

The connection to the server was lost. Trying to restore it. Next attempt in 0s. The connection was paused. It will resume on its own. The server did not answer. Your work is still here. The paused session could not be resumed. The server could not restore this session. Reloading will start a new one.

An unhandled error has occurred. Reload 🗙