pyquantlib 0.10.0__cp314-cp314-win_amd64.whl
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.
- pyquantlib/__init__.py +41 -0
- pyquantlib/__init__.pyi +1257 -0
- pyquantlib/_pyquantlib/__init__.pyi +28194 -0
- pyquantlib/_pyquantlib/base.pyi +2318 -0
- pyquantlib/_pyquantlib.cp314-win_amd64.pyd +0 -0
- pyquantlib/builders.py +406 -0
- pyquantlib/extensions/__init__.py +42 -0
- pyquantlib/extensions/modified_kirk_engine.py +186 -0
- pyquantlib/extensions/svi_smile_section.py +251 -0
- pyquantlib/py.typed +2 -0
- pyquantlib/version.py +1 -0
- pyquantlib/version.pyi +3 -0
- pyquantlib-0.10.0.dist-info/METADATA +211 -0
- pyquantlib-0.10.0.dist-info/RECORD +17 -0
- pyquantlib-0.10.0.dist-info/WHEEL +5 -0
- pyquantlib-0.10.0.dist-info/licenses/LICENSE +29 -0
- pyquantlib-0.10.0.dist-info/licenses/licenseheader.txt +11 -0
pyquantlib/__init__.py
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# pyquantlib/__init__.py
|
|
2
|
+
|
|
3
|
+
from .version import __version__ as __version__
|
|
4
|
+
|
|
5
|
+
try:
|
|
6
|
+
from . import _pyquantlib as _ql
|
|
7
|
+
from ._pyquantlib import * # noqa: F403
|
|
8
|
+
except ImportError as e:
|
|
9
|
+
raise ImportError(f"Failed to import PyQuantLib: {e}") from e
|
|
10
|
+
|
|
11
|
+
# base = _ql.base
|
|
12
|
+
# sys.modules['pyquantlib.base'] = _ql.base
|
|
13
|
+
|
|
14
|
+
QL_VERSION = _ql.QL_VERSION # QuantLib C++ version
|
|
15
|
+
QL_VERSION_HEX = _ql.QL_VERSION_HEX # QuantLib hex version for comparison
|
|
16
|
+
BOOST_VERSION = _ql.BOOST_VERSION # Boost version (compile-time integer)
|
|
17
|
+
|
|
18
|
+
# Export Settings as the singleton instance to allow direct property access:
|
|
19
|
+
# ql.Settings.evaluationDate = date # Works correctly
|
|
20
|
+
Settings = _ql.Settings.instance()
|
|
21
|
+
|
|
22
|
+
del _ql
|
|
23
|
+
|
|
24
|
+
# Builder wrapper functions (shadow C++ classes with Pythonic kwargs API)
|
|
25
|
+
from .builders import MakeCapFloor as MakeCapFloor # noqa: E402, F811
|
|
26
|
+
from .builders import MakeFdHestonVanillaEngine as MakeFdHestonVanillaEngine # noqa: E402, F811
|
|
27
|
+
from .builders import MakeOIS as MakeOIS # noqa: E402, F811
|
|
28
|
+
from .builders import MakeSchedule as MakeSchedule # noqa: E402, F811
|
|
29
|
+
from .builders import MakeSwaption as MakeSwaption # noqa: E402, F811
|
|
30
|
+
from .builders import MakeVanillaSwap as MakeVanillaSwap # noqa: E402, F811
|
|
31
|
+
from .builders import MakeYoYInflationCapFloor as MakeYoYInflationCapFloor # noqa: E402, F811
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
# Helpers for readable Boost version
|
|
35
|
+
def boost_version_tuple() -> tuple[int, int, int]:
|
|
36
|
+
v = BOOST_VERSION
|
|
37
|
+
return v // 100000, (v // 100) % 1000, v % 100
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def boost_version_str() -> str:
|
|
41
|
+
return ".".join(map(str, boost_version_tuple()))
|