voly 0.0.256__py3-none-any.whl → 0.0.258__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 +1 -1
- voly/core/charts.py +6 -4
- {voly-0.0.256.dist-info → voly-0.0.258.dist-info}/METADATA +1 -1
- {voly-0.0.256.dist-info → voly-0.0.258.dist-info}/RECORD +7 -7
- {voly-0.0.256.dist-info → voly-0.0.258.dist-info}/WHEEL +0 -0
- {voly-0.0.256.dist-info → voly-0.0.258.dist-info}/licenses/LICENSE +0 -0
- {voly-0.0.256.dist-info → voly-0.0.258.dist-info}/top_level.txt +0 -0
voly/client.py
CHANGED
@@ -239,7 +239,7 @@ class VolyClient:
|
|
239
239
|
# Create missing domains
|
240
240
|
option_chain['log_moneyness'] = np.log(option_chain['strikes'] / option_chain['spot_price'].iloc[0])
|
241
241
|
option_chain['moneyness'] = np.exp(option_chain['log_moneyness'])
|
242
|
-
option_chain['returns'] =
|
242
|
+
option_chain['returns'] = option_chain['moneyness'] - 1
|
243
243
|
|
244
244
|
# Plot volatility smiles
|
245
245
|
plots['smiles'] = plot_all_smiles(
|
voly/core/charts.py
CHANGED
@@ -38,6 +38,7 @@ def plot_volatility_smile(x_array: np.ndarray,
|
|
38
38
|
Returns:
|
39
39
|
- Plotly figure
|
40
40
|
"""
|
41
|
+
|
41
42
|
# Map domain types to axis labels
|
42
43
|
domain_labels = {
|
43
44
|
'log_moneyness': 'Log Moneyness',
|
@@ -62,6 +63,7 @@ def plot_volatility_smile(x_array: np.ndarray,
|
|
62
63
|
|
63
64
|
# Add market data if provided
|
64
65
|
if option_chain is not None and maturity is not None:
|
66
|
+
currency = option_chain['currency'].iloc[0]
|
65
67
|
maturity_data = option_chain[option_chain['maturity'] == maturity]
|
66
68
|
if return_domain == 'delta':
|
67
69
|
maturity_data = maturity_data[maturity_data['flag'] == 'C']
|
@@ -80,9 +82,9 @@ def plot_volatility_smile(x_array: np.ndarray,
|
|
80
82
|
)
|
81
83
|
)
|
82
84
|
|
83
|
-
title = f'Vol Smile for {maturity}'
|
85
|
+
title = f'{currency} - Vol Smile for {maturity}'
|
84
86
|
else:
|
85
|
-
title = f'Vol Smile for {maturity}'
|
87
|
+
title = f'{currency} - Vol Smile for {maturity}'
|
86
88
|
else:
|
87
89
|
title = 'Volatility Smile'
|
88
90
|
|
@@ -182,7 +184,7 @@ def plot_raw_parameters(fit_results: pd.DataFrame) -> go.Figure:
|
|
182
184
|
|
183
185
|
# Update layout
|
184
186
|
fig.update_layout(
|
185
|
-
title='Raw SVI Parameters Across
|
187
|
+
title='Raw SVI Parameters Across Maturities',
|
186
188
|
template='plotly_dark',
|
187
189
|
showlegend=False
|
188
190
|
)
|
@@ -245,7 +247,7 @@ def plot_jw_parameters(fit_results: pd.DataFrame) -> go.Figure:
|
|
245
247
|
|
246
248
|
# Update layout
|
247
249
|
fig.update_layout(
|
248
|
-
title='Jump-Wing Parameters Across
|
250
|
+
title='Jump-Wing Parameters Across Maturities',
|
249
251
|
template='plotly_dark',
|
250
252
|
showlegend=False
|
251
253
|
)
|
@@ -1,10 +1,10 @@
|
|
1
1
|
voly/__init__.py,sha256=8xyDk7rFCn_MOD5hxuv5cxxKZvBVRiSIM7TgaMPpwpw,211
|
2
|
-
voly/client.py,sha256=
|
2
|
+
voly/client.py,sha256=FKkRkUdxZfPjrJZBX3J2nqKlE7YjQkdI9eqtrgatIDg,14553
|
3
3
|
voly/exceptions.py,sha256=PBsbn1vNMvKcCJwwJ4lBO6glD85jo1h2qiEmD7ArAjs,92
|
4
4
|
voly/formulas.py,sha256=5DupVzJuPtnkfbhIq05ciNXb6S6o4Cd33wqG-ahf4bc,10015
|
5
5
|
voly/models.py,sha256=CGJQr13Uie7iwtx2hjViN9lMXeRN_uOqzp4u8NPaTlA,9282
|
6
6
|
voly/core/__init__.py,sha256=bu6fS2I1Pj9fPPnl-zY3L7NqrZSY5Zy6NY2uMUvdhKs,183
|
7
|
-
voly/core/charts.py,sha256=
|
7
|
+
voly/core/charts.py,sha256=W_6yhJrfPGjOev8PjDZRv_SAw2wUovhYAsF6ZDdGgxY,12718
|
8
8
|
voly/core/data.py,sha256=A0zrIjg-pf3mG28UR313Bc57h74G5smWCVBB7vysM_4,13527
|
9
9
|
voly/core/fit.py,sha256=G5ooc47QxAcoVWunU8990TLH3gOigkDA5vSRtPG-mXA,14010
|
10
10
|
voly/core/hd.py,sha256=dSv197RmSWFWbRRdoBzMrD_poT7ZiJ8hdD_wKE-Li_M,13559
|
@@ -13,8 +13,8 @@ voly/core/rnd.py,sha256=wiZ5OIjPDf1Th5_sQ9CZG5JgAo3EL8f63T_Rj1_VP-0,13214
|
|
13
13
|
voly/utils/__init__.py,sha256=E05mWatyC-PDOsCxQV1p5Xi1IgpOomxrNURyCx_gB-w,200
|
14
14
|
voly/utils/density.py,sha256=ONpRli-IaJDgOZ2sb27HHFc9_tkkGSATKl94JODd86A,5879
|
15
15
|
voly/utils/logger.py,sha256=4-_2bVJmq17Q0d7Rd2mPg1AeR8gxv6EPvcmBDMFWcSM,1744
|
16
|
-
voly-0.0.
|
17
|
-
voly-0.0.
|
18
|
-
voly-0.0.
|
19
|
-
voly-0.0.
|
20
|
-
voly-0.0.
|
16
|
+
voly-0.0.258.dist-info/licenses/LICENSE,sha256=wcHIVbE12jfcBOai_wqBKY6xvNQU5E909xL1zZNq_2Q,1065
|
17
|
+
voly-0.0.258.dist-info/METADATA,sha256=I_HoPsqXLW1-u4nUQNCAlkiruiNIm9FJaA2Ova0Sb6Q,4115
|
18
|
+
voly-0.0.258.dist-info/WHEEL,sha256=ck4Vq1_RXyvS4Jt6SI0Vz6fyVs4GWg7AINwpsaGEgPE,91
|
19
|
+
voly-0.0.258.dist-info/top_level.txt,sha256=ZfLw2sSxF-LrKAkgGjOmeTcw6_gD-30zvtdEY5W4B7c,5
|
20
|
+
voly-0.0.258.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|