stochvolmodels 1.0.11__tar.gz → 1.0.25__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 (51) hide show
  1. {stochvolmodels-1.0.11 → stochvolmodels-1.0.25}/PKG-INFO +69 -21
  2. {stochvolmodels-1.0.11 → stochvolmodels-1.0.25}/README.md +63 -18
  3. {stochvolmodels-1.0.11 → stochvolmodels-1.0.25}/pyproject.toml +6 -3
  4. {stochvolmodels-1.0.11 → stochvolmodels-1.0.25}/stochvolmodels/__init__.py +72 -52
  5. stochvolmodels-1.0.25/stochvolmodels/data/option_chain.py +657 -0
  6. {stochvolmodels-1.0.11 → stochvolmodels-1.0.25}/stochvolmodels/data/test_option_chain.py +3 -2
  7. stochvolmodels-1.0.25/stochvolmodels/examples/quick_run_lognormal_sv_pricer.py +34 -0
  8. stochvolmodels-1.0.25/stochvolmodels/examples/run_gmm_fit.py +41 -0
  9. stochvolmodels-1.0.25/stochvolmodels/examples/run_heston.py +18 -0
  10. stochvolmodels-1.0.25/stochvolmodels/examples/run_heston_sv_pricer.py +72 -0
  11. stochvolmodels-1.0.25/stochvolmodels/examples/run_lognormal_sv_pricer.py +120 -0
  12. stochvolmodels-1.0.25/stochvolmodels/examples/run_pricing_options_on_qvar.py +51 -0
  13. stochvolmodels-1.0.11/stochvolmodels/pricers/core/normal_pricer.py → stochvolmodels-1.0.25/stochvolmodels/pricers/analytic/bachelier.py +14 -3
  14. stochvolmodels-1.0.25/stochvolmodels/pricers/analytic/bsm.py +584 -0
  15. stochvolmodels-1.0.25/stochvolmodels/pricers/analytic/tdist.py +272 -0
  16. stochvolmodels-1.0.25/stochvolmodels/pricers/factor_hjm/double_exp_pricer.py +93 -0
  17. stochvolmodels-1.0.25/stochvolmodels/pricers/factor_hjm/factor_hjm_pricer.py +186 -0
  18. stochvolmodels-1.0.25/stochvolmodels/pricers/factor_hjm/rate_affine_expansion.py +340 -0
  19. stochvolmodels-1.0.25/stochvolmodels/pricers/factor_hjm/rate_core.py +188 -0
  20. stochvolmodels-1.0.25/stochvolmodels/pricers/factor_hjm/rate_evaluate.py +118 -0
  21. stochvolmodels-1.0.25/stochvolmodels/pricers/factor_hjm/rate_factor_basis.py +404 -0
  22. stochvolmodels-1.0.25/stochvolmodels/pricers/factor_hjm/rate_logsv_ivols.py +215 -0
  23. stochvolmodels-1.0.25/stochvolmodels/pricers/factor_hjm/rate_logsv_params.py +580 -0
  24. stochvolmodels-1.0.25/stochvolmodels/pricers/factor_hjm/rate_logsv_pricer.py +1305 -0
  25. stochvolmodels-1.0.25/stochvolmodels/pricers/gmm_pricer.py +352 -0
  26. {stochvolmodels-1.0.11 → stochvolmodels-1.0.25}/stochvolmodels/pricers/hawkes_jd_pricer.py +4 -4
  27. {stochvolmodels-1.0.11 → stochvolmodels-1.0.25}/stochvolmodels/pricers/heston_pricer.py +65 -25
  28. {stochvolmodels-1.0.11 → stochvolmodels-1.0.25}/stochvolmodels/pricers/logsv/affine_expansion.py +26 -17
  29. stochvolmodels-1.0.25/stochvolmodels/pricers/logsv/logsv_params.py +176 -0
  30. {stochvolmodels-1.0.11 → stochvolmodels-1.0.25}/stochvolmodels/pricers/logsv/vol_moments_ode.py +49 -6
  31. {stochvolmodels-1.0.11 → stochvolmodels-1.0.25}/stochvolmodels/pricers/logsv_pricer.py +76 -168
  32. {stochvolmodels-1.0.11 → stochvolmodels-1.0.25}/stochvolmodels/pricers/model_pricer.py +32 -20
  33. stochvolmodels-1.0.25/stochvolmodels/pricers/tdist_pricer.py +203 -0
  34. {stochvolmodels-1.0.11 → stochvolmodels-1.0.25}/stochvolmodels/tests/bsm_mgf_pricer.py +3 -3
  35. {stochvolmodels-1.0.11 → stochvolmodels-1.0.25}/stochvolmodels/tests/qv_pricer.py +5 -4
  36. {stochvolmodels-1.0.11 → stochvolmodels-1.0.25}/stochvolmodels/utils/funcs.py +3 -3
  37. {stochvolmodels-1.0.11/stochvolmodels/pricers/core → stochvolmodels-1.0.25/stochvolmodels/utils}/mc_payoffs.py +1 -1
  38. {stochvolmodels-1.0.11/stochvolmodels/pricers/core → stochvolmodels-1.0.25/stochvolmodels/utils}/mgf_pricer.py +1 -1
  39. {stochvolmodels-1.0.11 → stochvolmodels-1.0.25}/stochvolmodels/utils/plots.py +34 -11
  40. stochvolmodels-1.0.25/stochvolmodels/utils/var_swap_pricer.py +26 -0
  41. stochvolmodels-1.0.11/stochvolmodels/data/option_chain.py +0 -277
  42. stochvolmodels-1.0.11/stochvolmodels/pricers/core/bsm_pricer.py +0 -284
  43. {stochvolmodels-1.0.11 → stochvolmodels-1.0.25}/LICENSE.txt +0 -0
  44. {stochvolmodels-1.0.11 → stochvolmodels-1.0.25}/stochvolmodels/data/__init__.py +0 -0
  45. {stochvolmodels-1.0.11 → stochvolmodels-1.0.25}/stochvolmodels/data/fetch_option_chain.py +0 -0
  46. {stochvolmodels-1.0.11 → stochvolmodels-1.0.25}/stochvolmodels/pricers/__init__.py +0 -0
  47. {stochvolmodels-1.0.11/stochvolmodels/pricers/core → stochvolmodels-1.0.25/stochvolmodels/pricers/analytic}/__init__.py +0 -0
  48. {stochvolmodels-1.0.11 → stochvolmodels-1.0.25}/stochvolmodels/pricers/logsv/__init__.py +0 -0
  49. {stochvolmodels-1.0.11 → stochvolmodels-1.0.25}/stochvolmodels/tests/__init__.py +0 -0
  50. {stochvolmodels-1.0.11 → stochvolmodels-1.0.25}/stochvolmodels/utils/__init__.py +0 -0
  51. {stochvolmodels-1.0.11/stochvolmodels/pricers/core → stochvolmodels-1.0.25/stochvolmodels/utils}/config.py +0 -0
