voly 0.0.83__py3-none-any.whl → 0.0.85__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/client.py +3 -3
- voly/core/fit.py +8 -8
- {voly-0.0.83.dist-info → voly-0.0.85.dist-info}/METADATA +1 -1
- {voly-0.0.83.dist-info → voly-0.0.85.dist-info}/RECORD +7 -7
- {voly-0.0.83.dist-info → voly-0.0.85.dist-info}/LICENSE +0 -0
- {voly-0.0.83.dist-info → voly-0.0.85.dist-info}/WHEEL +0 -0
- {voly-0.0.83.dist-info → voly-0.0.85.dist-info}/top_level.txt +0 -0
voly/client.py
CHANGED
|
@@ -348,7 +348,7 @@ class VolyClient:
|
|
|
348
348
|
return fit_results
|
|
349
349
|
|
|
350
350
|
@staticmethod
|
|
351
|
-
def get_iv_surface(
|
|
351
|
+
def get_iv_surface(model_results: pd.DataFrame,
|
|
352
352
|
log_moneyness_params: Tuple[float, float, int] = (-2, 2, 500),
|
|
353
353
|
return_domain: str = 'log_moneyness',
|
|
354
354
|
) -> Dict[str, Any]:
|
|
@@ -356,7 +356,7 @@ class VolyClient:
|
|
|
356
356
|
Generate implied volatility surface using optimized SVI parameters.
|
|
357
357
|
|
|
358
358
|
Parameters:
|
|
359
|
-
-
|
|
359
|
+
- model_results: DataFrame from fit_model() or interpolate_model()
|
|
360
360
|
- log_moneyness_params: Tuple of (min, max, num_points) for the moneyness grid
|
|
361
361
|
- return_domain: str Domain for x-axis values ('log_moneyness', 'moneyness', 'strikes', 'delta')
|
|
362
362
|
|
|
@@ -365,7 +365,7 @@ class VolyClient:
|
|
|
365
365
|
"""
|
|
366
366
|
# Generate the surface
|
|
367
367
|
iv_surface, x_surface = get_iv_surface(
|
|
368
|
-
|
|
368
|
+
model_results=model_results,
|
|
369
369
|
log_moneyness_params=log_moneyness_params,
|
|
370
370
|
return_domain=return_domain
|
|
371
371
|
)
|
voly/core/fit.py
CHANGED
|
@@ -223,13 +223,13 @@ def get_iv_surface(model_results: pd.DataFrame,
|
|
|
223
223
|
for i in model_results.index:
|
|
224
224
|
# Calculate SVI total implied variance and convert to IV
|
|
225
225
|
params = [
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
226
|
+
model_results.loc[i, 'a'],
|
|
227
|
+
model_results.loc[i, 'b'],
|
|
228
|
+
model_results.loc[i, 'sigma'],
|
|
229
|
+
model_results.loc[i, 'rho'],
|
|
230
|
+
model_results.loc[i, 'm']
|
|
231
231
|
]
|
|
232
|
-
ytm =
|
|
232
|
+
ytm = model_results.loc[i, 'ytm']
|
|
233
233
|
|
|
234
234
|
# Calculate implied volatility
|
|
235
235
|
w_svi = np.array([SVIModel.svi(x, *params) for x in log_moneyness_array])
|
|
@@ -240,8 +240,8 @@ def get_iv_surface(model_results: pd.DataFrame,
|
|
|
240
240
|
x_surface[maturity] = get_x_domain(
|
|
241
241
|
log_moneyness_params=log_moneyness_params,
|
|
242
242
|
return_domain=return_domain,
|
|
243
|
-
s=
|
|
244
|
-
r=
|
|
243
|
+
s=model_results.loc[i, 's'],
|
|
244
|
+
r=model_results.loc[i, 'r'],
|
|
245
245
|
iv_array=iv_array,
|
|
246
246
|
ytm=ytm
|
|
247
247
|
)
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
voly/__init__.py,sha256=8xyDk7rFCn_MOD5hxuv5cxxKZvBVRiSIM7TgaMPpwpw,211
|
|
2
|
-
voly/client.py,sha256=
|
|
2
|
+
voly/client.py,sha256=ABScTJhB-KXjv3ddJ6XEoSIt9DB4Z40TzH8GGalrox8,21859
|
|
3
3
|
voly/exceptions.py,sha256=PBsbn1vNMvKcCJwwJ4lBO6glD85jo1h2qiEmD7ArAjs,92
|
|
4
4
|
voly/formulas.py,sha256=wSbGAH6GuQThT9QyQY4Ud2eUf9fo1YFHglUmP6fNris,11871
|
|
5
5
|
voly/models.py,sha256=LXXIlpXZQEfXTuCngxC8Hd3bWtw6wdXDCSGxTLmHM-c,3659
|
|
6
6
|
voly/core/__init__.py,sha256=bu6fS2I1Pj9fPPnl-zY3L7NqrZSY5Zy6NY2uMUvdhKs,183
|
|
7
7
|
voly/core/charts.py,sha256=ycZgbPeROYVRMO61auVXCGLmKZA2NwS3vLOsQ9wqCyo,27526
|
|
8
8
|
voly/core/data.py,sha256=JCPD44UDSJqh83jjapAtXVpJEHm8Hq4JC8lVhl5Zb4A,8935
|
|
9
|
-
voly/core/fit.py,sha256=
|
|
9
|
+
voly/core/fit.py,sha256=2ibaVhObfW9neu1k5pKxaA9h0vos6xJS1e78b9NFz9w,9565
|
|
10
10
|
voly/core/interpolate.py,sha256=BzLwEuE-PIf0k0oVka7gH6NASlaEdtZAo7zUVwarkoQ,5384
|
|
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.
|
|
15
|
-
voly-0.0.
|
|
16
|
-
voly-0.0.
|
|
17
|
-
voly-0.0.
|
|
18
|
-
voly-0.0.
|
|
14
|
+
voly-0.0.85.dist-info/LICENSE,sha256=wcHIVbE12jfcBOai_wqBKY6xvNQU5E909xL1zZNq_2Q,1065
|
|
15
|
+
voly-0.0.85.dist-info/METADATA,sha256=vFSYiXJ7a6y3WphjwkFKh9r4rLxj_BKz-THyNbq63Jk,4092
|
|
16
|
+
voly-0.0.85.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
|
|
17
|
+
voly-0.0.85.dist-info/top_level.txt,sha256=ZfLw2sSxF-LrKAkgGjOmeTcw6_gD-30zvtdEY5W4B7c,5
|
|
18
|
+
voly-0.0.85.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|