stochvolmodels 1.0.23__tar.gz → 1.0.24__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.
- {stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/PKG-INFO +2 -3
- {stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/pyproject.toml +1 -1
- {stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/pricers/gmm_pricer.py +2 -2
- {stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/pricers/model_pricer.py +3 -4
- {stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/pricers/tdist_pricer.py +2 -2
- {stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/utils/plots.py +8 -1
- {stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/LICENSE.txt +0 -0
- {stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/README.md +0 -0
- {stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/__init__.py +0 -0
- {stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/data/__init__.py +0 -0
- {stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/data/fetch_option_chain.py +0 -0
- {stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/data/option_chain.py +0 -0
- {stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/data/test_option_chain.py +0 -0
- {stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/examples/quick_run_lognormal_sv_pricer.py +0 -0
- {stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/examples/run_gmm_fit.py +0 -0
- {stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/examples/run_heston.py +0 -0
- {stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/examples/run_heston_sv_pricer.py +0 -0
- {stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/examples/run_lognormal_sv_pricer.py +0 -0
- {stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/examples/run_pricing_options_on_qvar.py +0 -0
- {stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/pricers/__init__.py +0 -0
- {stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/pricers/analytic/__init__.py +0 -0
- {stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/pricers/analytic/bachelier.py +0 -0
- {stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/pricers/analytic/bsm.py +0 -0
- {stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/pricers/analytic/tdist.py +0 -0
- {stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/pricers/factor_hjm/double_exp_pricer.py +0 -0
- {stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/pricers/factor_hjm/factor_hjm_pricer.py +0 -0
- {stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/pricers/factor_hjm/rate_affine_expansion.py +0 -0
- {stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/pricers/factor_hjm/rate_core.py +0 -0
- {stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/pricers/factor_hjm/rate_evaluate.py +0 -0
- {stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/pricers/factor_hjm/rate_factor_basis.py +0 -0
- {stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/pricers/factor_hjm/rate_logsv_ivols.py +0 -0
- {stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/pricers/factor_hjm/rate_logsv_params.py +0 -0
- {stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/pricers/factor_hjm/rate_logsv_pricer.py +0 -0
- {stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/pricers/hawkes_jd_pricer.py +0 -0
- {stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/pricers/heston_pricer.py +0 -0
- {stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/pricers/logsv/__init__.py +0 -0
- {stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/pricers/logsv/affine_expansion.py +0 -0
- {stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/pricers/logsv/logsv_params.py +0 -0
- {stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/pricers/logsv/vol_moments_ode.py +0 -0
- {stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/pricers/logsv_pricer.py +0 -0
- {stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/tests/__init__.py +0 -0
- {stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/tests/bsm_mgf_pricer.py +0 -0
- {stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/tests/qv_pricer.py +0 -0
- {stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/utils/__init__.py +0 -0
- {stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/utils/config.py +0 -0
- {stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/utils/funcs.py +0 -0
- {stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/utils/mc_payoffs.py +0 -0
- {stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/utils/mgf_pricer.py +0 -0
- {stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/utils/var_swap_pricer.py +0 -0
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
2
|
Name: stochvolmodels
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.24
|
|
4
4
|
Summary: Implementation of stochastic volatility models for option pricing
|
|
5
|
-
Home-page: https://github.com/ArturSepp/StochVolModels
|
|
6
5
|
License: LICENSE.txt
|
|
7
6
|
Keywords: volatility,options,Black-Scholes,Heston,Monte-Carlo
|
|
8
7
|
Author: Artur Sepp
|
|
@@ -320,7 +320,7 @@ class UnitTests(Enum):
|
|
|
320
320
|
def run_unit_test(unit_test: UnitTests):
|
|
321
321
|
|
|
322
322
|
import seaborn as sns
|
|
323
|
-
import
|
|
323
|
+
from stochvolmodels.utils import plots as plot
|
|
324
324
|
from stochvolmodels.data.test_option_chain import get_btc_test_chain_data
|
|
325
325
|
|
|
326
326
|
if unit_test == UnitTests.CALIBRATOR:
|
|
@@ -330,7 +330,7 @@ def run_unit_test(unit_test: UnitTests):
|
|
|
330
330
|
|
|
331
331
|
with sns.axes_style('darkgrid'):
|
|
332
332
|
fig, axs = plt.subplots(2, 2, figsize=(14, 12), tight_layout=True)
|
|
333
|
-
axs =
|
|
333
|
+
axs = plot.to_flat_list(axs)
|
|
334
334
|
|
|
335
335
|
for idx, (key, params) in enumerate(fit_params.items()):
|
|
336
336
|
print(f"{key}: {params}")
|
|
@@ -19,7 +19,6 @@ from abc import ABC, abstractmethod
|
|
|
19
19
|
from scipy import stats
|
|
20
20
|
from dataclasses import dataclass, asdict
|
|
21
21
|
from typing import Tuple, Optional, Dict
|
|
22
|
-
import qis as qis
|
|
23
22
|
|
|
24
23
|
from stochvolmodels.utils.config import VariableType
|
|
25
24
|
from stochvolmodels.data.option_chain import OptionChain, OptionSlice
|
|
@@ -346,7 +345,7 @@ class ModelPricer(ABC):
|
|
|
346
345
|
fig, axs = plt.subplots(1, 3, figsize=figsize, tight_layout=True)
|
|
347
346
|
elif num_slices == 4:
|
|
348
347
|
fig, axs = plt.subplots(2, 2, figsize=figsize, tight_layout=True)
|
|
349
|
-
axs =
|
|
348
|
+
axs = plot.to_flat_list(axs)
|
|
350
349
|
else:
|
|
351
350
|
raise NotImplementedError
|
|
352
351
|
else:
|
|
@@ -425,7 +424,7 @@ class ModelPricer(ABC):
|
|
|
425
424
|
fig, axs = plt.subplots(1, 3, figsize=figsize, tight_layout=True)
|
|
426
425
|
elif num_slices == 4:
|
|
427
426
|
fig, axs = plt.subplots(2, 2, figsize=figsize, tight_layout=True)
|
|
428
|
-
axs =
|
|
427
|
+
axs = plot.to_flat_list(axs)
|
|
429
428
|
else:
|
|
430
429
|
raise NotImplementedError
|
|
431
430
|
|
|
@@ -521,7 +520,7 @@ class ModelPricer(ABC):
|
|
|
521
520
|
fig, axs = plt.subplots(1, 3, figsize=figsize, tight_layout=True)
|
|
522
521
|
elif num_slices == 4:
|
|
523
522
|
fig, axs = plt.subplots(2, 2, figsize=figsize, tight_layout=True)
|
|
524
|
-
axs =
|
|
523
|
+
axs = plot.to_flat_list(axs)
|
|
525
524
|
else:
|
|
526
525
|
raise NotImplementedError
|
|
527
526
|
|
|
@@ -168,7 +168,7 @@ class UnitTests(Enum):
|
|
|
168
168
|
def run_unit_test(unit_test: UnitTests):
|
|
169
169
|
|
|
170
170
|
import seaborn as sns
|
|
171
|
-
import
|
|
171
|
+
from stochvolmodels.utils import plots as plot
|
|
172
172
|
import stochvolmodels.data.test_option_chain as chains
|
|
173
173
|
|
|
174
174
|
if unit_test == UnitTests.CALIBRATOR:
|
|
@@ -181,7 +181,7 @@ def run_unit_test(unit_test: UnitTests):
|
|
|
181
181
|
|
|
182
182
|
with sns.axes_style('darkgrid'):
|
|
183
183
|
fig, axs = plt.subplots(2, 2, figsize=(14, 12), tight_layout=True)
|
|
184
|
-
axs =
|
|
184
|
+
axs = plot.to_flat_list(axs)
|
|
185
185
|
|
|
186
186
|
for idx, (key, params) in enumerate(fit_params.items()):
|
|
187
187
|
print(f"{key}: {params}")
|
|
@@ -447,4 +447,11 @@ def align_y_limits_axs(axs: List[plt.Subplot],
|
|
|
447
447
|
if is_invisible_ys:
|
|
448
448
|
for idx, ax in enumerate(axs):
|
|
449
449
|
if idx > 0:
|
|
450
|
-
ax.axes.get_yaxis().set_visible(False)
|
|
450
|
+
ax.axes.get_yaxis().set_visible(False)
|
|
451
|
+
|
|
452
|
+
def to_flat_list(items: Iterable) -> List[Any]:
|
|
453
|
+
if isinstance(items, Iterable):
|
|
454
|
+
flat_list = [item for item in flatten(items)]
|
|
455
|
+
else:
|
|
456
|
+
flat_list = [items]
|
|
457
|
+
return flat_list
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/examples/run_heston_sv_pricer.py
RENAMED
|
File without changes
|
{stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/examples/run_lognormal_sv_pricer.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/pricers/analytic/bachelier.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/pricers/factor_hjm/rate_core.py
RENAMED
|
File without changes
|
{stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/pricers/factor_hjm/rate_evaluate.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/pricers/logsv/affine_expansion.py
RENAMED
|
File without changes
|
{stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/pricers/logsv/logsv_params.py
RENAMED
|
File without changes
|
{stochvolmodels-1.0.23 → stochvolmodels-1.0.24}/stochvolmodels/pricers/logsv/vol_moments_ode.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|