Built on QuantLib · Open source · BSD

An open derivatives pricing engine.

Quantra prices rates, credit, inflation, FX and equity derivatives, structured notes included, as a stateless service: send the trade and its market data as JSON or gRPC, get prices, cash flows and risk back. One container, no database, nothing stored.

$ docker run -p 8080:8080 ghcr.io/joseprupi/quantra-server
$ curl -X POST :8080/price-ois-swap -d @sofr_5y.json
…
→ {"swaps": [{"npv": 337986.79, "fair_rate": 0.0375, …}]}
Coverage

What the engine prices

Every product is a QuantLib instrument, engine and term structure, configured entirely from the request. Conventions are explicit fields, never silent defaults, and every product has a worked request checked against an independent QuantLib reference.

Curves

Yield curve construction

Bootstrapped from deposits, FRAs, futures, swaps, OIS and dated OIS, bonds, tenor basis, FX swaps and cross-currency basis, with curves depending on each other (multi-curve, OIS discounting). Or built directly from discount factors, zero rates or forwards.

Discount, zero or forward traits; log-linear, linear, log-cubic and flat interpolation. Payment lag, lookback, lockout and observation shift on overnight helpers. Bootstrapped curves are cached per worker.

  • /bootstrap-curves
Rates

Swaps and FRAs

One leg model for every swap: fixed, IBOR, overnight (compounded or averaged) or CMS coupons, each leg with its own curves, calendar and schedule.

Vanilla, OIS, basis and zero-coupon swaps, FRAs. Amortizing and step-up notionals, short or long stubs, CMS with linear TSR or Hagan pricers, capped and floored coupons. NPV, fair rate and spread, and every cash flow per leg.

  • /price-vanilla-swap · /price-ois-swap
  • /price-basis-swap · /price-zero-coupon-swap · /price-fra
Rate options

Swaptions, caps, floors

European, Bermudan and American swaptions on a vanilla or OIS underlying: Black, shifted Black, Bachelier, or Hull-White on a lattice, physical or cash settled (four settlement methods).

Vol as a constant, an ATM matrix, a smile cube, SABR parameters or a SABR fit; Hull-White calibration to the swaption grid. Greeks by bump and reprice. Caps, floors and collars on optionlet vols, Black or Bachelier.

  • /price-swaption · /price-cap-floor
  • /calibrate-swaption-vol · /calibrate-swaption-model
Fixed income

Bonds

Fixed, floating and zero-coupon bonds, and callable or puttable bonds on a Hull-White trinomial tree. Amortizing redemptions and stubs.

Clean and dirty price, yield, duration and convexity, accrued interest and the full cash flow schedule, discounted on any curve in the request.

  • /price-fixed-rate-bond · /price-floating-rate-bond
  • /price-zero-coupon-bond · /price-callable-fixed-rate-bond
Credit

Credit default swaps

Credit curves bootstrapped from par spreads or upfront quotes, or a flat hazard rate, with explicit recovery and conventions.

Midpoint or ISDA standard engine, running or upfront premium, protection buyer or seller. NPV, fair spread and upfront, both legs.

  • /price-cds
Inflation

Inflation swaps and options

Zero-coupon and year-on-year inflation curves bootstrapped from swap quotes, with index fixings and observation lags from the request.

Zero-coupon and year-on-year inflation swaps; year-on-year caps, floors and collars with Black, unit-displaced Black or Bachelier.

  • /bootstrap-inflation-curves
  • /price-zero-coupon-inflation-swap · /price-year-on-year-inflation-swap
  • /price-year-on-year-inflation-cap-floor
FX

FX forwards and cross-currency swaps

FX forwards on two discount curves and a spot, with forward points and the fair forward rate.

Cross-currency swaps with fixed, IBOR or overnight legs in two currencies and principal exchanges. FX-implied curves from FX swap points and cross-currency basis.

  • /price-fx-forward · /price-cross-currency-swap
Equity

Options and vol surfaces

European, American and Bermudan options: vanilla, cash- or asset-or-nothing, barriers, discrete dividends. Black-Scholes analytic or a binomial tree.

From a sheet of listed option quotes: implied forwards and dividends by put-call parity, and an arbitrage-checked Black surface (Andreasen-Huge or SVI per expiry) that reprices the quotes.

  • /price-equity-option
  • /calibrate-implied-forwards · /calibrate-vol-surface
Structured notes

Notes on index baskets

Monte Carlo on correlated indices: worst-of, best-of or average autocallables, Phoenix and snowball coupons, low hurdles, step-downs, reverse convertibles, European or daily barriers, geared puts, upside participation, quanto underlyings, seasoned notes.

Flat or term vols, or Dupire local vol from a surface or SVI slices. Sobol with Brownian bridge, antithetics. Greeks on common random numbers; diagnostics down to the payoff distribution and a vanilla repricing check.

  • /price-structured-note
Code

An open source engine

Engine · BSD

joseprupi/quantraserver

The pricing engine: a stateless C++ gRPC server built on QuantLib, with a plain JSON API. BSD licensed like QuantLib itself: use it, modify it, embed it, run it commercially.

Get started

Three ways in

Container

docker run

Run the engine on your machine and price with plain JSON over HTTP. One container, no dependencies.

Public API

api.quantra.io

The same engine, hosted. Send any request from the API reference with curl, nothing to install.

Source

github.com/joseprupi/quantraserver

The code, the release notes and a complete example request for every product.

How it runs

A pricing service, not a library

QuantLib keeps the evaluation date and other state global to a process. Quantra runs isolated QuantLib workers behind a load balancer, so requests on different dates and markets price in parallel without touching each other.

JSON clientHTTP, OpenAPI
→
json_server:8080
→
EnvoygRPC · FlatBuffers · :50051
→
QuantLib workersone process each

gRPC clients talk to Envoy directly. C++ and Python clients ship with the engine.

Near-linear scaling8.9x throughput with 12 workers on 12 physical cores.
Curve cacheA two-curve, 24-helper swap goes from 117 ms to 2 ms when its curves are cached.
Checked against QuantLibOver 200 functional cases, each a complete request asserted against an independent QuantLib computation.
Contact

Questions, ideas, problems

Send a note: a bug, a feature you need, or anything about running Quantra.