voly 0.0.211__py3-none-any.whl → 0.0.213__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/fit.py CHANGED
@@ -27,6 +27,7 @@ class SVICalibrator:
27
27
  self.option_chain = option_chain
28
28
  self.currency = currency
29
29
  self.s = option_chain['index_price'].iloc[0]
30
+ self.r = option_chain['interest_rate'].iloc[0] if 'interest_rate' in option_chain else 0.0
30
31
  self.groups = option_chain.groupby('maturity_date')
31
32
  self.params_dict = {}
32
33
  self.results_data = {}
@@ -34,7 +35,7 @@ class SVICalibrator:
34
35
 
35
36
  # Initialize results data template
36
37
  self.field_names = [
37
- 's', 't', 'maturity_date', 'maturity_name', 'a', 'b', 'm', 'rho', 'sigma',
38
+ 's', 't', 'r', 'maturity_date', 'maturity_name', 'a', 'b', 'm', 'rho', 'sigma',
38
39
  'nu', 'psi', 'p', 'c', 'nu_tilde', 'log_min_strike', 'usd_min_strike',
39
40
  'fit_success', 'butterfly_arbitrage_free', 'calendar_arbitrage_free',
40
41
  'rmse', 'mae', 'r2', 'max_error', 'loss', 'n_points'
@@ -49,6 +50,7 @@ class SVICalibrator:
49
50
  return {
50
51
  's': float(self.s),
51
52
  't': float(t),
53
+ 'r': float(self.r),
52
54
  'maturity_date': maturity,
53
55
  'maturity_name': maturity_name,
54
56
  'fit_success': False,
@@ -169,6 +171,7 @@ class SVICalibrator:
169
171
  result = {
170
172
  's': float(self.s),
171
173
  't': float(t),
174
+ 'r': float(self.r),
172
175
  'maturity_date': maturity,
173
176
  'maturity_name': maturity_name,
174
177
  'fit_success': True,
voly/utils/density.py CHANGED
@@ -36,7 +36,7 @@ def prepare_domains(domain_params: Tuple[float, float, int],
36
36
  # Calculate other domains
37
37
  M = np.exp(LM) # Moneyness
38
38
  R = M - 1 # Returns
39
- K = s / M # Strike prices
39
+ K = M * s # Strike prices
40
40
 
41
41
  # Precompute differentials for integration
42
42
  dx = LM[1] - LM[0]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: voly
3
- Version: 0.0.211
3
+ Version: 0.0.213
4
4
  Summary: Options & volatility research package
5
5
  Author-email: Manu de Cara <manu.de.cara@gmail.com>
6
6
  License: MIT
@@ -6,15 +6,15 @@ voly/models.py,sha256=tcilQxvUwObN41ar0j3pBmsw9Q5ddFRIa_LvrqNPx3Q,9305
6
6
  voly/core/__init__.py,sha256=bu6fS2I1Pj9fPPnl-zY3L7NqrZSY5Zy6NY2uMUvdhKs,183
7
7
  voly/core/charts.py,sha256=2S-BfCo30aj1_xlNLqF-za5rQWxF_mWKIdtdOe5bgbw,12735
8
8
  voly/core/data.py,sha256=SNF87C7-r-1IbKwf7rAhXkJ6X305yo7fCDJDdkwz3NM,14103
9
- voly/core/fit.py,sha256=Iz-khsr4KrM3KUheJX7iHWUDbAzueSZvqjt47BGYZig,14024
9
+ voly/core/fit.py,sha256=XlqMfVC4EUC0YmmQU-Za_4SSVoQsa6ndT6AWXgdWVFU,14192
10
10
  voly/core/hd.py,sha256=UFAyLncNUHivpPAcko6IK1bC55mudVtdlRFfXp63HXE,14771
11
11
  voly/core/interpolate.py,sha256=JkK172-FXyhesW3hY4pEeuJWG3Bugq7QZXbeKoRpLuo,5305
12
12
  voly/core/rnd.py,sha256=GoC3m1Q46Wnk5tV_mstr-3_aktHeue6BBLh4DQTciW0,13307
13
13
  voly/utils/__init__.py,sha256=E05mWatyC-PDOsCxQV1p5Xi1IgpOomxrNURyCx_gB-w,200
14
- voly/utils/density.py,sha256=q0fX4im9TGwMCZ32Hzdv8CNh56KnJo8bmG5w0gVWZH8,5879
14
+ voly/utils/density.py,sha256=ONpRli-IaJDgOZ2sb27HHFc9_tkkGSATKl94JODd86A,5879
15
15
  voly/utils/logger.py,sha256=4-_2bVJmq17Q0d7Rd2mPg1AeR8gxv6EPvcmBDMFWcSM,1744
16
- voly-0.0.211.dist-info/licenses/LICENSE,sha256=wcHIVbE12jfcBOai_wqBKY6xvNQU5E909xL1zZNq_2Q,1065
17
- voly-0.0.211.dist-info/METADATA,sha256=YbOkH_HMI6I8EqazfJcyIryx-JXBmksBXYaARw8sE0Y,4115
18
- voly-0.0.211.dist-info/WHEEL,sha256=pxyMxgL8-pra_rKaQ4drOZAegBVuX-G_4nRHjjgWbmo,91
19
- voly-0.0.211.dist-info/top_level.txt,sha256=ZfLw2sSxF-LrKAkgGjOmeTcw6_gD-30zvtdEY5W4B7c,5
20
- voly-0.0.211.dist-info/RECORD,,
16
+ voly-0.0.213.dist-info/licenses/LICENSE,sha256=wcHIVbE12jfcBOai_wqBKY6xvNQU5E909xL1zZNq_2Q,1065
17
+ voly-0.0.213.dist-info/METADATA,sha256=DRsNILEmUVwj9Z96uqqGxfxtC11tap8sHmiaTdfbbxY,4115
18
+ voly-0.0.213.dist-info/WHEEL,sha256=pxyMxgL8-pra_rKaQ4drOZAegBVuX-G_4nRHjjgWbmo,91
19
+ voly-0.0.213.dist-info/top_level.txt,sha256=ZfLw2sSxF-LrKAkgGjOmeTcw6_gD-30zvtdEY5W4B7c,5
20
+ voly-0.0.213.dist-info/RECORD,,
File without changes