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.1.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.1-cp314-cp314-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.14Windows x86-64

nanobook-0.17.1-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.1-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.1-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.1-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.1-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.1-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.1-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.1-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.1-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.1-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.1-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.1-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.1.tar.gz.

File metadata

  • Download URL: nanobook-0.17.1.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.1.tar.gz
Algorithm Hash digest
SHA256 9f1603599985ceefa5561b023d829284a77c15d77b168cd053d9f718f8e0b824
MD5 5e47ef20f76061fada04724f01ba6494
BLAKE2b-256 6ad01e69ce9220b69aa29e2825bca29dbf5e3cbe032bdd3c1d9b6c58ebf028c4

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.17.1.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.1-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: nanobook-0.17.1-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.1-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 4296dc3c44b1b1fd6ceb19998f046eddcccab41f63bff77b5a7ec60d7e3acc37
MD5 5bda501e1a505e8f1437fceceafd4f78
BLAKE2b-256 5771a2d2995a4857c8549565b6a8289c2dfc87067d491a95617f079530a2bf18

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.17.1-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.1-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for nanobook-0.17.1-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 baf8b9a338dddb53b02de669583927bedbd11145d6dfa4672cc0de6639cc1f24
MD5 73e31e5b02fd83c388532b2d0523834f
BLAKE2b-256 1bf72476478887405e90f2b42c591c37e56e7f9c4ff76a283799bb5cbe441eb5

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.17.1-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.1-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for nanobook-0.17.1-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 ac40500f3697a3eb19e0a20a2050ed757fbdc41f15a110c87fe122b40bcc9400
MD5 99e967ce4d9d6c3a96055c3fe14e3a97
BLAKE2b-256 180031d2928ea5918822d0aa79f2b221457a5e568bf2cf751f40ca27d3d40733

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.17.1-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.1-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.1-cp314-cp314-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 58d9dc6e63c01714ca5dde39de37dc2f0981c057d1d7853be86359426595a398
MD5 a73ff1d2ed05d979398eaabce56b682e
BLAKE2b-256 cc5601e1cad51d53a055fb12fbe4f8a375409beaf46193dd9a3fc59e8f70e18e

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.17.1-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.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for nanobook-0.17.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d7ef275ad68a35f4989092b52b9e6f5295e8968a2b926948de07ea1e87a332c9
MD5 70476035a9db5971289118e51fa39973
BLAKE2b-256 feec9067a09042b3c891059cb00b7e4634d25d4ad7c661a09b9681202929c3e8

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.17.1-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.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for nanobook-0.17.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 41a3be7baefe2f75438cf94c973f91fc539ee82af0e493302ba85739de231fb0
MD5 5db78e19cc0c2df78e66bb050638cac9
BLAKE2b-256 5c8ad96fe777b31077e76438ab1601457f9fb9fa912d119475157b7dc333e774

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.17.1-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.1-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.1-cp313-cp313-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 74b9b96d3663efbf8f7a63ab4e7a779d9653a417527fa945d095c03ed0a98c40
MD5 6f08d0db00e3f823b5f011fc6841ed9a
BLAKE2b-256 410f515f7986cc52c602e716ed00e02f13dfc7079737eb4925f21f496fbbf0ce

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.17.1-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.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for nanobook-0.17.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0df0c4f59d89db7206bc8f2d9c3269015f92624de32f976adf5a41fd85bcceb2
MD5 da2d53b7bc19c1f17b556690f2f391eb
BLAKE2b-256 8820f4037919f7deb9a6a3a731115e365395bcbd33cffb7e11a6d67b31261e56

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.17.1-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.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for nanobook-0.17.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 231755987c61b405fba0d72c6e0fbf302cd4f63792262bee321960209cd9c693
MD5 938189a3ac6e694629586b77d715d9cf
BLAKE2b-256 ecceaf0cddc870b77e78f285a4ee16d41e93aea0188124906223ff0ba65937ed

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.17.1-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.1-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.1-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 d9fdcf5186cb785a2d8902c5bb62a833f641a0a4331b37f34461ee33a0d5dcce
MD5 d8bce8a43ccf691d81d5fa5e31dc8ad4
BLAKE2b-256 afc77491b68b6ef04b37b837b9c17bbe94df6344b11249e67fee0b63d02340f9

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.17.1-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.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for nanobook-0.17.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c1991d516d148bc7d37acf9aa8590e26f5445ddfbb5d461cb576fa5eeebc77b5
MD5 5f23f01373b490150efd0e9ba65d66b7
BLAKE2b-256 5a11b54b68226083b355dd005b211eaaa8b70abe3e26cae9769a2e52f81acf76

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.17.1-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.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for nanobook-0.17.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 bf9aa13eedf341a32146777e02a265e51b430a0f36703a92be9288088067b2a5
MD5 de8e36f2d19cea0fd4843243c835e169
BLAKE2b-256 7a1940a3e7871a812abbf276c34d21127b2a1bd6d0cb9f0f1172b1c0cec7f059

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.17.1-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.1-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.1-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 3f54c3b4509e4bcfd829214701fcd2131c32a493dcfcf1264e3dc5f73669ac8d
MD5 11ff3d25718f564746d6d8356f1cbac7
BLAKE2b-256 82775d77090207f1cc228d97c1f37f6866a075dcc47c0f734e9987f00210d40d

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanobook-0.17.1-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

0.17.2

14 files

This release

0.17.1 This release

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