nabla-quant 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. nabla_quant-0.1.0/.github/workflows/wheels.yml +84 -0
  2. nabla_quant-0.1.0/.gitignore +56 -0
  3. nabla_quant-0.1.0/CMakeLists.txt +30 -0
  4. nabla_quant-0.1.0/LICENSE +21 -0
  5. nabla_quant-0.1.0/MANIFEST.in +21 -0
  6. nabla_quant-0.1.0/PKG-INFO +747 -0
  7. nabla_quant-0.1.0/README.md +709 -0
  8. nabla_quant-0.1.0/dashboard/.env.example +3 -0
  9. nabla_quant-0.1.0/dashboard/.gitignore +45 -0
  10. nabla_quant-0.1.0/dashboard/AGENTS.md +5 -0
  11. nabla_quant-0.1.0/dashboard/eslint.config.mjs +18 -0
  12. nabla_quant-0.1.0/dashboard/next.config.ts +7 -0
  13. nabla_quant-0.1.0/dashboard/package-lock.json +9013 -0
  14. nabla_quant-0.1.0/dashboard/package.json +29 -0
  15. nabla_quant-0.1.0/dashboard/postcss.config.mjs +7 -0
  16. nabla_quant-0.1.0/dashboard/public/file.svg +1 -0
  17. nabla_quant-0.1.0/dashboard/public/globe.svg +1 -0
  18. nabla_quant-0.1.0/dashboard/public/next.svg +1 -0
  19. nabla_quant-0.1.0/dashboard/public/vercel.svg +1 -0
  20. nabla_quant-0.1.0/dashboard/public/window.svg +1 -0
  21. nabla_quant-0.1.0/dashboard/src/app/favicon.ico +0 -0
  22. nabla_quant-0.1.0/dashboard/src/app/globals.css +64 -0
  23. nabla_quant-0.1.0/dashboard/src/app/layout.tsx +36 -0
  24. nabla_quant-0.1.0/dashboard/src/app/page.tsx +5 -0
  25. nabla_quant-0.1.0/dashboard/src/components/Dashboard.tsx +149 -0
  26. nabla_quant-0.1.0/dashboard/src/components/DashboardGate.tsx +23 -0
  27. nabla_quant-0.1.0/dashboard/src/components/GreeksHeatmap.tsx +212 -0
  28. nabla_quant-0.1.0/dashboard/src/components/Header.tsx +22 -0
  29. nabla_quant-0.1.0/dashboard/src/components/MarketDataPanel.tsx +234 -0
  30. nabla_quant-0.1.0/dashboard/src/components/ParameterPanel.tsx +152 -0
  31. nabla_quant-0.1.0/dashboard/src/components/PlotlyChart.tsx +7 -0
  32. nabla_quant-0.1.0/dashboard/src/components/PricingCard.tsx +98 -0
  33. nabla_quant-0.1.0/dashboard/src/components/StatusBar.tsx +35 -0
  34. nabla_quant-0.1.0/dashboard/src/components/SurfacePlot.tsx +124 -0
  35. nabla_quant-0.1.0/dashboard/src/components/VolSurfacePlot.tsx +152 -0
  36. nabla_quant-0.1.0/dashboard/src/lib/types.ts +79 -0
  37. nabla_quant-0.1.0/dashboard/src/lib/useNablaSocket.ts +158 -0
  38. nabla_quant-0.1.0/dashboard/tsconfig.json +34 -0
  39. nabla_quant-0.1.0/examples/CMakeLists.txt +11 -0
  40. nabla_quant-0.1.0/examples/phase1_demo.cpp +116 -0
  41. nabla_quant-0.1.0/examples/phase2_demo.cpp +243 -0
  42. nabla_quant-0.1.0/examples/phase3_demo.cpp +142 -0
  43. nabla_quant-0.1.0/examples/phase4_demo.cpp +228 -0
  44. nabla_quant-0.1.0/include/nabla/core/arena.hpp +98 -0
  45. nabla_quant-0.1.0/include/nabla/core/barrier.hpp +94 -0
  46. nabla_quant-0.1.0/include/nabla/core/boundary.hpp +63 -0
  47. nabla_quant-0.1.0/include/nabla/core/greeks.hpp +165 -0
  48. nabla_quant-0.1.0/include/nabla/core/local_vol.hpp +53 -0
  49. nabla_quant-0.1.0/include/nabla/core/mesh.hpp +78 -0
  50. nabla_quant-0.1.0/include/nabla/core/simd.hpp +106 -0
  51. nabla_quant-0.1.0/include/nabla/core/solver.hpp +112 -0
  52. nabla_quant-0.1.0/include/nabla/core/thomas.hpp +55 -0
  53. nabla_quant-0.1.0/include/nabla/core/types.hpp +38 -0
  54. nabla_quant-0.1.0/include/nabla/nabla.hpp +12 -0
  55. nabla_quant-0.1.0/pyproject.toml +71 -0
  56. nabla_quant-0.1.0/python/CMakeLists.txt +35 -0
  57. nabla_quant-0.1.0/python/bindings.cpp +366 -0
  58. nabla_quant-0.1.0/python/nabla_quant/__init__.py +303 -0
  59. nabla_quant-0.1.0/python/nabla_quant/api/__init__.py +3 -0
  60. nabla_quant-0.1.0/python/nabla_quant/api/app.py +524 -0
  61. nabla_quant-0.1.0/python/nabla_quant/api/market_data.py +307 -0
  62. nabla_quant-0.1.0/python/nabla_quant/api/models.py +192 -0
  63. nabla_quant-0.1.0/python/requirements.txt +8 -0
  64. nabla_quant-0.1.0/python/tests/conftest.py +4 -0
  65. nabla_quant-0.1.0/python/tests/stress_pipeline.py +420 -0
  66. nabla_quant-0.1.0/python/tests/test_api.py +506 -0
  67. nabla_quant-0.1.0/python/tests/test_market.py +25 -0
  68. nabla_quant-0.1.0/python/tests/test_real_world.py +449 -0
  69. nabla_quant-0.1.0/python/tests/test_sdk.py +678 -0
  70. nabla_quant-0.1.0/src/CMakeLists.txt +15 -0
  71. nabla_quant-0.1.0/src/core/arena.cpp +83 -0
  72. nabla_quant-0.1.0/src/core/barrier.cpp +384 -0
  73. nabla_quant-0.1.0/src/core/boundary.cpp +83 -0
  74. nabla_quant-0.1.0/src/core/greeks.cpp +469 -0
  75. nabla_quant-0.1.0/src/core/local_vol.cpp +65 -0
  76. nabla_quant-0.1.0/src/core/mesh.cpp +101 -0
  77. nabla_quant-0.1.0/src/core/simd.cpp +205 -0
  78. nabla_quant-0.1.0/src/core/solver.cpp +214 -0
  79. nabla_quant-0.1.0/src/core/thomas.cpp +50 -0
  80. nabla_quant-0.1.0/tests/CMakeLists.txt +51 -0
  81. nabla_quant-0.1.0/tests/test_american.cpp +256 -0
  82. nabla_quant-0.1.0/tests/test_arena.cpp +192 -0
  83. nabla_quant-0.1.0/tests/test_barrier.cpp +545 -0
  84. nabla_quant-0.1.0/tests/test_boundary.cpp +251 -0
  85. nabla_quant-0.1.0/tests/test_greeks.cpp +210 -0
  86. nabla_quant-0.1.0/tests/test_greeks_aad.cpp +217 -0
  87. nabla_quant-0.1.0/tests/test_greeks_validation.cpp +416 -0
  88. nabla_quant-0.1.0/tests/test_harness.hpp +76 -0
  89. nabla_quant-0.1.0/tests/test_integration.cpp +350 -0
  90. nabla_quant-0.1.0/tests/test_local_vol.cpp +195 -0
  91. nabla_quant-0.1.0/tests/test_mesh.cpp +195 -0
  92. nabla_quant-0.1.0/tests/test_simd.cpp +238 -0
  93. nabla_quant-0.1.0/tests/test_solver.cpp +278 -0
  94. nabla_quant-0.1.0/tests/test_thomas.cpp +255 -0
