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

Disclaimer

This software is provided "as is", without warranty of any kind. To the extent permitted by law, the authors and contributors are not liable for any damage, loss or claim arising from its use or misuse. You are responsible for how you use it and for following the laws and rules that apply to you. The full terms are in LICENSE.

nanobook is not financial advice and is not a broker. Trading can lose money, including more than you put in, and backtests do not predict future results. The broker adapters and the rebalancer send real orders: test them with a paper account first and use them at your own risk. nanobook is not affiliated with or endorsed by Interactive Brokers or Binance; their names are trademarks of their owners.

Metadata

Release files for nanobook 0.19.3

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.19.3
File Size Uploaded Provenance Actions
nanobook-0.19.3.tar.gz 6.6 MB With provenance Details for nanobook-0.19.3.tar.gz

Built distributions (wheels)

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

Total release size: 30.5 MB

Release files / nanobook-0.19.3.tar.gz

Download URL nanobook-0.19.3.tar.gz
Size 6.6 MB
Tags Source
SHA-256 checksum
How to use checksums
35124dc3f7fb556c6091c37da7b95425edec200c4759dc626b62f51eef180b54
BLAKE2b-256 checksum
How to use checksums
26f989f17983f671552de7af1536b3d293e89694023874472c0e152420d5c244
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 Oct 30, 2026.

Transparency log

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

Download URL nanobook-0.19.3-cp314-cp314-win_amd64.whl
Size 1.2 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
34ad82123860a8d54f9fcaecf2aaa4e52755e4f654d5b62c9699849f7822f140
BLAKE2b-256 checksum
How to use checksums
47c66d75b5b73ad1f20d05ddc0afc242fb9da6ebc4b048fc2b8045341d098a8a
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 Oct 30, 2026.

Transparency log

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

Download URL nanobook-0.19.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 1.5 MB
Tags CPython 3.14 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
7ae0a430000f6a9e6d196ee61df71a7644beeb3f1187e70b86d686ace2ff3aee
BLAKE2b-256 checksum
How to use checksums
296e18f75484691b2b719fcfa8e08fab07da433fb080f458fe7941ea474cff5b
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 Oct 30, 2026.

Transparency log

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

Download URL nanobook-0.19.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 1.5 MB
Tags CPython 3.14 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
18f4aed812faabb4aacaca598efe956d8fb91830927451da29f5d5929d9924c5
BLAKE2b-256 checksum
How to use checksums
de741c9d081cc292f6cc8c4770ca6175715b645f91fc945fc65092b6b782175a
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 Oct 30, 2026.

Transparency log

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

Download URL nanobook-0.19.3-cp314-cp314-macosx_10_12_universal2.macosx_10_12_x86_64.macosx_11_0_arm64.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
fe61a4d8a1e0130db4965c8424834606f1ef66cfc60ba99b0e56713c10a65e1c
BLAKE2b-256 checksum
How to use checksums
53d37b21064cf66b482c7eb1448d3cae343cd48afb785cfcaa4a36b094948f01
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 Oct 30, 2026.

Transparency log

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

Download URL nanobook-0.19.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 1.5 MB
Tags CPython 3.13 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
588c9e601bd5b7844443336de299ebc134550dff46c4cb07642d7d5102b52d74
BLAKE2b-256 checksum
How to use checksums
464af6b3a2e09324280699a64da20fd9a5da9e413b0034bdc5aefebb6cd19349
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 Oct 30, 2026.

Transparency log

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

Download URL nanobook-0.19.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 1.5 MB
Tags CPython 3.13 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
15a3749f2ba8096ec4ca36da6809026e35714a146970d2c6048dd930f2443524
BLAKE2b-256 checksum
How to use checksums
f4a4b24babb52f71c25598595cf8c3d4d407fd05f57a1d8f1712ed72400fdfa2
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 Oct 30, 2026.

Transparency log

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

Download URL nanobook-0.19.3-cp313-cp313-macosx_10_12_universal2.macosx_10_12_x86_64.macosx_11_0_arm64.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
7ce0d74ee728a053913eb49596f9c27b7858201f6d5bc12efa50acc9c43fd77e
BLAKE2b-256 checksum
How to use checksums
f4d48c05d5b3ebbf9ce1fa031aafb1d84e7ea958afcd3e3844819a7a534bfd1c
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 Oct 30, 2026.

Transparency log

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

Download URL nanobook-0.19.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 1.5 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
0a75d55a5e387aaf37139aba6360f680f894c073e1a1e645e6f1e4d695c68337
BLAKE2b-256 checksum
How to use checksums
d11ad48f4209e50189b4c1698b5668cfa323dde23ff0f73e25d7d0b0bffca25a
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 Oct 30, 2026.

Transparency log

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

Download URL nanobook-0.19.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 1.5 MB
Tags CPython 3.12 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
2ad74e56919c233161ff27958f8a950d6376e003bb71ad54ccf98c14339dcd18
BLAKE2b-256 checksum
How to use checksums
4c9d4d7857e02fcab4ff87a2ca1eefd1f4f144fa54e355b71a474814cd4bc1ef
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 Oct 30, 2026.

Transparency log

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

Download URL nanobook-0.19.3-cp312-cp312-macosx_10_12_universal2.macosx_10_12_x86_64.macosx_11_0_arm64.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
4ef7a837c7205100802e823e4a4acddd197526b624cc1b4b8fe6b401159de4cc
BLAKE2b-256 checksum
How to use checksums
d8ca0dcd2651ff37e5e3bdf2c03bcd63f6a1bda49419a0b0e6fdcec095ece1a7
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 Oct 30, 2026.

Transparency log

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

Download URL nanobook-0.19.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 1.5 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
964f742860a4011a7ab51d297427c3dc56fefa3fe175eca0ee03677d581d713a
BLAKE2b-256 checksum
How to use checksums
bf9a3d250a6697bc18b7f390b253e13307e88f539199eb2fb17678d1ffc099a7
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 Oct 30, 2026.

Transparency log

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

Download URL nanobook-0.19.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 1.6 MB
Tags CPython 3.11 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
7f585710be246d93be3c34f4cff0a906ead264d43135eba1a1b88a2a95e53125
BLAKE2b-256 checksum
How to use checksums
b41b042e780fda75fffb0b1f2f56fa020657ce5a00944722d0e2261de0213b73
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 Oct 30, 2026.

Transparency log

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

Download URL nanobook-0.19.3-cp311-cp311-macosx_10_12_universal2.macosx_10_12_x86_64.macosx_11_0_arm64.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
4f47d5a243fac5adac6870bf4f7875feeb3c25e6f5a176ec7e9150b879610efb
BLAKE2b-256 checksum
How to use checksums
2330673ca793bfde3a3b1dc3f9a1e28e471314f8e48e520409a3967d0810833d
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 Oct 30, 2026.

Transparency log

Security for nanobook 0.19.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 14 files in this release have been uploaded with provenance metadata.

Select from 14 files

Attestation for nanobook-0.19.3.tar.gz

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 Oct 30, 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