Skip to main content

nanobook Python bindings

Rust extension plus pure-Python research helpers. Build with uv sync --group dev from this directory.

Monte Carlo scenarios (Rust-backed, parity-safe)

nanobook.scenarios provides terminal price distributions for stress testing and forecasting. When the extension is built with the scenarios feature (default in wheels), int/None seeds delegate to Rust: NumPy PCG64 draws feed Rust math so results match the nanotrade/calc reference at tight tolerance. A pure-Python fallback remains for random.Random seeds and environments without numpy.

import nanobook

res = nanobook.monte_carlo_stock_valuation(
    "XYZ",
    74.0,
    version="advanced",
    n_paths=200,
    seed=42,
    gp_growth_mean=0.16,
    multiple_mean=22.0,
    macro_shock_mean=-0.03,
)
print(res)  # MonteCarloResult(..., median_price=86.36)
print(res.median_price, res.implied_median_annual_return)

paths = res.to_price_paths(4, method="linear")
# See examples/scenario_backtest.py for feeding paths into backtest_weights.

Regenerate frozen parity fixtures:

cd ../../nanotrade && uv run python ../nanobook/python/scripts/generate_scenarios_parity.py

Run scenario tests:

uv run pytest tests/test_scenarios*.py tests/property/test_prop_scenarios.py tests/reference/test_ref_scenarios.py -q

Metadata

Release files for nanobook 0.18.1

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

Source distribution (sdist)

Source distribution for nanobook 0.18.1
File Size Uploaded
nanobook-0.18.1.tar.gz 6.5 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for nanobook 0.18.1
File
nanobook-0.18.1-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
nanobook-0.18.1-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.17+ x86-64 Details
nanobook-0.18.1-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.14 CPython 3.14 Linux glibc 2.17+ ARM64 Details
nanobook-0.18.1-cp314-cp314-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl CPython 3.14 CPython 3.14 macOS 10.12+ x86-64, macOS 11.0+ ARM64, macOS 10.12+ universal2 (ARM64, x86-64) Details
nanobook-0.18.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ x86-64 Details
nanobook-0.18.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ ARM64 Details
nanobook-0.18.1-cp313-cp313-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl CPython 3.13 CPython 3.13 macOS 10.12+ x86-64, macOS 11.0+ ARM64, macOS 10.12+ universal2 (ARM64, x86-64) Details
nanobook-0.18.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details
nanobook-0.18.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ ARM64 Details
nanobook-0.18.1-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64, macOS 10.12+ universal2 (ARM64, x86-64), macOS 10.12+ x86-64 Details
nanobook-0.18.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details
nanobook-0.18.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ ARM64 Details
nanobook-0.18.1-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl CPython 3.11 CPython 3.11 macOS 10.12+ x86-64, macOS 11.0+ ARM64, macOS 10.12+ universal2 (ARM64, x86-64) Details

Total release size: 30.2 MB

Release files / nanobook-0.18.1.tar.gz

Download URL nanobook-0.18.1.tar.gz
Size 6.5 MB
Tags Source
SHA-256 checksum
How to use checksums
59f01a6fa4d0d0e24f9da7c4aa0102f1e453610901ec19650743d65c91232006
BLAKE2b-256 checksum
How to use checksums
a4f1a99098168930aaf20150c47da257e5b7058dcae4712e3318e2cab0549bef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 17, 2026.

Transparency log

Release files / nanobook-0.18.1-cp314-cp314-win_amd64.whl

Download URL nanobook-0.18.1-cp314-cp314-win_amd64.whl
Size 1.2 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
58b3e16033394cec474fe02acaeb5f22c81fde2ae5ce4d3d5f827dd414956622
BLAKE2b-256 checksum
How to use checksums
dc5c0aba7d018efe1fcabed781f7bc12bdf128e556f9a6b056633897aad32adf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 17, 2026.

Transparency log

Release files / nanobook-0.18.1-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL nanobook-0.18.1-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.5 MB
Tags CPython 3.14 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
ae1bc7be0b88e47f52ba82d3321b83f8c8bf3b8422ba6970a96c5d3d4e8b3efb
BLAKE2b-256 checksum
How to use checksums
d241837d35aeb5314a5c56de46b5fa72e65e28d6cfdc1f05051c538dd186c153
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 17, 2026.

Transparency log

Release files / nanobook-0.18.1-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL nanobook-0.18.1-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 1.5 MB
Tags CPython 3.14 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
7352ea1da59e83a4fca13353838e5104c9b663b50e269eb992310cf8f02286d6
BLAKE2b-256 checksum
How to use checksums
088809512a01fa58be49283cb136fcf19692385baf8f12254a842e8b770516f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 17, 2026.

