QuantLib-Risks 1.33.1__cp39-cp39-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.
@@ -0,0 +1,4 @@
1
+ [diffend] Oversized file quarantined before diffing.
2
+ name: QuantLib_Risks/_QuantLib_Risks.cp39-win_amd64.pyd
3
+ size: 44313088 bytes
4
+ sha256: 4ab8f13e41b6073bd0380c402a4d00319a2aa08ce295d57a32118e9c94801498
@@ -0,0 +1,63 @@
1
+ # -*- coding: iso-8859-1 -*-
2
+ """
3
+ Copyright (C) 2000, 2001, 2002, 2003 RiskMap srl
4
+ Copyright (C) 2024 Xcelerit Computing Limited.
5
+
6
+ This file is part of QuantLib-Risks, a Python wrapper for QuantLib enabled
7
+ for risk computation using automatic differentiation. It uses XAD,
8
+ a fast and comprehensive C++ library for automatic differentiation.
9
+
10
+ QuantLib-Risks and XAD are free software: you can redistribute it and/or modify
11
+ it under the terms of the GNU Affero General Public License as published
12
+ by the Free Software Foundation, either version 3 of the License, or
13
+ (at your option) any later version.
14
+
15
+ QuantLib-Risks is distributed in the hope that it will be useful,
16
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
17
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
+ GNU Affero General Public License for more details.
19
+
20
+ You should have received a copy of the GNU Affero General Public License
21
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
22
+
23
+ QuantLib is free software: you can redistribute it and/or modify it
24
+ under the terms of the QuantLib license. You should have received a
25
+ copy of the license along with this program; if not, please email
26
+ <quantlib-dev@lists.sf.net>. The license is also available online at
27
+ <http://quantlib.org/license.shtml>.
28
+
29
+ This program is distributed in the hope that it will be useful, but WITHOUT
30
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
31
+ FOR A PARTICULAR PURPOSE. See the license for more details.
32
+ """
33
+
34
+ from .QuantLib_Risks import *
35
+
36
+ if XAD_ENABLED:
37
+ from xad_autodiff.adj_1st import Real
38
+ from typing import Union, Tuple, List
39
+
40
+ # as part of the input at the top, we'll have _QuantLib_Risks in scope
41
+ DoubleVector = _QuantLib_Risks.DoubleVector
42
+ DoublePairVector = _QuantLib_Risks.DoublePairVector
43
+ DoubleVectorVector = _QuantLib_Risks.DoubleVectorVector
44
+
45
+ def Concentrating1dMesherPoint(x1: Union[Real, float, int], x2: Union[Real, float, int], v: bool) -> Tuple[Real, Real, bool]:
46
+ return (Real(x1), Real(x2), bool(v))
47
+
48
+ def PairDoubleVector(x1: List[Union[Real, float, int]] = [], x2: List[Union[Real, float, int]] = []) -> Tuple[List[Real], List[Real]]:
49
+ return ([Real(x) for x in x1], [Real(x) for x in x2])
50
+
51
+ if hasattr(_QuantLib_Risks,'__version__'):
52
+ __version__ = _QuantLib_Risks.__version__
53
+ elif hasattr(_QuantLib_Risks.cvar,'__version__'):
54
+ __version__ = _QuantLib_Risks.cvar.__version__
55
+ else:
56
+ print('Could not find __version__ attribute')
57
+
58
+ if hasattr(_QuantLib_Risks,'__hexversion__'):
59
+ __hexversion__ = _QuantLib_Risks.__hexversion__
60
+ elif hasattr(_QuantLib_Risks.cvar,'__hexversion__'):
61
+ __hexversion__ = _QuantLib_Risks.cvar.__hexversion__
62
+ else:
63
+ print('Could not find __hexversion__ attribute')
@@ -0,0 +1,75 @@
1
+ Metadata-Version: 2.1
2
+ Name: QuantLib-Risks
3
+ Version: 1.33.1
4
+ Summary: Fast risks calculations in QuantLib
5
+ Home-page: https://auto-differentiation.github.io
6
+ License: AGPL-3.0-or-later
7
+ Keywords: automatic-differentiation,derivatives,risk-management,quant-finance,greeks,risks
8
+ Author: Auto Differentiation Dev Team
9
+ Author-email: dev@auto-differentiation.com
10
+ Requires-Python: >=3.8.1,<4.0
11
+ Classifier: Development Status :: 5 - Production/Stable
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Intended Audience :: Education
14
+ Classifier: Intended Audience :: End Users/Desktop
15
+ Classifier: Intended Audience :: Financial and Insurance Industry
16
+ Classifier: Intended Audience :: Science/Research
17
+ Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
18
+ Classifier: License :: Other/Proprietary License
19
+ Classifier: Natural Language :: English
20
+ Classifier: Operating System :: MacOS :: MacOS X
21
+ Classifier: Operating System :: Microsoft :: Windows
22
+ Classifier: Operating System :: POSIX :: Linux
23
+ Classifier: Programming Language :: Python :: 3
24
+ Classifier: Programming Language :: Python :: 3.9
25
+ Classifier: Programming Language :: Python :: 3.10
26
+ Classifier: Programming Language :: Python :: 3.11
27
+ Classifier: Programming Language :: Python :: 3.12
28
+ Classifier: Programming Language :: Python :: 3.8
29
+ Classifier: Programming Language :: Python :: Implementation :: CPython
30
+ Classifier: Topic :: Scientific/Engineering
31
+ Classifier: Topic :: Software Development
32
+ Requires-Dist: xad-autodiff
33
+ Project-URL: Documentation, https://auto-differentiation.github.io/quantlib
34
+ Project-URL: Repository, https://github.com/auto-differentiation/XAD
35
+ Project-URL: download, https://pypi.org/project/QuantLib-Risks/#files
36
+ Project-URL: tracker, https://github.com/auto-differentiation/XAD/issues
37
+ Description-Content-Type: text/markdown
38
+
39
+ This package enables fast risks calculations on the QuantLib Python package.
40
+ It provides the same interface as the [standard QuantLib package](https://pypi.org/project/QuantLib/), and in addition allows to calculate risks (sensitivities) using automatic differentiation via the [XAD automatic differentiation tool](https://auto-differentation.github.io).
41
+
42
+ Useful links:
43
+
44
+ - [QuantLib Documentation](https://www.quantlib.org)
45
+ - [XAD Documentation, incl Python bindings and QuantLib integration](https://auto-differentiation.github.io)
46
+
47
+ ## Installation
48
+
49
+ ```
50
+ pip install QuantLib-Risks
51
+ ```
52
+
53
+ ## Usage Illustration
54
+
55
+ ```python
56
+ import QuantLib_Risks as ql
57
+ from xad_autodiff.adj_1st import Tape
58
+
59
+ with Tape() as t:
60
+ rate = ql.Real(0.2)
61
+ tape.registerInput(rate)
62
+
63
+ # quantlib pricing code
64
+ ...
65
+ npv = option.NPV()
66
+
67
+
68
+ tape.registerOutput(npv)
69
+ npv.derivative = 1.0
70
+ tape.computeAdjoints()
71
+
72
+ print(f"price = {npv}")
73
+ print(f"delta = {rate.derivative}")
74
+ ```
75
+
@@ -0,0 +1,8 @@
1
+ QuantLib_Risks/__init__.py,sha256=ljmO033713TKfPBJXDKIgslDRETjbC_AmZqv0nxdsQk,2868
2
+ QuantLib_Risks/_QuantLib_Risks.cp39-win_amd64.pyd,sha256=SrjxPkG2BzvQOAxAKk0AMZoqoIzildV6MhGOnJSAFJg,44313088
3
+ QuantLib_Risks/QuantLib_Risks.exp,sha256=nIfvvAw5g6GmT2bsWM3F6Kzmk-_ovW8FS_T-O6WkyUY,777
4
+ QuantLib_Risks/QuantLib_Risks.lib,sha256=dzPfe1EAIwsXrS0a__j-RmJSIUiVDevAUhKSiqa1JrU,2144
5
+ QuantLib_Risks/QuantLib_Risks.py,sha256=6QsoLn2jS2mykYxgn0ZA4lkO6TPDvxhdN2Qs64ndAwc,1918705
6
+ quantlib_risks-1.33.1.dist-info/METADATA,sha256=uAx6IeXoCPa3lTYkvTA9ikj-jcuKlPrt5uZnwPLpSWk,2830
7
+ quantlib_risks-1.33.1.dist-info/WHEEL,sha256=1IyMrlk0wO7UertYm7pyjf3m1sV0KDb8wW6mQlBtUog,96
8
+ quantlib_risks-1.33.1.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: poetry-core 1.9.0
3
+ Root-Is-Purelib: false
4
+ Tag: cp39-cp39-win_amd64