voly 0.0.143__py3-none-any.whl → 0.0.145__py3-none-any.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.
voly/core/hd.py CHANGED
@@ -172,11 +172,10 @@ def fit_volatility_model(log_returns, df_hist, model_type='garch', distribution=
172
172
  try:
173
173
  # Configure model based on type and distribution
174
174
  if model_type.lower() == 'garch':
175
- vol_model = GARCH(p=1, q=1)
175
+ model = arch_model(data, vol='GARCH', p=1, q=1, dist=distribution.lower())
176
176
  else: # egarch
177
- vol_model = EGARCH(p=1, o=1, q=1)
177
+ model = arch_model(data, vol='EGARCH', p=1, o=1, q=1, dist=distribution.lower())
178
178
 
179
- model = arch_model(data, vol=vol_model, dist=distribution.lower())
180
179
  fit_result = model.fit(disp='off')
181
180
 
182
181
  # Extract parameters based on model type and distribution
@@ -600,19 +599,19 @@ def get_hd_surface(model_results: pd.DataFrame,
600
599
  if return_domain == 'log_moneyness':
601
600
  x = LM
602
601
  pdf = pdf_lm
603
- moments = get_all_moments(x, pdf, model_params if method in ['garch', 'egarch'] else None)
602
+ moments = get_all_moments(x, pdf, model_params if method == 'arch_returns' else None)
604
603
  elif return_domain == 'moneyness':
605
604
  x = M
606
605
  pdf = pdf_m
607
- moments = get_all_moments(x, pdf, model_params if method in ['garch', 'egarch'] else None)
606
+ moments = get_all_moments(x, pdf, model_params if method == 'arch_returns' else None)
608
607
  elif return_domain == 'returns':
609
608
  x = R
610
609
  pdf = pdf_r
611
- moments = get_all_moments(x, pdf, model_params if method in ['garch', 'egarch'] else None)
610
+ moments = get_all_moments(x, pdf, model_params if method == 'arch_returns' else None)
612
611
  elif return_domain == 'strikes':
613
612
  x = K
614
613
  pdf = pdf_k
615
- moments = get_all_moments(x, pdf, model_params if method in ['garch', 'egarch'] else None)
614
+ moments = get_all_moments(x, pdf, model_params if method == 'arch_returns' else None)
616
615
  else:
617
616
  raise VolyError(f"Unsupported return_domain: {return_domain}")
618
617
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: voly
3
- Version: 0.0.143
3
+ Version: 0.0.145
4
4
  Summary: Options & volatility research package
5
5
  Author-email: Manu de Cara <manu.de.cara@gmail.com>
6
6
  License: MIT
@@ -7,13 +7,13 @@ voly/core/__init__.py,sha256=bu6fS2I1Pj9fPPnl-zY3L7NqrZSY5Zy6NY2uMUvdhKs,183
7
7
  voly/core/charts.py,sha256=E21OZB5lTY4YL2flgaFJ6s5g3_ExtAQT2zryZZxLPyM,12735
8
8
  voly/core/data.py,sha256=pDeuYhP0GX4RbtlqByvsE3rfHcIkix0BU5MLW8sKIeI,8935
9
9
  voly/core/fit.py,sha256=Tb9eeG7e_2dQTcqt6aqEwFrZdy6jR9rSNqe6tzOdVhQ,9245
10
- voly/core/hd.py,sha256=7b5kIIOz_g8uAM_Bsqx8treo1wA3mx1HiEsTNfwpw1Q,25236
10
+ voly/core/hd.py,sha256=R8xd0kTXu_YCZ9x1CDB9Cqe3kQTwwlguQOWHglBAgFw,25231
11
11
  voly/core/interpolate.py,sha256=JkK172-FXyhesW3hY4pEeuJWG3Bugq7QZXbeKoRpLuo,5305
12
12
  voly/core/rnd.py,sha256=masjK4WrVb925gPGboD8iDAaEN7FY7S4OHYthHPtA3o,13613
13
13
  voly/utils/__init__.py,sha256=E05mWatyC-PDOsCxQV1p5Xi1IgpOomxrNURyCx_gB-w,200
14
14
  voly/utils/logger.py,sha256=4-_2bVJmq17Q0d7Rd2mPg1AeR8gxv6EPvcmBDMFWcSM,1744
15
- voly-0.0.143.dist-info/licenses/LICENSE,sha256=wcHIVbE12jfcBOai_wqBKY6xvNQU5E909xL1zZNq_2Q,1065
16
- voly-0.0.143.dist-info/METADATA,sha256=citPOTKDdkxXG6cgQAxHWRH9hz09lyve8l8BASS-wVU,4115
17
- voly-0.0.143.dist-info/WHEEL,sha256=DK49LOLCYiurdXXOXwGJm6U4DkHkg4lcxjhqwRa0CP4,91
18
- voly-0.0.143.dist-info/top_level.txt,sha256=ZfLw2sSxF-LrKAkgGjOmeTcw6_gD-30zvtdEY5W4B7c,5
19
- voly-0.0.143.dist-info/RECORD,,
15
+ voly-0.0.145.dist-info/licenses/LICENSE,sha256=wcHIVbE12jfcBOai_wqBKY6xvNQU5E909xL1zZNq_2Q,1065
16
+ voly-0.0.145.dist-info/METADATA,sha256=meTUzxdtgpwpp5UlgaNVqprNXUuu35C6z7O8HodU640,4115
17
+ voly-0.0.145.dist-info/WHEEL,sha256=DK49LOLCYiurdXXOXwGJm6U4DkHkg4lcxjhqwRa0CP4,91
18
+ voly-0.0.145.dist-info/top_level.txt,sha256=ZfLw2sSxF-LrKAkgGjOmeTcw6_gD-30zvtdEY5W4B7c,5
19
+ voly-0.0.145.dist-info/RECORD,,
File without changes