Transparency log

Release files / nanobook-0.18.1-cp314-cp314-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl

Download URL nanobook-0.18.1-cp314-cp314-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Size 2.6 MB
Tags CPython 3.14 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
96bb5329a7ea0d98cb5fd4a1ccd0b092c756641c2c5f695882dd8010307caa37
BLAKE2b-256 checksum
How to use checksums
2a833e1737f3246e9bc8177d1f92287a9ff6734b151b4761e842ca8dced48779
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 17, 2026.

Transparency log

Release files / nanobook-0.18.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL nanobook-0.18.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.5 MB
Tags CPython 3.13 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
7708c1d498c72c6987bbd44bfda01cc6ba530aa6ff490a9adb2ff0244d240abf
BLAKE2b-256 checksum
How to use checksums
303222851764066418b4ab01c369a93267b3e75e546dece882793e275d7b0941
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 17, 2026.

Transparency log

Release files / nanobook-0.18.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL nanobook-0.18.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 1.5 MB
Tags CPython 3.13 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
5ce7c21baaa4935ee96e21a7af9dc2915c2d2f6fbaf5be48bfa938cb31b13470
BLAKE2b-256 checksum
How to use checksums
58cc607e027b47f6d107a6e83aac4995be509c499aef7ed119c679ece19c8f90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 17, 2026.

Transparency log

Release files / nanobook-0.18.1-cp313-cp313-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl

Download URL nanobook-0.18.1-cp313-cp313-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Size 2.6 MB
Tags CPython 3.13 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
b3a7e2b8eb6ccd5e58192346f74bbb1af9dc85dbfe6167661333a8e8b3bbeeae
BLAKE2b-256 checksum
How to use checksums
6076cf8cdcc80b21f5a920b4353e64c77136a63ec73c69e76b5a98de9467a42c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 17, 2026.

Transparency log

Release files / nanobook-0.18.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL nanobook-0.18.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.5 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
01fe4337b1189f06d906cf585306bdfa0f9e17e555990baab2c2018160a2d75f
BLAKE2b-256 checksum
How to use checksums
9cbee8cbbf2613d1e66c3b0de506f7402a76eac4783bb3e2bbb4dc2ddf79b404
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 17, 2026.

Transparency log

Release files / nanobook-0.18.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL nanobook-0.18.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 1.5 MB
Tags CPython 3.12 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
ffd8c8f327dd6118e6b152b7f60c5e8c37199de41e0369019de3c275530e7eb2
BLAKE2b-256 checksum
How to use checksums
cee3a25e1cbd6dcbfdb428cc0a34e202b90f9f2581129c0e19956637a89255fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 17, 2026.

Transparency log

Release files / nanobook-0.18.1-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl

Download URL nanobook-0.18.1-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Size 2.6 MB
Tags CPython 3.12 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
81c8d14b86cf666ad2488053a3544defb46f16a4b8dd777ddac9b1285e3badb2
BLAKE2b-256 checksum
How to use checksums
0eda35e7053c49ca88ba7e37d18ec24dbe4f306d3f93e5c1c948842ecb2ceef6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 17, 2026.

Transparency log

Release files / nanobook-0.18.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL nanobook-0.18.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.5 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
6a6f36d97a280a9b1d6aedebb4473605ce93b83a3eed40a40f0961044a68ad14
BLAKE2b-256 checksum
How to use checksums
c343f20aefd464b6f5aad9a7944d2246aee5559a86f892e02b37a5119a77833b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 17, 2026.

Transparency log

Release files / nanobook-0.18.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL nanobook-0.18.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 1.5 MB
Tags CPython 3.11 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
cfdb13a894ea0be7f6202467a3aa648d5bd39254fd35b312ed5f955b93f9fc96
BLAKE2b-256 checksum
How to use checksums
059486a4270cde049b1b9cc4d74461619cf3c6ca7b5dded7286bb8ed62d59d0b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 17, 2026.

Transparency log

Release files / nanobook-0.18.1-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl

Download URL nanobook-0.18.1-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Size 2.6 MB
Tags CPython 3.11 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
4d7e3feada24af720d8f9385fc696795e554755b498c61e59ac4039b7371d140
BLAKE2b-256 checksum
How to use checksums
a5cee482cbd6a2726ed3f14055fbfe2b1e47cf4d681aca64a9602aabf8131e24
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 17, 2026.

Transparency log
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