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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nanobook-0.17.2.tar.gz (6.5 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

nanobook-0.17.2-cp314-cp314-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.14Windows x86-64

nanobook-0.17.2-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ x86-64

nanobook-0.17.2-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.5 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ ARM64

nanobook-0.17.2-cp314-cp314-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (2.5 MB view details)

Uploaded CPython 3.14macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

nanobook-0.17.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

nanobook-0.17.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.5 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ ARM64

nanobook-0.17.2-cp313-cp313-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (2.5 MB view details)

Uploaded CPython 3.13macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

nanobook-0.17.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

nanobook-0.17.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64

nanobook-0.17.2-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (2.5 MB view details)

Uploaded CPython 3.12macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

nanobook-0.17.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

nanobook-0.17.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64

nanobook-0.17.2-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (2.5 MB view details)

Uploaded CPython 3.11macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

File details

Details for the file nanobook-0.17.2.tar.gz.

File metadata

  • Download URL: nanobook-0.17.2.tar.gz
  • Upload date:
  • Size: 6.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for nanobook-0.17.2.tar.gz
Algorithm Hash digest
SHA256 9811a7b94698fe77508eb4a486dc67ef1b8a2c634f39e639b139e0a12c774403
MD5 175fe13e89c948dce508301d65b62344
BLAKE2b-256 2e06ea1d93020ee33573b248ca440d52db9a03e35a19699cc6c62d19736579d5

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.17.2.tar.gz:

Publisher: wheels.yml on BoringQuantSystems/nanobook

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nanobook-0.17.2-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: nanobook-0.17.2-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for nanobook-0.17.2-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 db29a93c8698dc8c088c96249aa76120a74f98d78ca90f5133500b7c0534c8fa
MD5 3bfc4ff58bf3722981bec47da8448790
BLAKE2b-256 6ea294a6dd991f76635d3274c0ff165ebd058137553fb8f3f7d7236d4f9cc488

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.17.2-cp314-cp314-win_amd64.whl:

Publisher: wheels.yml on BoringQuantSystems/nanobook

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nanobook-0.17.2-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for nanobook-0.17.2-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8eb1ba61db492eefb5f215411e728a7f5e3491c2f7ee1b2bac3f1473742ba926
MD5 ec0d18ee8a80aa3e0aece31653d177d8
BLAKE2b-256 11bb95635dd7750cbe108cf1701bba7ecc74a773b421e5de64baa5031d20b63d

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.17.2-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: wheels.yml on BoringQuantSystems/nanobook

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nanobook-0.17.2-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for nanobook-0.17.2-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 fd05e2bf137d6d8bcc2f6f1c73887a673fd464200841d83fb886510f85fbefe9
MD5 4a90df87c552d905f6dfc4f11e83abae
BLAKE2b-256 79a088288b424f0101187c7ce59641c4bdac6bf9b16e064dc5e4ca7b5dec3316

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.17.2-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: wheels.yml on BoringQuantSystems/nanobook

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nanobook-0.17.2-cp314-cp314-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for nanobook-0.17.2-cp314-cp314-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 0606ab44c39d14605deb7d1e9f174545c7f44c18d288f0da2c320c2d158cad33
MD5 07785c75bb59b1d5da42cfe2b6926fed
BLAKE2b-256 fb272a35bef30beaaef2cdedc6fc26d9526d26bcd64293511ec098cd079fee9a

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.17.2-cp314-cp314-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl:

Publisher: wheels.yml on BoringQuantSystems/nanobook

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nanobook-0.17.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for nanobook-0.17.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b5258faa4e17380e0d704cda5e083f18f83e6e4d2d2fcd686ad3e7bffc0d1032
MD5 2b8fcc9a25c8a8599b4b2b128bb1993d
BLAKE2b-256 3b2aacfe56fe7f9eeda8f900eccf4b8b6751611156ae40c271d65a89a54f3bde

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.17.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: wheels.yml on BoringQuantSystems/nanobook

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nanobook-0.17.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for nanobook-0.17.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 6b128e5088943dd47aea74dc7e26f8399323a712e924fc9db819aa1bf3be8d8f
MD5 2038134f41679ce5677a8c49627861cc
BLAKE2b-256 841a97dccf5da63e7842f3377b800ffcae2e6fdd60d362c072adc10bf2d60ac6

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.17.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: wheels.yml on BoringQuantSystems/nanobook

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nanobook-0.17.2-cp313-cp313-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for nanobook-0.17.2-cp313-cp313-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 071036d3f1b3ade8e01ab19f4968340228a5f7eaae8a4daf327ff7a58a210ca4
MD5 fdaa3a01056dd4dcb900676e5dbf87dc
BLAKE2b-256 fbeecab48d43eca8b552891cc580c198e3f7035855197cce34a5cfdaa77068d6

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.17.2-cp313-cp313-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl:

Publisher: wheels.yml on BoringQuantSystems/nanobook

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nanobook-0.17.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for nanobook-0.17.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d6f85a22502e66827a4e2b176ffdf37f801ceec954f7a41a7116e050ebf04372
MD5 8f2a854838d9849fc4d298e53c76da41
BLAKE2b-256 d9725b77a9958b881b2bbbe9294762f872c819d668b301fdf65c7257a49fc9ee

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.17.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: wheels.yml on BoringQuantSystems/nanobook

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nanobook-0.17.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for nanobook-0.17.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 b51c29f0e13977c7c7fc73202a3230e2f1523ddb5191929e250299eb482146aa
MD5 bd3ef39b2719557895015263aa09283d
BLAKE2b-256 a15d0f733d4c3939aff17156edbcccab09a80f8f43bebb4f01972c85bf099753

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.17.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: wheels.yml on BoringQuantSystems/nanobook

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nanobook-0.17.2-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for nanobook-0.17.2-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 e2d48f3cfbe02c91023ad0e882e608e0f6b2e5532053f2a2a6c2b258b7988a20
MD5 d1e7a508ff594aa0381a2665f04c8a8e
BLAKE2b-256 1fd44ef5843bd4cc23a3ff050c2a7fba4fea64015656385a757f705651c09dac

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.17.2-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl:

Publisher: wheels.yml on BoringQuantSystems/nanobook

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nanobook-0.17.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for nanobook-0.17.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6234325c9db9d5367cc990b287f1a1be7e0b7fa5381045f8bb00321b4144906c
MD5 89bcdd7467fea8a6efd04d51e2d89c3d
BLAKE2b-256 671f1954099fe416b72b9d4df28189429f9c6dbc57e3fb6f2586912bd9ead539

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.17.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: wheels.yml on BoringQuantSystems/nanobook

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nanobook-0.17.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for nanobook-0.17.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 8e580eb81d2ffa6cde47097a68b5b08d7c73fba98b969bd367bd351e45dab60b
MD5 d953bef89891be172f41191310b6a8cc
BLAKE2b-256 7376326f0e2e26a7989c396f00f1a9841dc653be9394cd387de34f39a60539bf

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.17.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: wheels.yml on BoringQuantSystems/nanobook

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nanobook-0.17.2-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for nanobook-0.17.2-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 e0f21c49be9cb673df93a57aecd6b212ac708d01901be4cfe967719fad201323
MD5 feced1838977fee0c3a1635fb3500cdb
BLAKE2b-256 dd9fc333160166a65d85f2938f3f1c2d536b993e6f6856aa93ae0ca1050e6b75

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.17.2-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl:

Publisher: wheels.yml on BoringQuantSystems/nanobook

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.18.0

14 files

This release

0.17.2 This release

14 files

0.17.1

14 files

0.17.0

14 files

0.16.2

14 files

0.16.1

14 files

0.16.0

14 files

0.15.1

14 files

0.13.0

14 files

0.12.0

15 files

0.11.0

14 files

0.10.0

14 files

0.9.3

14 files

0.9.2

11 files

0.9.1

11 files

0.9.0

2 files

0.8.0

2 files

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