Documentation
Overview
What the NitroX rates library is, what the first public release contains, and where to find each topic.
NitroX is a C++20 library for building interest-rate curves and pricing linear rates instruments off them. It has no external dependencies, builds with CMake on Linux and Windows, and is released under the BSD-3-Clause licence.
What this release contains
The first public release covers three areas.
Multi-curve stripping
- Single-curve bootstraps (“shapes”) for IBOR indexes, from deposits, FRAs, futures and swaps, and for overnight (OIS) indexes, from OIS swaps, OIS FRAs, custom-dated periods and futures.
- Funding (discount) curves built on a shape, either flat to it, with funding margins, or calibrated to cross-currency basis swaps against a funding curve in another currency.
- Projection indexes (IBOR, OIS) calibrated on top of a shape and discounted on a funding curve, so tenor basis and OIS/IBOR basis are absorbed.
- Hagan-West monotone-convex interpolation, plus linear, flat-forward and step interpolations.
- Turn-of-year (and turn-of-month or quarter) jumps, and central-bank meeting steps on OIS curves.
- An OIS long end extended from an IBOR curve, and IBOR curves built from basis spreads to another IBOR index.
Swaps
- Fixed/floating interest-rate swaps (IRS) and overnight-indexed swaps (OIS), single- or two-currency, with optional notional exchange, amortising or accreting notionals.
- Present value by currency, par rate of any leg, annuity and PV01, and flow-by-flow cancellation tables.
Inflation
- CPI curves (
NxInflationIndex) calibrated to zero-coupon inflation swap quotes and published CPI fixings (NxInflationData), with monthly additive seasonality and an optional seasonality estimator. - Zero-coupon inflation swaps priced with the same swap classes.
Portfolio and risk
- Portfolios of trades valued by currency, and bucketed curve risk: DV01 per input quote and equivalent receive-fixed hedge notionals (
NxPortfolio::CalcShapeRisk).
Options and volatility, credit, the Hull-White exotics and the Excel add-in are not part of this release.
Design in one paragraph
Every curve set is built in the same layers. An NxIndexParam holds the static conventions of an index. A data object (NxIborData, NxOisData, NxInflationData) holds its market quotes and past fixings. A shape (NxIborShape, NxOisShape) is a single-curve bootstrap of those quotes. A funding curve (NxDiscountLoc) is a shape plus a calibrated zero spread. A projection index (NxIborIndex, NxOisIndex, NxInflationIndex) is a shape plus a calibrated spread, discounted on a funding curve. An NxCcyIndexes groups one funding curve and its indexes for a currency, and an NxIndexGlob groups all currencies; it is the single object every pricer receives. Every calibration instrument reprices exactly. OIS forwards are ratios of the index’s discount factors; IBOR forwards are defined as the shape’s zero rate plus the calibrated spread, which differs from discount-factor-ratio projection between calibration tenors. Concepts explains this “shape + spread” model and how it compares with the usual construction.
Contents
| Chapter | What it covers |
|---|---|
| Overview | This page. |
| Getting started | Requirements, building the library and the tests, and a first end-to-end example: an OIS curve and a swap priced off it. |
| Concepts | The object model and the shape + spread multi-curve design. |
| Conventions | Dates, calendars, day counts, business-day rules, tenor and frequency codes, rate conventions, signs. |
| Curves | Building IBOR and OIS shapes, funding and cross-currency curves, projection indexes, turns and central-bank steps, interpolation choices. |
| Swaps | Swap legs and swaps, pricing, par rates, PV01, cancellation tables. |
| Inflation | CPI curves, seasonality, zero-coupon inflation swaps. |
| Portfolio and risk | Trades and portfolios, present value by currency, bucketed curve risk (DV01 per quote, equivalent hedge notionals) and its limits. |
| Accuracy and known behaviours | How correctness is checked, how to run the tests, and behaviours you need to know before relying on a number. |
| API reference | The public classes of this release, by layer, with constructors and key methods. |
Licence
NitroX is released under the BSD-3-Clause licence. Third-party code included in the source tree, and its licence, is listed in THIRD_PARTY.md at the repository root.
From the library at v1.0.0 (ccaff0b). Edit this page on GitHub