voly 0.0.162__tar.gz → 0.0.163__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.162/src/voly.egg-info → voly-0.0.163}/PKG-INFO +1 -1
  2. {voly-0.0.162 → voly-0.0.163}/pyproject.toml +2 -2
  3. {voly-0.0.162 → voly-0.0.163}/src/voly/formulas.py +0 -28
  4. {voly-0.0.162 → voly-0.0.163/src/voly.egg-info}/PKG-INFO +1 -1
  5. {voly-0.0.162 → voly-0.0.163}/LICENSE +0 -0
  6. {voly-0.0.162 → voly-0.0.163}/README.md +0 -0
  7. {voly-0.0.162 → voly-0.0.163}/setup.cfg +0 -0
  8. {voly-0.0.162 → voly-0.0.163}/setup.py +0 -0
  9. {voly-0.0.162 → voly-0.0.163}/src/voly/__init__.py +0 -0
  10. {voly-0.0.162 → voly-0.0.163}/src/voly/client.py +0 -0
  11. {voly-0.0.162 → voly-0.0.163}/src/voly/core/__init__.py +0 -0
  12. {voly-0.0.162 → voly-0.0.163}/src/voly/core/charts.py +0 -0
  13. {voly-0.0.162 → voly-0.0.163}/src/voly/core/data.py +0 -0
  14. {voly-0.0.162 → voly-0.0.163}/src/voly/core/fit.py +0 -0
  15. {voly-0.0.162 → voly-0.0.163}/src/voly/core/hd.py +0 -0
  16. {voly-0.0.162 → voly-0.0.163}/src/voly/core/interpolate.py +0 -0
  17. {voly-0.0.162 → voly-0.0.163}/src/voly/core/rnd.py +0 -0
  18. {voly-0.0.162 → voly-0.0.163}/src/voly/exceptions.py +0 -0
  19. {voly-0.0.162 → voly-0.0.163}/src/voly/models.py +0 -0
  20. {voly-0.0.162 → voly-0.0.163}/src/voly/utils/__init__.py +0 -0
  21. {voly-0.0.162 → voly-0.0.163}/src/voly/utils/density.py +0 -0
  22. {voly-0.0.162 → voly-0.0.163}/src/voly/utils/logger.py +0 -0
  23. {voly-0.0.162 → voly-0.0.163}/src/voly.egg-info/SOURCES.txt +0 -0
  24. {voly-0.0.162 → voly-0.0.163}/src/voly.egg-info/dependency_links.txt +0 -0
  25. {voly-0.0.162 → voly-0.0.163}/src/voly.egg-info/requires.txt +0 -0
  26. {voly-0.0.162 → voly-0.0.163}/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.162
3
+ Version: 0.0.163
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.162"
7
+ version = "0.0.163"
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.162"
63
+ python_version = "0.0.163"
64
64
  warn_return_any = true
65
65
  warn_unused_configs = true
66
66
  disallow_untyped_defs = true
@@ -60,8 +60,6 @@ def vectorize_inputs(func):
60
60
  @vectorize_inputs
61
61
  def d1(s: float, K: float, r: float, o: float, t: float, option_type: str = 'call') -> float:
62
62
  # option_type is ignored in this function but included for compatibility
63
- if o <= 0 or t <= 0:
64
- return np.nan
65
63
  return (np.log(s / K) + (r + o ** 2 / 2) * t) / (o * np.sqrt(t))
66
64
 
67
65
 
