voly 0.0.168__py3-none-any.whl → 0.0.170__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/models.py CHANGED
@@ -46,6 +46,21 @@ class SVIModel:
46
46
  def svi(LM: float, a: float, b: float, sigma: float, rho: float, m: float) -> float:
47
47
  return a + b * (rho * (LM - m) + np.sqrt((LM - m) ** 2 + sigma ** 2))
48
48
 
49
+ @staticmethod
50
+ def svi_d(LM: float, a: float, b: float, sigma: float, rho: float, m: float) -> float:
51
+ """Calculate first derivative of SVI function with respect to log-moneyness."""
52
+ return b * (rho + ((LM - m) / np.sqrt((LM - m) ** 2 + sigma ** 2)))
53
+
54
+ @staticmethod
55
+ def svi_dd(LM: float, a: float, b: float, sigma: float, rho: float, m: float) -> float:
56
+ """Calculate second derivative of SVI function with respect to log-moneyness."""
57
+ return b * sigma ** 2 / ((LM - m) ** 2 + sigma ** 2) ** 1.5
58
+
59
+ @staticmethod
60
+ def svi_min_strike(sigma: float, rho: float, m: float) -> float:
61
+ """Calculate the minimum valid log-strike for this SVI parameterization."""
62
+ return m - ((sigma * rho) / np.sqrt(1 - rho ** 2))
63
+
49
64
  @staticmethod
50
65
  def raw_to_jw_params(a: float, b: float, m: float, rho: float, sigma: float, t: float) -> Tuple[
51
66
  float, float, float, float, float]:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: voly
3
- Version: 0.0.168
3
+ Version: 0.0.170
4
4
  Summary: Options & volatility research package
5
5
  Author-email: Manu de Cara <manu.de.cara@gmail.com>
6
6
  License: MIT
@@ -2,7 +2,7 @@ voly/__init__.py,sha256=8xyDk7rFCn_MOD5hxuv5cxxKZvBVRiSIM7TgaMPpwpw,211
2
2
  voly/client.py,sha256=6e9cX5JWeqoTIktKlT4yEN9FG5Cj8Icl7gHxhVayi24,14464
3
3
  voly/exceptions.py,sha256=PBsbn1vNMvKcCJwwJ4lBO6glD85jo1h2qiEmD7ArAjs,92
4
4
  voly/formulas.py,sha256=eDPw32xa3dwCIrE-zeZzznfGaplGFoVcA167uQngZ70,11209
5
- voly/models.py,sha256=f97VvGwzpzSXuDtXqdjSHL1RbzOaYajXc9cRH8WbXtk,7968
5
+ voly/models.py,sha256=wj4s0YzktsXpSUW1H-HroN9r4xaD5zCrDtOnQBRh1iA,8741
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=9v9iuE2XdIIlzoRAB7q1ol7YghBzBsPGAiwZ11oDuis,13650
@@ -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.168.dist-info/licenses/LICENSE,sha256=wcHIVbE12jfcBOai_wqBKY6xvNQU5E909xL1zZNq_2Q,1065
17
- voly-0.0.168.dist-info/METADATA,sha256=OU3Zv1OJ2JfYjlUr5HHX3Tbh3MLmeMIyQup_AOee8p4,4115
18
- voly-0.0.168.dist-info/WHEEL,sha256=pxyMxgL8-pra_rKaQ4drOZAegBVuX-G_4nRHjjgWbmo,91
19
- voly-0.0.168.dist-info/top_level.txt,sha256=ZfLw2sSxF-LrKAkgGjOmeTcw6_gD-30zvtdEY5W4B7c,5
20
- voly-0.0.168.dist-info/RECORD,,
16
+ voly-0.0.170.dist-info/licenses/LICENSE,sha256=wcHIVbE12jfcBOai_wqBKY6xvNQU5E909xL1zZNq_2Q,1065
17
+ voly-0.0.170.dist-info/METADATA,sha256=JkWwvCtpnb8HVeR-l7CLvz17DMbfa5Kb5oMdczQXfKw,4115
18
+ voly-0.0.170.dist-info/WHEEL,sha256=pxyMxgL8-pra_rKaQ4drOZAegBVuX-G_4nRHjjgWbmo,91
19
+ voly-0.0.170.dist-info/top_level.txt,sha256=ZfLw2sSxF-LrKAkgGjOmeTcw6_gD-30zvtdEY5W4B7c,5
20
+ voly-0.0.170.dist-info/RECORD,,
File without changes