voly 0.0.27__tar.gz → 0.0.28__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: voly
3
- Version: 0.0.27
3
+ Version: 0.0.28
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.27"
7
+ version = "0.0.28"
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.27"
63
+ python_version = "0.0.28"
64
64
  warn_return_any = true
65
65
  warn_unused_configs = true
66
66
  disallow_untyped_defs = true
@@ -46,47 +46,41 @@ def plot_volatility_smile(moneyness: np.ndarray,
46
46
  y=iv * 100, # Convert to percentage
47
47
  mode='lines',
48
48
  name='Model',
49
- line=dict(color='#00FFC1', width=2)
49
+ line=dict(color='#636EFA', width=2)
50
50
  )
51
51
  )
52
52
 
53
- # Add market data if provided
54
- if market_data is not None and expiry is not None:
55
- # Filter market data for the specific expiry
56
- expiry_data = market_data[market_data['yte'] == expiry]
53
+ # Filter market data for the specific expiry
54
+ expiry_data = market_data[market_data['yte'] == expiry]
57
55
 
58
- if not expiry_data.empty:
59
- # Add bid IV
60
- fig.add_trace(
61
- go.Scatter(
62
- x=expiry_data['log_moneyness'],
63
- y=expiry_data['bid_iv'] * 100, # Convert to percentage
64
- mode='markers',
65
- name='Bid IV',
66
- marker=dict(size=8, symbol='circle', opacity=0.7)
67
- )
56
+ if not expiry_data.empty:
57
+ # Add bid IV
58
+ fig.add_trace(
59
+ go.Scatter(
60
+ x=expiry_data['log_moneyness'],
61
+ y=expiry_data['bid_iv'] * 100, # Convert to percentage
62
+ mode='markers',
63
+ name='Bid IV',
64
+ marker=dict(size=8, symbol='circle', opacity=0.7)
68
65
  )
66
+ )
69
67
 
70
- # Add ask IV
71
- fig.add_trace(
72
- go.Scatter(
73
- x=expiry_data['log_moneyness'],
74
- y=expiry_data['ask_iv'] * 100, # Convert to percentage
75
- mode='markers',
76
- name='Ask IV',
77
- marker=dict(size=8, symbol='circle', opacity=0.7)
78
- )
68
+ # Add ask IV
69
+ fig.add_trace(
70
+ go.Scatter(
71
+ x=expiry_data['log_moneyness'],
72
+ y=expiry_data['ask_iv'] * 100, # Convert to percentage
73
+ mode='markers',
74
+ name='Ask IV',
75
+ marker=dict(size=8, symbol='circle', opacity=0.7)
79
76
  )
77
+ )
80
78
 
81
- # Get maturity name and DTE for title if not provided
82
- if title is None:
83
- maturity_name = expiry_data['maturity_name'].iloc[0]
84
- dte_value = expiry_data['dte'].iloc[0]
85
- title = f'Volatility Smile for {maturity_name} (DTE: {dte_value:.1f}, YTE: {expiry:.4f})'
86
-
87
- # Use default title if not provided
88
- if title is None:
89
- title = 'Volatility Smile'
79
+ # Get maturity name and DTE for title if not provided
80
+ if title is None:
81
+ maturity_name = expiry_data['maturity_name'].iloc[0]
82
+ dte_value = expiry_data['dte'].iloc[0]
83
+ title = f'Vol Smile for {maturity_name} (DTE: {dte_value:.1f})'
90
84
 
91
85
  # Update layout
92
86
  fig.update_layout(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: voly
3
- Version: 0.0.27
3
+ Version: 0.0.28
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
File without changes