@@ -1,15 +1,14 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: stochvolmodels
3
- Version: 1.0.11
3
+ Version: 1.0.25
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
9
8
  Author-email: artursepp@gmail.com
10
9
  Maintainer: Artur Sepp
11
10
  Maintainer-email: artursepp@gmail.com
12
- Requires-Python: >=3.8,<3.11
11
+ Requires-Python: >=3.8
13
12
  Classifier: Development Status :: 4 - Beta
14
13
  Classifier: Environment :: Console
15
14
  Classifier: Intended Audience :: Financial and Insurance Industry
@@ -22,6 +21,9 @@ Classifier: Programming Language :: Python :: 3
22
21
  Classifier: Programming Language :: Python :: 3.8
23
22
  Classifier: Programming Language :: Python :: 3.9
24
23
  Classifier: Programming Language :: Python :: 3.10
24
+ Classifier: Programming Language :: Python :: 3.11
25
+ Classifier: Programming Language :: Python :: 3.12
26
+ Classifier: Programming Language :: Python :: 3.13
25
27
  Classifier: Programming Language :: Python :: 3 :: Only
26
28
  Classifier: Topic :: Office/Business :: Financial :: Investment
27
29
  Requires-Dist: matplotlib (>=3.5.2)
@@ -41,35 +43,36 @@ Description-Content-Type: text/markdown
41
43
 