@@ -69,8 +67,6 @@ def d1(s: float, K: float, r: float, o: float, t: float, option_type: str = 'cal
69
67
  @vectorize_inputs
70
68
  def d2(s: float, K: float, r: float, o: float, t: float, option_type: str = 'call') -> float:
71
69
  # option_type is ignored in this function but included for compatibility
72
- if o <= 0 or t <= 0:
73
- return np.nan
74
70
  return d1(s, K, r, o, t, option_type) - o * np.sqrt(t)
75
71
 
76
72
 
@@ -114,9 +110,6 @@ def delta(s: float, K: float, r: float, o: float, t: float, option_type: str = '
114
110
  @catch_exception
115
111
  @vectorize_inputs
116
112
  def gamma(s: float, K: float, r: float, o: float, t: float, option_type: str = 'call') -> float:
117
- if o <= 0 or t <= 0:
118
- return 0.0
119
-
120
113
  d1_val = d1(s, K, r, o, t, option_type)
121
114
  return norm.pdf(d1_val) / (s * o * np.sqrt(t))
122
115
 
@@ -124,9 +117,6 @@ def gamma(s: float, K: float, r: float, o: float, t: float, option_type: str = '
124
117
  @catch_exception
125
118
  @vectorize_inputs
126
119
  def vega(s: float, K: float, r: float, o: float, t: float, option_type: str = 'call') -> float:
127
- if o <= 0 or t <= 0:
128
- return 0.0
129
-
130
120
  d1_val = d1(s, K, r, o, t, option_type)
131
121
  return s * norm.pdf(d1_val) * np.sqrt(t) / 100 # Divided by 100 for 1% change
132
122
 
@@ -134,9 +124,6 @@ def vega(s: float, K: float, r: float, o: float, t: float, option_type: str = 'c
134
124
  @catch_exception
135
125
  @vectorize_inputs
136
126
  def theta(s: float, K: float, r: float, o: float, t: float, option_type: str = 'call') -> float:
137
- if o <= 0 or t <= 0:
138
- return 0.0
139
-
140
127
  d1_val = d1(s, K, r, o, t, option_type)
141
128
  d2_val = d2(s, K, r, o, t, option_type)
142
129
 
@@ -156,9 +143,6 @@ def theta(s: float, K: float, r: float, o: float, t: float, option_type: str = '
156
143
  @catch_exception
157
144
  @vectorize_inputs
158
145
  def rho(s: float, K: float, r: float, o: float, t: float, option_type: str = 'call') -> float:
159
- if o <= 0 or t <= 0:
160
- return 0.0
161
-
162
146
  d2_val = d2(s, K, r, o, t, option_type)
163
147
 
164
148
  if option_type.lower() in ["call", "c"]:
@@ -170,9 +154,6 @@ def rho(s: float, K: float, r: float, o: float, t: float, option_type: str = 'ca
170
154
  @catch_exception
171
155
  @vectorize_inputs
172
156
  def vanna(s: float, K: float, r: float, o: float, t: float, option_type: str = 'call') -> float:
173
- if o <= 0 or t <= 0:
174
- return 0.0
175
-
176
157
  d1_val = d1(s, K, r, o, t, option_type)
177
158
  d2_val = d2(s, K, r, o, t, option_type)
178
159
 
@@ -182,9 +163,6 @@ def vanna(s: float, K: float, r: float, o: float, t: float, option_type: str = '
182
163
  @catch_exception
183
164
  @vectorize_inputs
184
165
  def volga(s: float, K: float, r: float, o: float, t: float, option_type: str = 'call') -> float:
185
- if o <= 0 or t <= 0:
186
- return 0.0
187
-
188
166
  d1_val = d1(s, K, r, o, t, option_type)
189
167
  d2_val = d2(s, K, r, o, t, option_type)
190
168
 
@@ -194,9 +172,6 @@ def volga(s: float, K: float, r: float, o: float, t: float, option_type: str = '
194
172
  @catch_exception
195
173
  @vectorize_inputs
196
174
  def charm(s: float, K: float, r: float, o: float, t: float, option_type: str = 'call') -> float:
197
- if o <= 0 or t <= 0:
198
- return 0.0
199
-
200
175
  d1_val = d1(s, K, r, o, t, option_type)
201
176
  d2_val = d2(s, K, r, o, t, option_type)
202
177
 
@@ -248,9 +223,6 @@ def iv(option_price: float, s: float, K: float, r: float, t: float,
248
223
  Returns:
249
224
  - Implied volatility
250
225
  """
251
- if t <= 0:
252
- return np.nan
253
-
254
226
  # Check if option price is within theoretical bounds
255
227
  if option_type.lower() in ["call", "c"]:
256
228
  intrinsic = max(0, s - K * np.exp(-r * t))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: voly
3
- Version: 0.0.162
3
+ Version: 0.0.163
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