voly 0.0.189__py3-none-any.whl → 0.0.190__py3-none-any.whl
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/client.py +1 -1
- voly/core/fit.py +2 -6
- {voly-0.0.189.dist-info → voly-0.0.190.dist-info}/METADATA +1 -1
- {voly-0.0.189.dist-info → voly-0.0.190.dist-info}/RECORD +7 -7
- {voly-0.0.189.dist-info → voly-0.0.190.dist-info}/WHEEL +0 -0
- {voly-0.0.189.dist-info → voly-0.0.190.dist-info}/licenses/LICENSE +0 -0
- {voly-0.0.189.dist-info → voly-0.0.190.dist-info}/top_level.txt +0 -0
voly/client.py
CHANGED
@@ -175,7 +175,7 @@ class VolyClient:
|
|
175
175
|
Returns:
|
176
176
|
- DataFrame with fit results including arbitrage checks
|
177
177
|
"""
|
178
|
-
logger.info(f"Fitting
|
178
|
+
logger.info(f"Fitting model to market data")
|
179
179
|
|
180
180
|
# Fit the model
|
181
181
|
fit_results = fit_model(
|
voly/core/fit.py
CHANGED
@@ -103,8 +103,6 @@ def fit_model(option_chain: pd.DataFrame) -> pd.DataFrame:
|
|
103
103
|
mask = ~np.isnan(w) & ~np.isnan(vega) & ~np.isnan(k) & (iv >= 0)
|
104
104
|
k, w, vega, iv = k[mask], w[mask], vega[mask], iv[mask]
|
105
105
|
|
106
|
-
logger.info(f"Processing maturity {maturity}, points after filtering: {len(k)}")
|
107
|
-
|
108
106
|
params = [np.nan] * 5
|
109
107
|
loss = np.inf
|
110
108
|
nu = psi = p = c = nu_tilde = np.nan
|
@@ -155,7 +153,6 @@ def fit_model(option_chain: pd.DataFrame) -> pd.DataFrame:
|
|
155
153
|
GREEN, RED, RESET = '\033[32m', '\033[31m', '\033[0m'
|
156
154
|
status = f'{GREEN}SUCCESS{RESET}' if not np.isnan(params[0]) else f'{RED}FAILED{RESET}'
|
157
155
|
logger.info(f'Optimization for {maturity}: {status}')
|
158
|
-
logger.info("================================================")
|
159
156
|
|
160
157
|
# Store results
|
161
158
|
results_data['s'].append(float(s))
|
@@ -211,7 +208,6 @@ def fit_model(option_chain: pd.DataFrame) -> pd.DataFrame:
|
|
211
208
|
results_df = results_df.sort_values(by='t')
|
212
209
|
|
213
210
|
# Calendar arbitrage check (pre-correction) with timer
|
214
|
-
logger.info("\nChecking calendar arbitrage (pre-correction)...")
|
215
211
|
k_grid = np.linspace(-2, 2, num_points)
|
216
212
|
sorted_maturities = sorted(params_dict.keys(), key=lambda x: params_dict[x][0])
|
217
213
|
calendar_arbitrage_free = True
|
@@ -245,7 +241,7 @@ def fit_model(option_chain: pd.DataFrame) -> pd.DataFrame:
|
|
245
241
|
results_df.at[mat, 'calendar_arbitrage_free'] = calendar_arbitrage_free
|
246
242
|
|
247
243
|
# Calendar arbitrage correction with timer
|
248
|
-
logger.info("
|
244
|
+
logger.info("Performing calendar arbitrage correction...")
|
249
245
|
for i in range(1, len(sorted_maturities)):
|
250
246
|
mat2 = sorted_maturities[i]
|
251
247
|
mat1 = sorted_maturities[i - 1]
|
@@ -357,7 +353,7 @@ def fit_model(option_chain: pd.DataFrame) -> pd.DataFrame:
|
|
357
353
|
|
358
354
|
# End overall timer and print total time
|
359
355
|
end_total = time.time()
|
360
|
-
logger.info(f"
|
356
|
+
logger.info(f"Total execution time for model fit: {end_total - start_total:.4f} seconds")
|
361
357
|
|
362
358
|
logger.info("Model fitting complete.")
|
363
359
|
return results_df
|
@@ -1,20 +1,20 @@
|
|
1
1
|
voly/__init__.py,sha256=8xyDk7rFCn_MOD5hxuv5cxxKZvBVRiSIM7TgaMPpwpw,211
|
2
|
-
voly/client.py,sha256=
|
2
|
+
voly/client.py,sha256=0kp2_I-imcJ6uxMcvS0BipS2PgWdFaCPZG5335Vg75Q,14383
|
3
3
|
voly/exceptions.py,sha256=PBsbn1vNMvKcCJwwJ4lBO6glD85jo1h2qiEmD7ArAjs,92
|
4
4
|
voly/formulas.py,sha256=JnEs6G0wlfRNH6X_YEJMe2RtLH-ryhzufjsim73Bj3c,11176
|
5
5
|
voly/models.py,sha256=2aNGsF3joCx4jGbiF8m0zxEW_nvcSBERSYPSKCXV3us,7019
|
6
6
|
voly/core/__init__.py,sha256=bu6fS2I1Pj9fPPnl-zY3L7NqrZSY5Zy6NY2uMUvdhKs,183
|
7
7
|
voly/core/charts.py,sha256=2S-BfCo30aj1_xlNLqF-za5rQWxF_mWKIdtdOe5bgbw,12735
|
8
8
|
voly/core/data.py,sha256=9v9iuE2XdIIlzoRAB7q1ol7YghBzBsPGAiwZ11oDuis,13650
|
9
|
-
voly/core/fit.py,sha256=
|
9
|
+
voly/core/fit.py,sha256=mkAa4t8g8T50V2iSJETUASvx0XnRWuCAlJpXHTC8_kk,16984
|
10
10
|
voly/core/hd.py,sha256=UFAyLncNUHivpPAcko6IK1bC55mudVtdlRFfXp63HXE,14771
|
11
11
|
voly/core/interpolate.py,sha256=JkK172-FXyhesW3hY4pEeuJWG3Bugq7QZXbeKoRpLuo,5305
|
12
12
|
voly/core/rnd.py,sha256=GoC3m1Q46Wnk5tV_mstr-3_aktHeue6BBLh4DQTciW0,13307
|
13
13
|
voly/utils/__init__.py,sha256=E05mWatyC-PDOsCxQV1p5Xi1IgpOomxrNURyCx_gB-w,200
|
14
14
|
voly/utils/density.py,sha256=q0fX4im9TGwMCZ32Hzdv8CNh56KnJo8bmG5w0gVWZH8,5879
|
15
15
|
voly/utils/logger.py,sha256=4-_2bVJmq17Q0d7Rd2mPg1AeR8gxv6EPvcmBDMFWcSM,1744
|
16
|
-
voly-0.0.
|
17
|
-
voly-0.0.
|
18
|
-
voly-0.0.
|
19
|
-
voly-0.0.
|
20
|
-
voly-0.0.
|
16
|
+
voly-0.0.190.dist-info/licenses/LICENSE,sha256=wcHIVbE12jfcBOai_wqBKY6xvNQU5E909xL1zZNq_2Q,1065
|
17
|
+
voly-0.0.190.dist-info/METADATA,sha256=CDyywRiwcw-Slx2rGNOdbRj2QDPRYGsM0jqt3QXmKlU,4115
|
18
|
+
voly-0.0.190.dist-info/WHEEL,sha256=pxyMxgL8-pra_rKaQ4drOZAegBVuX-G_4nRHjjgWbmo,91
|
19
|
+
voly-0.0.190.dist-info/top_level.txt,sha256=ZfLw2sSxF-LrKAkgGjOmeTcw6_gD-30zvtdEY5W4B7c,5
|
20
|
+
voly-0.0.190.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|