42
44
  Implementation of pricing analytics and Monte Carlo simulations for modeling of options and implied volatilities.
43
45
 
44
- The StochVolPackage provides:
46
+ The StochVol package provides:
45
47
  1) Analytics for Black-Scholes and Normal vols
46
- 2) Interfaces and implementation for stochastic volatility models including log-normal SV model and Heston SV model
48
+ 2) Interfaces and implementation for stochastic volatility models,
49
+ including log-normal SV model and Heston SV model
50
+ using analytical method with Fourier transform and Monte Carlo simulations
47
51
  3) Visualization of model implied volatilities
48
52
 
49
53
  For the analytic implementation of stochastic volatility models, the package provides interfaces for a generic volatility model with the following features.
50
- 1) Interface for analytical pricing of vanilla options using Fourier transform with closed-form solution for moment generating function
54
+ 1) Interface for analytical pricing of vanilla options
55
+ using Fourier transform with closed-form solution for moment generating function
51
56
  2) Interface for Monte-Carlo simulations of model dynamics
52
57
 
53
- ## Illustrations
54
58
 
55
- As illustrations of different analytics, this packadge includes the computations and visualisations
56
- for
59
+ [Illustrations](#papers) of using package analytics for research
60
+ work is provided in top-level package ```my_papers```
61
+ which contains computations and visualisations for several papers
62
+
57
63
 
58
- 1) Log-normal Stochastic Volatility Model with Quadratic Drift by Sepp A and Rakhmonov P, SSRN: https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2522425
64
+ ## Installation
65
+ Install using
59
66
  ```python
60
- stochvolmodels/my_papers/logsv_model_wtih_quadratic_drift
67
+ pip install stochvolmodels
61
68
  ```
62
-
63
-
64
- 2) What is a robust stochastic volatility model by Sepp A and Rakhmonov P, SSRN: https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4647027
69
+ Upgrade using
65
70
  ```python
66
- stochvolmodels/my_papers/volatility_models
71
+ pip install --upgrade stochvolmodels
67
72
  ```
68
-
69
-
70
- ## Installation
73
+ Close using
71
74
  ```python
72
- pip install stochvolmodels
75
+ git clone https://github.com/ArturSepp/StochVolModels.git
73
76
  ```
74
77
 
75
78
  # Table of contents
