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.1

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

Total release size: 76.8 MB

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

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

Transparency log

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

Download URL nanoql-2.3.1-py3-none-win_amd64.whl
Size 15.3 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
2d775f983560b1d97649cb84e44053d2df1b2bd214e0e448568d6545d9f427c6
BLAKE2b-256 checksum
How to use checksums
a6eb5b53f65b51880913c80a4df2a4291ed39146fdba19f9909a4680f69e7b9d
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 9, 2026.

Transparency log

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

Download URL nanoql-2.3.1-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
78a303d62c01e1563bc5dbfdd28ca4f96742c9101591a38c197d2acde3082f41
BLAKE2b-256 checksum
How to use checksums
06d7bf3012349a8318ecdc45287b8059294a857ec7ab1c9c588704fc62819af2
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 9, 2026.

Transparency log

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

Download URL nanoql-2.3.1-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
bb9a8df8f705090d36eb263b41cbd01ffc0f91bd97cd517317a202e1a8dc341a
BLAKE2b-256 checksum
How to use checksums
93969b0912e079a047e75d5899d2c8727e509ce2e36c6ac798f02b1309ba1d1d
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 9, 2026.

Transparency log

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

Download URL nanoql-2.3.1-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
9e73f4d4e10b48761be0095ad9a534a92050f5f3820676f8c4bfe18406b399d0
BLAKE2b-256 checksum
How to use checksums
4bed2ccfbad9ddb072e08066dfe7b90df59f48fdcee51c328e487767cb804407
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 9, 2026.

Transparency log

Security for nanoql 2.3.1

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.1-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 9, 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