voly 0.0.158__py3-none-any.whl → 0.0.159__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
@@ -245,14 +245,19 @@ def iv(option_price: float, s: float, K: float, r: float, t: float,
245
245
  return np.inf # Price exceeds strike
246
246
 
247
247
  flag = 'c' if option_type.lower() in ["call", "c"] else 'p'
248
- iv_value = implied_volatility(
249
- price=option_price,
250
- S=s,
251
- K=K,
252
- t=t,
253
- r=r,
254
- flag=flag
255
- )
248
+
249
+ try:
250
+ iv_value = implied_volatility(
251
+ price=option_price,
252
+ S=s,
253
+ K=K,
254
+ t=t,
255
+ r=r,
256
+ flag=flag
257
+ )
258
+ except:
259
+ iv_value = 5.0 # max iv allowed
260
+
256
261
  return iv_value
257
262
 
258
263
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: voly
3
- Version: 0.0.158
3
+ Version: 0.0.159
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=oXttz6cnn1a_WXBVIl4n38XdGUsd4ZSM4Dg6hM1tUG8,10722
4
+ voly/formulas.py,sha256=QEwl3l8R0LJbktm9vflJeMhL8-UBdq8W8NzoPx71Ayg,10818
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.158.dist-info/licenses/LICENSE,sha256=wcHIVbE12jfcBOai_wqBKY6xvNQU5E909xL1zZNq_2Q,1065
17
- voly-0.0.158.dist-info/METADATA,sha256=GkUeHlcZ1_2FLecO_vu1FX5_aGC5HqzTwwLQ1BnK_Cc,4115
18
- voly-0.0.158.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
19
- voly-0.0.158.dist-info/top_level.txt,sha256=ZfLw2sSxF-LrKAkgGjOmeTcw6_gD-30zvtdEY5W4B7c,5
20
- voly-0.0.158.dist-info/RECORD,,
16
+ voly-0.0.159.dist-info/licenses/LICENSE,sha256=wcHIVbE12jfcBOai_wqBKY6xvNQU5E909xL1zZNq_2Q,1065
17
+ voly-0.0.159.dist-info/METADATA,sha256=fZdgIs_6QxUT662ba0xHz8Z3_OgVLao65bgRa1eWynY,4115
18
+ voly-0.0.159.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
19
+ voly-0.0.159.dist-info/top_level.txt,sha256=ZfLw2sSxF-LrKAkgGjOmeTcw6_gD-30zvtdEY5W4B7c,5
20
+ voly-0.0.159.dist-info/RECORD,,
File without changes