voly 0.0.43__py3-none-any.whl → 0.0.44__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
@@ -36,7 +36,8 @@ def vectorize_inputs(func):
36
36
 
37
37
  @catch_exception
38
38
  @vectorize_inputs
39
- def d1(s: float, k: float, r: float, vol: float, t: float) -> float:
39
+ def d1(s: float, k: float, r: float, vol: float, t: float, option_type: str = 'call') -> float:
40
+ # option_type is ignored in this function but included for compatibility
40
41
  if vol <= 0 or t <= 0:
41
42
  return np.nan
42
43
  return (np.log(s / k) + (r + vol * vol / 2) * t) / (vol * np.sqrt(t))
@@ -44,10 +45,11 @@ def d1(s: float, k: float, r: float, vol: float, t: float) -> float:
44
45
 
45
46
  @catch_exception
46
47
  @vectorize_inputs
47
- def d2(s: float, k: float, r: float, vol: float, t: float) -> float:
48
+ def d2(s: float, k: float, r: float, vol: float, t: float, option_type: str = 'call') -> float:
49
+ # option_type is ignored in this function but included for compatibility
48
50
  if vol <= 0 or t <= 0:
49
51
  return np.nan
50
- return d1(s, k, r, vol, t) - vol * np.sqrt(t)
52
+ return d1(s, k, r, vol, t, option_type) - vol * np.sqrt(t)
51
53
 
52
54
 
53
55
  @catch_exception
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: voly
3
- Version: 0.0.43
3
+ Version: 0.0.44
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=8nBT2cbjSCYn9Qf1xEFMifmlggkg7BI9ANFVNhHYKUI,19171
3
3
  voly/exceptions.py,sha256=PBsbn1vNMvKcCJwwJ4lBO6glD85jo1h2qiEmD7ArAjs,92
4
- voly/formulas.py,sha256=FvxDNtian6bUvQdFbHEa1pGuhmsqyyW8wJ_4dwVQjKg,8320
4
+ voly/formulas.py,sha256=vk00FVVtdxPz2sL89fK-6q9WW-rqyjVhwbPPLiZGaIU,8541
5
5
  voly/models.py,sha256=YJ12aamLz_-aOni4Qm0_XV9u4bjKK3vfJz0J2gc1h0o,3565
6
6
  voly/core/__init__.py,sha256=bu6fS2I1Pj9fPPnl-zY3L7NqrZSY5Zy6NY2uMUvdhKs,183
7
7
  voly/core/charts.py,sha256=T8cogkiHj8NcFxfARumNvAjLJUAxsMlHUOVgshwjye8,26474
@@ -11,8 +11,8 @@ voly/core/interpolate.py,sha256=ztVIePJZOh-CIbn69wkh1JW2rKywNe2FEewRN0zcSAo,8185
11
11
  voly/core/rnd.py,sha256=8FTU-Qp9epW9yE4XSOdiFGIRXrGyXqF6mVgZn1NMvxk,11813
12
12
  voly/utils/__init__.py,sha256=E05mWatyC-PDOsCxQV1p5Xi1IgpOomxrNURyCx_gB-w,200
13
13
  voly/utils/logger.py,sha256=4-_2bVJmq17Q0d7Rd2mPg1AeR8gxv6EPvcmBDMFWcSM,1744
14
- voly-0.0.43.dist-info/LICENSE,sha256=wcHIVbE12jfcBOai_wqBKY6xvNQU5E909xL1zZNq_2Q,1065
15
- voly-0.0.43.dist-info/METADATA,sha256=4-qY6hJJ4KWuDmGLkqTAbWVihwrWfoUF6Wm7KU8rh3U,4092
16
- voly-0.0.43.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
17
- voly-0.0.43.dist-info/top_level.txt,sha256=ZfLw2sSxF-LrKAkgGjOmeTcw6_gD-30zvtdEY5W4B7c,5
18
- voly-0.0.43.dist-info/RECORD,,
14
+ voly-0.0.44.dist-info/LICENSE,sha256=wcHIVbE12jfcBOai_wqBKY6xvNQU5E909xL1zZNq_2Q,1065
15
+ voly-0.0.44.dist-info/METADATA,sha256=hKSBZrDxJeHiUbguAQ0Bmq98DXwUc-SE5a3TVPs8HQo,4092
16
+ voly-0.0.44.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
17
+ voly-0.0.44.dist-info/top_level.txt,sha256=ZfLw2sSxF-LrKAkgGjOmeTcw6_gD-30zvtdEY5W4B7c,5
18
+ voly-0.0.44.dist-info/RECORD,,
File without changes
File without changes