@@ -0,0 +1,84 @@
1
+ name: Build & Publish Wheels
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+ workflow_dispatch:
8
+
9
+ jobs:
10
+ build_wheels:
11
+ name: Build wheels on ${{ matrix.os }}
12
+ runs-on: ${{ matrix.os }}
13
+ strategy:
14
+ fail-fast: false
15
+ matrix:
16
+ os: [ubuntu-latest, windows-latest, macos-13, macos-14]
17
+
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+
21
+ - uses: actions/setup-python@v5
22
+ with:
23
+ python-version: "3.12"
24
+
25
+ - name: Install cibuildwheel
26
+ run: pip install cibuildwheel==2.21.*
27
+
28
+ - name: Build wheels
29
+ run: python -m cibuildwheel --output-dir wheelhouse
30
+ env:
31
+ CIBW_BUILD: "cp39-* cp310-* cp311-* cp312-*"
32
+ CIBW_SKIP: "*-musllinux_* pp*"
33
+ CIBW_BEFORE_BUILD: "pip install pybind11 numpy"
34
+ CIBW_TEST_REQUIRES: "pytest numpy"
35
+ CIBW_TEST_COMMAND: >
36
+ python -c "import nabla_quant as nq; r = nq.european(100,100,1,0.05,0.20); assert abs(r.price - 10.4506) < 0.01; print('Smoke test passed:', r.price)"
37
+ # macOS: build universal2 on macos-14 (arm64 runner)
38
+ CIBW_ARCHS_MACOS: "x86_64 arm64"
39
+ # Linux: manylinux2014 for broad compatibility
40
+ CIBW_MANYLINUX_X86_64_IMAGE: "manylinux2014"
41
+
42
+ - uses: actions/upload-artifact@v4
43
+ with:
44
+ name: wheels-${{ matrix.os }}
45
+ path: ./wheelhouse/*.whl
46
+
47
+ build_sdist:
48
+ name: Build source distribution
49
+ runs-on: ubuntu-latest
50
+ steps:
51
+ - uses: actions/checkout@v4
52
+
53
+ - uses: actions/setup-python@v5
54
+ with:
55
+ python-version: "3.12"
56
+
57
+ - name: Build sdist
58
+ run: |
59
+ pip install build
60
+ python -m build --sdist
61
+
62
+ - uses: actions/upload-artifact@v4
63
+ with:
64
+ name: sdist
65
+ path: dist/*.tar.gz
66
+
67
+ publish:
68
+ name: Publish to PyPI
69
+ needs: [build_wheels, build_sdist]
70
+ runs-on: ubuntu-latest
71
+ if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
72
+ environment: pypi
73
+ permissions:
74
+ id-token: write # for trusted publishing
75
+
76
+ steps:
77
+ - uses: actions/download-artifact@v4
78
+ with:
79
+ path: dist
80
+ merge-multiple: true
81
+
82
+ - uses: pypa/gh-action-pypi-publish@release/v1
83
+ with:
84
+ packages-dir: dist/
@@ -0,0 +1,56 @@
1
+ # Build artifacts
2
+ build/
3
+ out/
4
+ cmake-build-*/
5
+ *.o
6
+ *.obj
7
+ *.exe
8
+ *.dll
9
+ *.so
10
+ *.dylib
11
+ *.a
12
+ *.lib
13
+
14
+ # IDE / editor
15
+ .vs/
16
+ .vscode/
17
+ .idea/
18
+ *.swp
19
+ *.swo
20
+ *~
21
+ .cache/
22
+
23
+ # CMake
24
+ CMakeFiles/
25
+ CMakeCache.txt
26
+ cmake_install.cmake
27
+ Makefile
28
+ compile_commands.json
29
+
30
+ # OS
31
+ Thumbs.db
32
+ .DS_Store
33
+ desktop.ini
34
+
35
+ # Python / pybind11
36
+ __pycache__/
37
+ *.pyc
38
+ *.pyd
39
+ *.pyo
40
+ *.egg-info/
41
+ dist/
42
+ *.whl
43
+
44
+ # Packaging (scikit-build-core / pip)
45
+ _skbuild/
46
+ *.egg
47
+ *.tar.gz
48
+ pip-wheel-metadata/
49
+
50
+ dashboard/CLAUDE.md
51
+ dashboard/README.md
52
+
53
+ # Next.js / Node
54
+ dashboard/node_modules/
55
+ dashboard/.next/
56
+ dashboard/out/
@@ -0,0 +1,30 @@
1
+ cmake_minimum_required(VERSION 3.20)
2
+ project(NablaQuant
3
+ VERSION 0.1.0
4
+ LANGUAGES CXX
5
+ DESCRIPTION "High-Performance PDE Option Pricing Engine"
6
+ )
7
+
8
+ set(CMAKE_CXX_STANDARD 17)
9
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
10
+ set(CMAKE_CXX_EXTENSIONS OFF)
11
+
12
+ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
13
+ add_compile_options(-Wall -Wextra -Wpedantic -O2 -mavx2 -mfma)
14
+ elseif(MSVC)
15
+ add_compile_options(/W4 /O2 /arch:AVX2)
16
+ endif()
17
+
18
+ include_directories(${CMAKE_SOURCE_DIR}/include)
19
+
20
+ option(NABLA_BUILD_PYTHON "Build Python bindings via pybind11" ON)
21
+
22
+ add_subdirectory(src)
23
+
24
+ enable_testing()
25
+ add_subdirectory(tests)
26
+ add_subdirectory(examples)
27
+
28
+ if(NABLA_BUILD_PYTHON)
29
+ add_subdirectory(python)
30
+ endif()
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 JBAC
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,21 @@
1
+ # Sources needed for sdist (source distribution) builds.
2
+ # Wheels ship the pre-compiled _nabla_core extension, so end-users
3
+ # never need these, but anyone building from source (pip install
4
+ # from sdist / GitHub) needs the full C++ tree.
5
+
6
+ # Top-level CMake
7
+ include CMakeLists.txt
8
+
9
+ # C++ headers
10
+ recursive-include include *.hpp
11
+
12
+ # C++ sources
13
+ include src/CMakeLists.txt
14
+ recursive-include src *.cpp
15
+
16
+ # pybind11 bindings
17
+ include python/CMakeLists.txt
18
+ include python/bindings.cpp
19
+
20
+ # Python package
21
+ recursive-include python/nabla_quant *.py