Skip to main content

nanoql for Python

nanoql for Python: quantitative finance, stateless by design, through nanoql's C interface. Calendars, curves, instruments, pricing engines and models are each a plain function of their inputs, with market conventions as data, and the same inputs always give the same results.

pip install nanoql

One wheel per platform, for every Python from 3.11, with NumPy 1.26 or later and nothing compiled on install: Windows x64 and Linux x64 (manylinux_2_28, glibc 2.28 or later); Windows Arm64, Linux Arm64 and macOS on Apple silicon follow in later releases. The wheel holds nanoql's native library, so no .NET runtime is needed.

A first swap

A five-year SOFR swap on a flat curve:

import datetime
from nanoql import ConventionSet, DiscountingSwapEngine, EvaluationContext, FlatForward, MakeOIS, Period, TimeUnit

today = datetime.date(2026, 10, 15)
context = EvaluationContext(today)
qs = ConventionSet.quant_lib()
curve = FlatForward(today, 0.036, qs.day_counter("Actual365Fixed"))

swap = (MakeOIS(Period(5, TimeUnit.Years), qs.overnight_index("Sofr", curve))
        .with_fixed_rate(0.036).with_nominal(10e6)
        .to_overnight_indexed_swap(context))

result = DiscountingSwapEngine.calculate(swap, context, curve)
print(f"NPV {result.npv:,.2f}, fair rate {result.fair_rate:.4%}")

Names follow PEP 8 (curve.discount(5.0), swap.fixed_rate), a getter is a property, and an object's handle is released when Python collects it, or at once by close() or a with block. import nanoql.experimental opts in to the experimental API. The rules are in the bindings guide.

A notebook takes this swap further, to bootstrapped curves, €STR discounting and Euribor forecasting, a SABR smile, an American put and a CDS; it runs in Google Colab with nothing to install.

How it is checked

The core's results are checked against QuantLib 1.44, using test vectors generated by QuantLib's Python package and by QuantLib built from source; the extensions ported from QLNet are checked against QLNet 1.13.2. What the checks cover, per module, is on the validation page.

More

License

Apache 2.0. nanoql is derived from QuantLib. The wheel carries LICENSE, NOTICE and THIRD_PARTY_NOTICES.md, which keep the copyright notices and licences of QuantLib and of the other code it carries, and the .NET runtime's LICENSE.TXT and THIRD-PARTY-NOTICES.TXT, which Native AOT compiles into the library.

Metadata

Release files for nanoql 2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for nanoql 2.2
File Interpreter ABI Platform Actions
nanoql-2.2-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for nanoql-2.2-py3-none-win_amd64.whl
nanoql-2.2-py3-none-manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64 Details for nanoql-2.2-py3-none-manylinux_2_28_x86_64.whl

Total release size: 31.4 MB

Release files / nanoql-2.2-py3-none-win_amd64.whl

Download URL nanoql-2.2-py3-none-win_amd64.whl
Size 15.3 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
6f98e10ac4a8c037d2114b3d6fa23fd276f36a6cda3ea3e2726df528941201f1
BLAKE2b-256 checksum
How to use checksums
e8d1e614de319968ea657f36b9ced2234ad8213f3c27a864dc1578da3d13ea9d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 7, 2026.

Transparency log

Release files / nanoql-2.2-py3-none-manylinux_2_28_x86_64.whl

Download URL nanoql-2.2-py3-none-manylinux_2_28_x86_64.whl
Size 16.1 MB
Tags Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
3df2b26d11aaf74557f2553f25bea87c957290967b46cce91fd46c9b5fb877a2
BLAKE2b-256 checksum
How to use checksums
721536a50e6c530d847b8b2f80c6deac00cc32abbd749c7008bb1d2a8f5807cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 7, 2026.

Transparency log

Security for nanoql 2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for nanoql-2.2-py3-none-win_amd64.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 7, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page