voly 0.0.203__py3-none-any.whl → 0.0.204__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/core/charts.py +1 -1
- voly/core/data.py +12 -3
- {voly-0.0.203.dist-info → voly-0.0.204.dist-info}/METADATA +1 -1
- {voly-0.0.203.dist-info → voly-0.0.204.dist-info}/RECORD +7 -7
- {voly-0.0.203.dist-info → voly-0.0.204.dist-info}/WHEEL +0 -0
- {voly-0.0.203.dist-info → voly-0.0.204.dist-info}/licenses/LICENSE +0 -0
- {voly-0.0.203.dist-info → voly-0.0.204.dist-info}/top_level.txt +0 -0
voly/core/charts.py
CHANGED
@@ -68,7 +68,7 @@ def plot_volatility_smile(x_array: np.ndarray,
|
|
68
68
|
|
69
69
|
if not maturity_data.empty:
|
70
70
|
# Add bid and ask IVs if available
|
71
|
-
for iv_type in ['
|
71
|
+
for iv_type in ['bid_iv', 'ask_iv']:
|
72
72
|
if iv_type in maturity_data.columns:
|
73
73
|
fig.add_trace(
|
74
74
|
go.Scatter(
|
voly/core/data.py
CHANGED
@@ -198,9 +198,11 @@ def process_option_chain(df: pd.DataFrame, currency: str) -> pd.DataFrame:
|
|
198
198
|
|
199
199
|
# Apply extraction to create new columns
|
200
200
|
splits = df['instrument_name'].str.split('-')
|
201
|
-
df['currency'] = splits.str[0]
|
202
201
|
df['maturity_name'] = splits.str[1]
|
203
|
-
|
202
|
+
if currency == 'XRP':
|
203
|
+
df['strikes'] = splits.str[2].str.replace('d', '.', regex=False).astype(float)
|
204
|
+
else:
|
205
|
+
df['strikes'] = splits.str[2].astype(float)
|
204
206
|
df['option_type'] = splits.str[3]
|
205
207
|
|
206
208
|
# Create maturity date at 8:00 AM UTC
|
@@ -356,7 +358,14 @@ async def fetch_option_chain(exchange: str = 'deribit',
|
|
356
358
|
raise VolyError(f"Exchange '{exchange}' is not supported. Currently only 'deribit' is available.")
|
357
359
|
|
358
360
|
# Get raw data
|
359
|
-
|
361
|
+
if currency not in ['BTC', 'ETH']:
|
362
|
+
new_currency = 'USDC'
|
363
|
+
raw_data = await get_deribit_data(currency=new_currency)
|
364
|
+
raw_data['currency'] = raw_data['instrument_name'].str.split('-').str[0].str.split('_').str[0]
|
365
|
+
raw_data = raw_data[raw_data['currency'] == currency]
|
366
|
+
else:
|
367
|
+
raw_data = await get_deribit_data(currency=currency)
|
368
|
+
raw_data['currency'] = currency
|
360
369
|
|
361
370
|
# Process data
|
362
371
|
processed_data = process_option_chain(raw_data, currency)
|
@@ -4,8 +4,8 @@ voly/exceptions.py,sha256=PBsbn1vNMvKcCJwwJ4lBO6glD85jo1h2qiEmD7ArAjs,92
|
|
4
4
|
voly/formulas.py,sha256=JnEs6G0wlfRNH6X_YEJMe2RtLH-ryhzufjsim73Bj3c,11176
|
5
5
|
voly/models.py,sha256=Wop6gZbvAOXSmI0JpYapjVSeJub_i8RLif2PzxRsfFE,7185
|
6
6
|
voly/core/__init__.py,sha256=bu6fS2I1Pj9fPPnl-zY3L7NqrZSY5Zy6NY2uMUvdhKs,183
|
7
|
-
voly/core/charts.py,sha256=
|
8
|
-
voly/core/data.py,sha256=
|
7
|
+
voly/core/charts.py,sha256=2S-BfCo30aj1_xlNLqF-za5rQWxF_mWKIdtdOe5bgbw,12735
|
8
|
+
voly/core/data.py,sha256=s2XzV72YC19QJjZAng_G2QZ0_FJvg9E2I-dV4Of3EK8,14095
|
9
9
|
voly/core/fit.py,sha256=Ya2g8tNHw_5QFqD66_U4b7z18iWYSF-q_SBeRqBSjU8,17443
|
10
10
|
voly/core/hd.py,sha256=UFAyLncNUHivpPAcko6IK1bC55mudVtdlRFfXp63HXE,14771
|
11
11
|
voly/core/interpolate.py,sha256=JkK172-FXyhesW3hY4pEeuJWG3Bugq7QZXbeKoRpLuo,5305
|
@@ -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.
|
17
|
-
voly-0.0.
|
18
|
-
voly-0.0.
|
19
|
-
voly-0.0.
|
20
|
-
voly-0.0.
|
16
|
+
voly-0.0.204.dist-info/licenses/LICENSE,sha256=wcHIVbE12jfcBOai_wqBKY6xvNQU5E909xL1zZNq_2Q,1065
|
17
|
+
voly-0.0.204.dist-info/METADATA,sha256=NryL9Zo0j6JzL6VYoM_Zb7GQjWTCs5UAcd9W7IOvUAk,4115
|
18
|
+
voly-0.0.204.dist-info/WHEEL,sha256=pxyMxgL8-pra_rKaQ4drOZAegBVuX-G_4nRHjjgWbmo,91
|
19
|
+
voly-0.0.204.dist-info/top_level.txt,sha256=ZfLw2sSxF-LrKAkgGjOmeTcw6_gD-30zvtdEY5W4B7c,5
|
20
|
+
voly-0.0.204.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|