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 (2.3 or later on Windows Arm64, where NumPy's wheels begin) and nothing compiled on install: Windows x64 and Arm64, Linux x64 and Arm64 (manylinux_2_28, glibc 2.28 or later), and macOS on Apple silicon (14 or later). 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.3

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.3
File Actions
nanoql-2.3-py3-none-win_arm64.whl Python 3 none Windows ARM64 Details for nanoql-2.3-py3-none-win_arm64.whl
nanoql-2.3-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for nanoql-2.3-py3-none-win_amd64.whl
nanoql-2.3-py3-none-manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64 Details for nanoql-2.3-py3-none-manylinux_2_28_x86_64.whl
nanoql-2.3-py3-none-manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.28+ ARM64 Details for nanoql-2.3-py3-none-manylinux_2_28_aarch64.whl
nanoql-2.3-py3-none-macosx_14_0_arm64.whl Python 3 none macOS 14.0+ ARM64 Details for nanoql-2.3-py3-none-macosx_14_0_arm64.whl

Total release size: 76.8 MB

Release files / nanoql-2.3-py3-none-win_arm64.whl

Download URL nanoql-2.3-py3-none-win_arm64.whl
Size 14.8 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
4ec3556b294e4c415e7228cb53f86fcdb8b8b5ff0696ea479cbcdcf825f60ba4
BLAKE2b-256 checksum
How to use checksums
c704ba8d173cc69433cd55304390f21798f0ff7b085788ae7f34bb367d77bfbd
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 8, 2026.

Transparency log

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

Download URL nanoql-2.3-py3-none-win_amd64.whl
Size 15.3 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
e0e5e4b68ed6bcd470b39e532556ff25b250d7be25f751c09650e82085604e62
BLAKE2b-256 checksum
How to use checksums
136a4f24b1d78e7194c78027ab5d7ce9a99b77c8fc834d8e519422450400d413
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 8, 2026.

Transparency log

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

Download URL nanoql-2.3-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
dcee84c7c5d68c306bcef83e674eb82a1583bd1112f2294e9e1394f7242a665a
BLAKE2b-256 checksum
How to use checksums
d6dbdc311f47fc2b3dd8a425a2839e4c8d107f2e85ea06b2715400cda9b3a8ea
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 8, 2026.

Transparency log

Release files / nanoql-2.3-py3-none-manylinux_2_28_aarch64.whl

Download URL nanoql-2.3-py3-none-manylinux_2_28_aarch64.whl
Size 15.5 MB
Tags Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
f6c3b4dc9939c63933185624c4214b3a17103176441e3b46d5846fd5da8a256a
BLAKE2b-256 checksum
How to use checksums
b333aebbb151eaa08e406724a49c277c15c579ced53b0a22c081e4a2e3a28ea6
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 8, 2026.

Transparency log

Release files / nanoql-2.3-py3-none-macosx_14_0_arm64.whl

Download URL nanoql-2.3-py3-none-macosx_14_0_arm64.whl
Size 15.1 MB
Tags Python 3 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
447f3e468f5e453b35e5602ae5748718f0c624967c44a848dd501ca35f895a1d
BLAKE2b-256 checksum
How to use checksums
6c55969b0611d0f3a934c31413c5c26c8280f0be18bc72b86865a5e84febe3c1
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 8, 2026.

Transparency log

Security for nanoql 2.3

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

All 5 files in this release have been uploaded with provenance metadata.

Select from 5 files

Attestation for nanoql-2.3-py3-none-win_arm64.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 8, 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