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.
Files changed (26) hide show
  1. {voly-0.0.190/src/voly.egg-info → voly-0.0.192}/PKG-INFO +1 -1
  2. {voly-0.0.190 → voly-0.0.192}/pyproject.toml +2 -2
  3. {voly-0.0.190 → voly-0.0.192}/src/voly/core/fit.py +23 -20
  4. {voly-0.0.190 → voly-0.0.192/src/voly.egg-info}/PKG-INFO +1 -1
  5. {voly-0.0.190 → voly-0.0.192}/LICENSE +0 -0
  6. {voly-0.0.190 → voly-0.0.192}/README.md +0 -0
  7. {voly-0.0.190 → voly-0.0.192}/setup.cfg +0 -0
  8. {voly-0.0.190 → voly-0.0.192}/setup.py +0 -0
  9. {voly-0.0.190 → voly-0.0.192}/src/voly/__init__.py +0 -0
  10. {voly-0.0.190 → voly-0.0.192}/src/voly/client.py +0 -0
  11. {voly-0.0.190 → voly-0.0.192}/src/voly/core/__init__.py +0 -0
  12. {voly-0.0.190 → voly-0.0.192}/src/voly/core/charts.py +0 -0
  13. {voly-0.0.190 → voly-0.0.192}/src/voly/core/data.py +0 -0
  14. {voly-0.0.190 → voly-0.0.192}/src/voly/core/hd.py +0 -0
  15. {voly-0.0.190 → voly-0.0.192}/src/voly/core/interpolate.py +0 -0
  16. {voly-0.0.190 → voly-0.0.192}/src/voly/core/rnd.py +0 -0
  17. {voly-0.0.190 → voly-0.0.192}/src/voly/exceptions.py +0 -0
  18. {voly-0.0.190 → voly-0.0.192}/src/voly/formulas.py +0 -0
  19. {voly-0.0.190 → voly-0.0.192}/src/voly/models.py +0 -0
  20. {voly-0.0.190 → voly-0.0.192}/src/voly/utils/__init__.py +0 -0
  21. {voly-0.0.190 → voly-0.0.192}/src/voly/utils/density.py +0 -0
  22. {voly-0.0.190 → voly-0.0.192}/src/voly/utils/logger.py +0 -0
  23. {voly-0.0.190 → voly-0.0.192}/src/voly.egg-info/SOURCES.txt +0 -0
  24. {voly-0.0.190 → voly-0.0.192}/src/voly.egg-info/dependency_links.txt +0 -0
  25. {voly-0.0.190 → voly-0.0.192}/src/voly.egg-info/requires.txt +0 -0
  26. {voly-0.0.190 → voly-0.0.192}/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.190
3
+ Version: 0.0.192
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.190"
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.190"
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.at[mat2, 'a'] = float(a_scaled)
304
- results_df.at[mat2, 'b'] = float(b_scaled)
305
- results_df.at[mat2, 'm'] = float(m)
306
- results_df.at[mat2, 'rho'] = float(rho)
307
- results_df.at[mat2, 'sigma'] = float(sigma)
308
- results_df.at[mat2, 'nu'] = float(nu)
309
- results_df.at[mat2, 'psi'] = float(psi)
310
- results_df.at[mat2, 'p'] = float(p)
311
- results_df.at[mat2, 'c'] = float(c)
312
- results_df.at[mat2, 'nu_tilde'] = float(nu_tilde)
313
- results_df.at[mat2, 'rmse'] = float(rmse)
314
- results_df.at[mat2, 'mae'] = float(mae)
315
- results_df.at[mat2, 'r2'] = float(r2)
316
- results_df.at[mat2, 'max_error'] = float(max_error)
317
- results_df.at[mat2, 'log_min_strike'] = float(log_min_strike)
318
- results_df.at[mat2, 'usd_min_strike'] = float(usd_min_strike)
319
- results_df.at[mat2, 'butterfly_arbitrage_free'] = butterfly_arbitrage_free
320
- results_df.at[mat2, 'fit_success'] = bool(not np.isnan(a))
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 sorted_maturities:
352
- results_df.at[mat, 'calendar_arbitrage_free'] = calendar_arbitrage_free
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()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: voly
3
- Version: 0.0.190
3
+ Version: 0.0.192
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