voly 0.0.203__tar.gz → 0.0.204__tar.gz

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.
Files changed (26) hide show
  1. {voly-0.0.203/src/voly.egg-info → voly-0.0.204}/PKG-INFO +1 -1
  2. {voly-0.0.203 → voly-0.0.204}/pyproject.toml +2 -2
  3. {voly-0.0.203 → voly-0.0.204}/src/voly/core/charts.py +1 -1
  4. {voly-0.0.203 → voly-0.0.204}/src/voly/core/data.py +12 -3
  5. {voly-0.0.203 → voly-0.0.204/src/voly.egg-info}/PKG-INFO +1 -1
  6. {voly-0.0.203 → voly-0.0.204}/LICENSE +0 -0
  7. {voly-0.0.203 → voly-0.0.204}/README.md +0 -0
  8. {voly-0.0.203 → voly-0.0.204}/setup.cfg +0 -0
  9. {voly-0.0.203 → voly-0.0.204}/setup.py +0 -0
  10. {voly-0.0.203 → voly-0.0.204}/src/voly/__init__.py +0 -0
  11. {voly-0.0.203 → voly-0.0.204}/src/voly/client.py +0 -0
  12. {voly-0.0.203 → voly-0.0.204}/src/voly/core/__init__.py +0 -0
  13. {voly-0.0.203 → voly-0.0.204}/src/voly/core/fit.py +0 -0
  14. {voly-0.0.203 → voly-0.0.204}/src/voly/core/hd.py +0 -0
  15. {voly-0.0.203 → voly-0.0.204}/src/voly/core/interpolate.py +0 -0
  16. {voly-0.0.203 → voly-0.0.204}/src/voly/core/rnd.py +0 -0
  17. {voly-0.0.203 → voly-0.0.204}/src/voly/exceptions.py +0 -0
  18. {voly-0.0.203 → voly-0.0.204}/src/voly/formulas.py +0 -0
  19. {voly-0.0.203 → voly-0.0.204}/src/voly/models.py +0 -0
  20. {voly-0.0.203 → voly-0.0.204}/src/voly/utils/__init__.py +0 -0
  21. {voly-0.0.203 → voly-0.0.204}/src/voly/utils/density.py +0 -0
  22. {voly-0.0.203 → voly-0.0.204}/src/voly/utils/logger.py +0 -0
  23. {voly-0.0.203 → voly-0.0.204}/src/voly.egg-info/SOURCES.txt +0 -0
  24. {voly-0.0.203 → voly-0.0.204}/src/voly.egg-info/dependency_links.txt +0 -0
  25. {voly-0.0.203 → voly-0.0.204}/src/voly.egg-info/requires.txt +0 -0
  26. {voly-0.0.203 → voly-0.0.204}/src/voly.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: voly
3
- Version: 0.0.203
3
+ Version: 0.0.204
4
4
  Summary: Options & volatility research package
5
5
  Author-email: Manu de Cara <manu.de.cara@gmail.com>
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "voly"
7
- version = "0.0.203"
7
+ version = "0.0.204"
8
8
  description = "Options & volatility research package"
9
9
  readme = "README.md"
10
10
  authors = [
@@ -60,7 +60,7 @@ line_length = 100
60
60
  multi_line_output = 3
61
61
 
62
62
  [tool.mypy]
63
- python_version = "0.0.203"
63
+ python_version = "0.0.204"
64
64
  warn_return_any = true
65
65
  warn_unused_configs = true
66
66
  disallow_untyped_defs = true
@@ -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 ['mark_iv', 'bid_iv', 'ask_iv']:
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(
@@ -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
- df['strikes'] = splits.str[2].astype(float)
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
- raw_data = await get_deribit_data(currency=currency)
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)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: voly
3
- Version: 0.0.203
3
+ Version: 0.0.204
4
4
  Summary: Options & volatility research package
5
5
  Author-email: Manu de Cara <manu.de.cara@gmail.com>
6
6
  License: MIT
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes