voly 0.0.163__py3-none-any.whl → 0.0.165__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/formulas.py CHANGED
@@ -2,6 +2,7 @@
2
2
  Option pricing formulas and general calculations.
3
3
  """
4
4
 
5
+ import pandas as pd
5
6
  import numpy as np
6
7
  from scipy.stats import norm
7
8
  from py_vollib.black_scholes.implied_volatility import implied_volatility
@@ -223,6 +224,8 @@ def iv(option_price: float, s: float, K: float, r: float, t: float,
223
224
  Returns:
224
225
  - Implied volatility
225
226
  """
227
+
228
+ '''
226
229
  # Check if option price is within theoretical bounds
227
230
  if option_type.lower() in ["call", "c"]:
228
231
  intrinsic = max(0, s - K * np.exp(-r * t))
@@ -236,7 +239,7 @@ def iv(option_price: float, s: float, K: float, r: float, t: float,
236
239
  return np.nan # Price below intrinsic value
237
240
  if option_price >= K:
238
241
  return np.inf # Price exceeds strike
239
-
242
+ '''
240
243
  flag = 'c' if option_type.lower() in ["call", "c"] else 'p'
241
244
 
242
245
  iv_value = implied_volatility(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: voly
3
- Version: 0.0.163
3
+ Version: 0.0.165
4
4
  Summary: Options & volatility research package
5
5
  Author-email: Manu de Cara <manu.de.cara@gmail.com>
6
6
  License: MIT
@@ -1,7 +1,7 @@
1
1
  voly/__init__.py,sha256=8xyDk7rFCn_MOD5hxuv5cxxKZvBVRiSIM7TgaMPpwpw,211
2
2
  voly/client.py,sha256=-yE1_cBvjkK-BO_kKCYtn4WPbNOhAzT0hsfykU5LvQQ,14761
3
3
  voly/exceptions.py,sha256=PBsbn1vNMvKcCJwwJ4lBO6glD85jo1h2qiEmD7ArAjs,92
4
- voly/formulas.py,sha256=yClxKgwOAOpTvTANTkivf2JlGh0WDwjMzkm3JPgBVbQ,11188
4
+ voly/formulas.py,sha256=rpIyMwz8WvK22dtnzOSw2J9omjrVj1yJjG44_3JZZE8,11224
5
5
  voly/models.py,sha256=o-pHujGfr5Gn8ItckMzLI4Q8yaX9FQaV8UjCxv2zgTY,3364
6
6
  voly/core/__init__.py,sha256=bu6fS2I1Pj9fPPnl-zY3L7NqrZSY5Zy6NY2uMUvdhKs,183
7
7
  voly/core/charts.py,sha256=E21OZB5lTY4YL2flgaFJ6s5g3_ExtAQT2zryZZxLPyM,12735
@@ -13,8 +13,8 @@ voly/core/rnd.py,sha256=GoC3m1Q46Wnk5tV_mstr-3_aktHeue6BBLh4DQTciW0,13307
13
13
  voly/utils/__init__.py,sha256=E05mWatyC-PDOsCxQV1p5Xi1IgpOomxrNURyCx_gB-w,200
14
14
  voly/utils/density.py,sha256=q0fX4im9TGwMCZ32Hzdv8CNh56KnJo8bmG5w0gVWZH8,5879
15
15
  voly/utils/logger.py,sha256=4-_2bVJmq17Q0d7Rd2mPg1AeR8gxv6EPvcmBDMFWcSM,1744
16
- voly-0.0.163.dist-info/licenses/LICENSE,sha256=wcHIVbE12jfcBOai_wqBKY6xvNQU5E909xL1zZNq_2Q,1065
17
- voly-0.0.163.dist-info/METADATA,sha256=x5afx6En4M8gw3RIQGJLmSMavZl5J_bhUiJibLtyNX0,4115
18
- voly-0.0.163.dist-info/WHEEL,sha256=lTU6B6eIfYoiQJTZNc-fyaR6BpL6ehTzU3xGYxn2n8k,91
19
- voly-0.0.163.dist-info/top_level.txt,sha256=ZfLw2sSxF-LrKAkgGjOmeTcw6_gD-30zvtdEY5W4B7c,5
20
- voly-0.0.163.dist-info/RECORD,,
16
+ voly-0.0.165.dist-info/licenses/LICENSE,sha256=wcHIVbE12jfcBOai_wqBKY6xvNQU5E909xL1zZNq_2Q,1065
17
+ voly-0.0.165.dist-info/METADATA,sha256=wIA3r_Rk8BbWUUSTiFsuc12wY1WfOWYLXiP-qJCkri8,4115
18
+ voly-0.0.165.dist-info/WHEEL,sha256=lTU6B6eIfYoiQJTZNc-fyaR6BpL6ehTzU3xGYxn2n8k,91
19
+ voly-0.0.165.dist-info/top_level.txt,sha256=ZfLw2sSxF-LrKAkgGjOmeTcw6_gD-30zvtdEY5W4B7c,5
20
+ voly-0.0.165.dist-info/RECORD,,
File without changes