voly 0.0.190__tar.gz → 0.0.192__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.
- {voly-0.0.190/src/voly.egg-info → voly-0.0.192}/PKG-INFO +1 -1
- {voly-0.0.190 → voly-0.0.192}/pyproject.toml +2 -2
- {voly-0.0.190 → voly-0.0.192}/src/voly/core/fit.py +23 -20
- {voly-0.0.190 → voly-0.0.192/src/voly.egg-info}/PKG-INFO +1 -1
- {voly-0.0.190 → voly-0.0.192}/LICENSE +0 -0
- {voly-0.0.190 → voly-0.0.192}/README.md +0 -0
- {voly-0.0.190 → voly-0.0.192}/setup.cfg +0 -0
- {voly-0.0.190 → voly-0.0.192}/setup.py +0 -0
- {voly-0.0.190 → voly-0.0.192}/src/voly/__init__.py +0 -0
- {voly-0.0.190 → voly-0.0.192}/src/voly/client.py +0 -0
- {voly-0.0.190 → voly-0.0.192}/src/voly/core/__init__.py +0 -0
- {voly-0.0.190 → voly-0.0.192}/src/voly/core/charts.py +0 -0
- {voly-0.0.190 → voly-0.0.192}/src/voly/core/data.py +0 -0
- {voly-0.0.190 → voly-0.0.192}/src/voly/core/hd.py +0 -0
- {voly-0.0.190 → voly-0.0.192}/src/voly/core/interpolate.py +0 -0
- {voly-0.0.190 → voly-0.0.192}/src/voly/core/rnd.py +0 -0
- {voly-0.0.190 → voly-0.0.192}/src/voly/exceptions.py +0 -0
- {voly-0.0.190 → voly-0.0.192}/src/voly/formulas.py +0 -0
- {voly-0.0.190 → voly-0.0.192}/src/voly/models.py +0 -0
- {voly-0.0.190 → voly-0.0.192}/src/voly/utils/__init__.py +0 -0
- {voly-0.0.190 → voly-0.0.192}/src/voly/utils/density.py +0 -0
- {voly-0.0.190 → voly-0.0.192}/src/voly/utils/logger.py +0 -0
- {voly-0.0.190 → voly-0.0.192}/src/voly.egg-info/SOURCES.txt +0 -0
- {voly-0.0.190 → voly-0.0.192}/src/voly.egg-info/dependency_links.txt +0 -0
- {voly-0.0.190 → voly-0.0.192}/src/voly.egg-info/requires.txt +0 -0
- {voly-0.0.190 → voly-0.0.192}/src/voly.egg-info/top_level.txt +0 -0
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
4
4
|
|
5
5
|
[project]
|
6
6
|
name = "voly"
|
7
|
-
version = "0.0.
|
7
|
+
version = "0.0.192"
|
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.
|
63
|
+
python_version = "0.0.192"
|
64
64
|
warn_return_any = true
|
65
65
|
warn_unused_configs = true
|
66
66
|
disallow_untyped_defs = true
|
@@ -94,6 +94,7 @@ def fit_model(option_chain: pd.DataFrame) -> pd.DataFrame:
|
|
94
94
|
maturity_data = pd.concat([unique_iv, cleaned_duplicated_iv])
|
95
95
|
maturity_date = maturity_data['maturity_date'].iloc[0]
|
96
96
|
|
97
|
+
|
97
98
|
t = group['t'].iloc[0]
|
98
99
|
K = group['strikes'].values
|
99
100
|
iv = group['mark_iv'].values
|
@@ -300,24 +301,26 @@ def fit_model(option_chain: pd.DataFrame) -> pd.DataFrame:
|
|
300
301
|
butterfly_arbitrage_free = False
|
301
302
|
break
|
302
303
|
|
303
|
-
results_df
|
304
|
-
|
305
|
-
results_df.
|
306
|
-
results_df.
|
307
|
-
results_df.
|
308
|
-
results_df.
|
309
|
-
results_df.
|
310
|
-
results_df.
|
311
|
-
results_df.
|
312
|
-
results_df.
|
313
|
-
results_df.
|
314
|
-
results_df.
|
315
|
-
results_df.
|
316
|
-
results_df.
|
317
|
-
results_df.
|
318
|
-
results_df.
|
319
|
-
results_df.
|
320
|
-
results_df.
|
304
|
+
# Update results_df using maturity_name
|
305
|
+
mat_name = group['maturity_name'].iloc[0]
|
306
|
+
results_df.loc[mat_name, 'a'] = float(a_scaled)
|
307
|
+
results_df.loc[mat_name, 'b'] = float(b_scaled)
|
308
|
+
results_df.loc[mat_name, 'm'] = float(m)
|
309
|
+
results_df.loc[mat_name, 'rho'] = float(rho)
|
310
|
+
results_df.loc[mat_name, 'sigma'] = float(sigma)
|
311
|
+
results_df.loc[mat_name, 'nu'] = float(nu)
|
312
|
+
results_df.loc[mat_name, 'psi'] = float(psi)
|
313
|
+
results_df.loc[mat_name, 'p'] = float(p)
|
314
|
+
results_df.loc[mat_name, 'c'] = float(c)
|
315
|
+
results_df.loc[mat_name, 'nu_tilde'] = float(nu_tilde)
|
316
|
+
results_df.loc[mat_name, 'rmse'] = float(rmse)
|
317
|
+
results_df.loc[mat_name, 'mae'] = float(mae)
|
318
|
+
results_df.loc[mat_name, 'r2'] = float(r2)
|
319
|
+
results_df.loc[mat_name, 'max_error'] = float(max_error)
|
320
|
+
results_df.loc[mat_name, 'log_min_strike'] = float(log_min_strike)
|
321
|
+
results_df.loc[mat_name, 'usd_min_strike'] = float(usd_min_strike)
|
322
|
+
results_df.loc[mat_name, 'butterfly_arbitrage_free'] = butterfly_arbitrage_free
|
323
|
+
results_df.loc[mat_name, 'fit_success'] = bool(not np.isnan(a))
|
321
324
|
|
322
325
|
# Calendar arbitrage check (post-correction)
|
323
326
|
calendar_arbitrage_free = True
|
@@ -348,8 +351,8 @@ def fit_model(option_chain: pd.DataFrame) -> pd.DataFrame:
|
|
348
351
|
if not calendar_arbitrage_free:
|
349
352
|
break
|
350
353
|
|
351
|
-
for mat in
|
352
|
-
results_df.
|
354
|
+
for mat in results_df['maturity_date']:
|
355
|
+
results_df.loc[results_df['maturity_date'] == mat, 'calendar_arbitrage_free'] = calendar_arbitrage_free
|
353
356
|
|
354
357
|
# End overall timer and print total time
|
355
358
|
end_total = time.time()
|
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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|