@@ -82,6 +85,8 @@ pip install stochvolmodels
82
85
  3. [Comparison of model prices vs MC](#subparagraph3)
83
86
  4. [Analysis and figures for the paper](#subparagraph4)
84
87
  3. [Running Heston SV pricer](#heston)
88
+ 4. [Supporting Illustrations for Public Papers](#papers)
89
+
85
90
 
86
91
  Running model calibration to sample Bitcoin options data
87
92
 
@@ -97,7 +102,7 @@ The model interface is in stochvolmodels/pricers/model_pricer.py
97
102
 
98
103
  The analytics for the log-normal stochastic volatility model is based on the paper
99
104
 
100
- [Log-normal Stochastic Volatility Model with Quadratic Drift](https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2522425) by Artur Sepp and Parviz Rakhmonov
105
+ [Log-normal Stochastic Volatility Model with Quadratic Drift](https://www.worldscientific.com/doi/10.1142/S0219024924500031) by Artur Sepp and Parviz Rakhmonov
101
106
 
102
107
 
103
108
  The dynamics of the log-normal stochastic volatility model:
@@ -246,3 +251,46 @@ pricer.plot_model_slices_in_params(option_slice=option_slice, params_dict=params
246
251
 
247
252
  plt.show()
248
253
  ```
254
+
255
+
256
+ ## Supporting Illustrations for Public Papers <a name="papers"></a>
257
+
258
+ As illustrations of different analytics, this packadge includes module ```my_papers```
259
+ with codes for computations and visualisations featured in several papers
260
+ for
261
+
262
+ 1) "Log-normal Stochastic Volatility Model with Quadratic Drift" by Artur Sepp
263
+ and Parviz Rakhmonov: https://www.worldscientific.com/doi/10.1142/S0219024924500031
264
+ ```python
265
+ stochvolmodels/my_papers/logsv_model_wtih_quadratic_drift
266
+ ```
267
+
268
+
269
+ 2) "What is a robust stochastic volatility model" by Artur Sepp and Parviz Rakhmonov, SSRN:
270
+ https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4647027
271
+ ```python
272
+ stochvolmodels/my_papers/volatility_models
273
+ ```
274
+
275
+
276
+ 3) "Valuation and Hedging of Cryptocurrency Inverse Options" by Artur Sepp
277
+ and Vladimir Lucic,
278
+ SSRN: https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4606748
279
+ ```python
280
+ stochvolmodels/my_papers/inverse_options
281
+ ```
282
+
283
+ 4) "Unified Approach for Hedging Impermanent Loss of Liquidity Provision" by
284
+ Artur Sepp, Alexander Lipton and Vladimir Lucic,
285
+ SSRN: https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4887298
286
+ ```python
287
+ stochvolmodels/my_papers/il_hedging
288
+ ```
289
+
290
+ 5) "Stochastic Volatility for Factor Heath-Jarrow-Morton Framework" by Artur Sepp and Parviz Rakhmonov, SSRN:
291
+ https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4646925
292
+ ```python
293
+ stochvolmodels/my_papers/sv_for_factor_hjm
294
+ ```
295
+
296
+
@@ -2,35 +2,36 @@
2
2
 
3
3
  Implementation of pricing analytics and Monte Carlo simulations for modeling of options and implied volatilities.
4
4
 
5
- The StochVolPackage provides:
5
+ The StochVol package provides:
6
6
  1) Analytics for Black-Scholes and Normal vols
7
- 2) Interfaces and implementation for stochastic volatility models including log-normal SV model and Heston SV model
7
+ 2) Interfaces and implementation for stochastic volatility models,
8
+ including log-normal SV model and Heston SV model
9
+ using analytical method with Fourier transform and Monte Carlo simulations
8
10
  3) Visualization of model implied volatilities
9
11
 
10
12
  For the analytic implementation of stochastic volatility models, the package provides interfaces for a generic volatility model with the following features.
11
- 1) Interface for analytical pricing of vanilla options using Fourier transform with closed-form solution for moment generating function
13
+ 1) Interface for analytical pricing of vanilla options
14
+ using Fourier transform with closed-form solution for moment generating function
12
15
  2) Interface for Monte-Carlo simulations of model dynamics
13
16
 
14
- ## Illustrations
15
17
 
16
- As illustrations of different analytics, this packadge includes the computations and visualisations
17
- for
18
+ [Illustrations](#papers) of using package analytics for research
19
+ work is provided in top-level package ```my_papers```
20
+ which contains computations and visualisations for several papers
21
+
18
22
 
19
- 1) Log-normal Stochastic Volatility Model with Quadratic Drift by Sepp A and Rakhmonov P, SSRN: https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2522425
23
+ ## Installation
24
+ Install using
20
25
  ```python
21
- stochvolmodels/my_papers/logsv_model_wtih_quadratic_drift
26
+ pip install stochvolmodels
22
27
  ```
23
-
24
-
25
- 2) What is a robust stochastic volatility model by Sepp A and Rakhmonov P, SSRN: https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4647027
28
+ Upgrade using
26
29
  ```python
27
- stochvolmodels/my_papers/volatility_models
30
+ pip install --upgrade stochvolmodels
28
31
  ```
29
-
30
-
31
- ## Installation
32
+ Close using
32
33
  ```python
33
- pip install stochvolmodels
34
+ git clone https://github.com/ArturSepp/StochVolModels.git
34
35
  ```
35
36
 
36
37
  # Table of contents
@@ -43,6 +44,8 @@ pip install stochvolmodels
43
44
  3. [Comparison of model prices vs MC](#subparagraph3)
44
45
  4. [Analysis and figures for the paper](#subparagraph4)
45
46
  3. [Running Heston SV pricer](#heston)
47
+ 4. [Supporting Illustrations for Public Papers](#papers)
48
+
46
49
 
47
50
  Running model calibration to sample Bitcoin options data
48
51
 
@@ -58,7 +61,7 @@ The model interface is in stochvolmodels/pricers/model_pricer.py
58
61
 
59
62
  The analytics for the log-normal stochastic volatility model is based on the paper
60
63
 
61
- [Log-normal Stochastic Volatility Model with Quadratic Drift](https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2522425) by Artur Sepp and Parviz Rakhmonov
64
+ [Log-normal Stochastic Volatility Model with Quadratic Drift](https://www.worldscientific.com/doi/10.1142/S0219024924500031) by Artur Sepp and Parviz Rakhmonov
62
65
 
63
66
 
64
67
  The dynamics of the log-normal stochastic volatility model:
@@ -206,4 +209,46 @@ pricer = HestonPricer()
206
209
  pricer.plot_model_slices_in_params(option_slice=option_slice, params_dict=params_dict)
207
210
 
208
211
  plt.show()
209
- ```
212
+ ```
213
+
214
+
215
+ ## Supporting Illustrations for Public Papers <a name="papers"></a>
216
+
217
+ As illustrations of different analytics, this packadge includes module ```my_papers```
218
+ with codes for computations and visualisations featured in several papers
219
+ for
220
+
221
+ 1) "Log-normal Stochastic Volatility Model with Quadratic Drift" by Artur Sepp
222
+ and Parviz Rakhmonov: https://www.worldscientific.com/doi/10.1142/S0219024924500031
223
+ ```python
224
+ stochvolmodels/my_papers/logsv_model_wtih_quadratic_drift
225
+ ```
226
+
227
+
228
+ 2) "What is a robust stochastic volatility model" by Artur Sepp and Parviz Rakhmonov, SSRN:
229
+ https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4647027
230
+ ```python
231
+ stochvolmodels/my_papers/volatility_models
232
+ ```
233
+
234
+
235
+ 3) "Valuation and Hedging of Cryptocurrency Inverse Options" by Artur Sepp
236
+ and Vladimir Lucic,
237
+ SSRN: https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4606748
238
+ ```python
239
+ stochvolmodels/my_papers/inverse_options
240
+ ```
241
+
242
+ 4) "Unified Approach for Hedging Impermanent Loss of Liquidity Provision" by
243
+ Artur Sepp, Alexander Lipton and Vladimir Lucic,
244
+ SSRN: https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4887298
245
+ ```python
246
+ stochvolmodels/my_papers/il_hedging
247
+ ```
248
+
249
+ 5) "Stochastic Volatility for Factor Heath-Jarrow-Morton Framework" by Artur Sepp and Parviz Rakhmonov, SSRN:
250
+ https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4646925
251
+ ```python
252
+ stochvolmodels/my_papers/sv_for_factor_hjm
253
+ ```
254
+
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "stochvolmodels"
3
- version = "1.0.11"
3
+ version = "1.0.25"
4
4
  description = "Implementation of stochastic volatility models for option pricing"
5
5
  license = "LICENSE.txt"
6
6
  authors = ["Artur Sepp <artursepp@gmail.com>"]
@@ -23,14 +23,17 @@ classifiers=[
23
23
  "Programming Language :: Python :: 3 :: Only",
24
24
  "Topic :: Office/Business :: Financial :: Investment",
25
25
  ]
26
- packages = [ {include = "stochvolmodels"} ]
26
+
27
+ packages = [ {include = "stochvolmodels"}]
28
+
29
+ exclude = ["stochvolmodel/my_papers/"]
27
30
 
28
31
  [tool.poetry.urls]
29
32
  "Issues" = "https://github.com/ArturSepp/StochVolModels/issues"
30
33
  "Personal website" = "https://artursepp.com"
31
34
 
32
35
  [tool.poetry.dependencies]
33
- python = ">=3.8,<3.11"
36
+ python = ">=3.8"
34
37
  numba = ">=0.55"
35
38
  numpy = ">=1.22.4"
36
39
  scipy = ">=1.3"
@@ -1,4 +1,20 @@
1
1
 
2
+
3
+ from stochvolmodels.utils.config import VariableType
4
+
5
+ from stochvolmodels.utils.mc_payoffs import compute_mc_vars_payoff
6
+
7
+ from stochvolmodels.utils.mgf_pricer import (get_phi_grid,
8
+ get_psi_grid,
9
+ get_theta_grid,
10
+ get_transform_var_grid,
11
+ compute_integration_weights,
12
+ vanilla_slice_pricer_with_mgf_grid,
13
+ digital_slice_pricer_with_mgf_grid,
14
+ slice_pricer_with_mgf_grid_with_gamma,
15
+ slice_qvar_pricer_with_a_grid,
16
+ pdf_with_mgf_grid)
17
+
2
18
  from stochvolmodels.utils.funcs import (
3
19
  set_seed,
4
20
  compute_histogram_data,
@@ -9,14 +25,16 @@ from stochvolmodels.utils.funcs import (
9
25
  npdf
10
26
  )
11
27
 
12
- from stochvolmodels.pricers.core.bsm_pricer import (
28
+ from stochvolmodels.pricers.analytic.bsm import (
13
29
  OptionType,
14
- compute_bsm_delta,
15
- compute_bsm_delta_to_strike,
16
- compute_bsm_deltas_ttms,
17
- compute_bsm_price,
18
- compute_bsm_slice_deltas,
19
- compute_bsm_slice_prices,
30
+ compute_bsm_vanilla_price,
31
+ compute_bsm_vanilla_slice_deltas,
32
+ compute_bsm_vanilla_slice_prices,
33
+ compute_bsm_forward_grid_prices,
34
+ compute_bsm_vanilla_delta,
35
+ compute_bsm_vanilla_grid_deltas,
36
+ compute_bsm_strike_from_delta,
37
+ compute_bsm_vanilla_deltas_ttms,
20
38
  compute_bsm_slice_vegas,
21
39
  compute_bsm_vegas_ttms,
22
40
  infer_bsm_implied_vol,
@@ -25,7 +43,7 @@ from stochvolmodels.pricers.core.bsm_pricer import (
25
43
  infer_bsm_ivols_from_slice_prices
26
44
  )
27
45
 
28
- from stochvolmodels.pricers.core.normal_pricer import (
46
+ from stochvolmodels.pricers.analytic.bachelier import (
29
47
  compute_normal_delta,
30
48
  compute_normal_delta_from_lognormal_vol,
31
49
  compute_normal_delta_to_strike,
@@ -41,6 +59,37 @@ from stochvolmodels.pricers.core.normal_pricer import (
41
59
  infer_normal_ivols_from_slice_prices,
42
60
  )
43
61
 
62
+ from stochvolmodels.pricers.analytic.tdist import (
63
+ pdf_tdist,
64
+ cdf_tdist,
65
+ cum_mean_tdist,
66
+ imply_drift_tdist,
67
+ compute_default_prob_tdist,
68
+ compute_forward_tdist,
69
+ compute_vanilla_price_tdist,
70
+ infer_implied_vol_tdist,
71
+ infer_tdist_implied_vols_from_model_slice_prices
72
+ )
73
+
74
+ from stochvolmodels.pricers.logsv.affine_expansion import (
75
+ ExpansionOrder,
76
+ VariableType,
77
+ compute_logsv_a_mgf_grid,
78
+ func_a_ode_quadratic_terms,
79
+ func_rhs,
80
+ func_rhs_jac,
81
+ get_expansion_n,
82
+ get_init_conditions_a,
83
+ solve_a_ode_grid,
84
+ solve_analytic_ode_for_a,
85
+ solve_analytic_ode_for_a0,
86
+ solve_analytic_ode_grid_phi,
87
+ solve_ode_for_a,
88
+ compute_logsv_a_mgf_grid,
89
+ solve_a_ode_grid,
90
+ solve_ode_for_a,
91
+ )
92
+
44
93
  from stochvolmodels.pricers.hawkes_jd_pricer import (
45
94
  HawkesJDParams,
46
95
  HawkesJDPricer
@@ -55,17 +104,25 @@ from stochvolmodels.pricers.heston_pricer import (
55
104
  from stochvolmodels.pricers.logsv_pricer import (
56
105
  LOGSV_BTC_PARAMS,
57
106
  LogSVPricer,
58
- LogSvParams,
59
107
  LogsvModelCalibrationType,
60
108
  ConstraintsType
61
109
  )
110
+ from stochvolmodels.pricers.logsv.logsv_params import LogSvParams
111
+
112
+ from stochvolmodels.pricers.gmm_pricer import (
113
+ GmmParams,
114
+ GmmPricer,
115
+ plot_gmm_pdfs
116
+ )
117
+
118
+ from stochvolmodels.pricers.tdist_pricer import (
119
+ TdistParams,
120
+ TdistPricer
121
+ )
122
+
62
123
 
63
124
  from stochvolmodels.data.option_chain import OptionChain, OptionSlice
64
125
 
65
- from stochvolmodels.data.fetch_option_chain import (generate_vol_chain_np,
66
- load_option_chain,
67
- sample_option_chain_at_times,
68
- load_price_data)
69
126
 
70
127
  from stochvolmodels.data.test_option_chain import (
71
128
  get_btc_test_chain_data,
@@ -83,7 +140,7 @@ from stochvolmodels.utils.plots import (
83
140
  create_dummy_line,
84
141
  fig_list_to_pdf,
85
142
  fig_to_pdf,
86
- get_legend_colors,
143
+ set_legend_colors,
87
144
  get_n_sns_colors,
88
145
  map_deltas_to_str,
89
146
  model_param_ts,
@@ -98,41 +155,4 @@ from stochvolmodels.utils.plots import (
98
155
  )
99
156
 
100
157
 
101
- from stochvolmodels.pricers.core.mgf_pricer import (
102
- compute_integration_weights,
103
- digital_slice_pricer_with_mgf_grid,
104
- get_phi_grid,
105
- get_psi_grid,
106
- get_theta_grid,
107
- get_transform_var_grid,
108
- pdf_with_mgf_grid,
109
- slice_pricer_with_mgf_grid_with_gamma,
110
- slice_qvar_pricer_with_a_grid,
111
- vanilla_slice_pricer_with_mgf_grid,
112
- slice_pricer_with_mgf_grid_with_gamma,
113
- )
114
-
115
- from stochvolmodels.pricers.logsv.affine_expansion import (
116
- ExpansionOrder,
117
- VariableType,
118
- compute_logsv_a_mgf_grid,
119
- func_a_ode_quadratic_terms,
120
- func_rhs,
121
- func_rhs_jac,
122
- get_expansion_n,
123
- get_init_conditions_a,
124
- solve_a_ode_grid,
125
- solve_analytic_ode_for_a,
126
- solve_analytic_ode_for_a0,
127
- solve_analytic_ode_grid_phi,
128
- solve_ode_for_a,
129
- compute_logsv_a_mgf_grid,
130
- solve_a_ode_grid,
131
- solve_ode_for_a,
132
- )
133
-
134
- from stochvolmodels.pricers.core.config import VariableType
135
-
136
- from stochvolmodels.pricers.core.mc_payoffs import compute_mc_vars_payoff
137
-
138
-
158
+ from stochvolmodels.pricers.logsv.vol_moments_ode import compute_analytic_qvar