voly 0.0.11__py3-none-any.whl → 0.0.12__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/core/data.py CHANGED
@@ -174,7 +174,7 @@ async def get_deribit_data(currency: str = "BTC") -> pd.DataFrame:
174
174
  raise ConnectionError(f"WebSocket connection error: {str(e)}")
175
175
 
176
176
  total_time = time.time() - total_start
177
- logger.info(f"Total processing time: {total_time:.2f}s - {len(all_data)} instruments processed")
177
+ logger.info(f"Total fetching time: {total_time:.2f}s")
178
178
 
179
179
  if not all_data:
180
180
  raise VolyError("No data collected from Deribit")
@@ -195,7 +195,7 @@ def process_option_chain(df: pd.DataFrame, currency: str, min_dte: float = 2.0)
195
195
  Returns:
196
196
  pd.DataFrame: Processed option chain data
197
197
  """
198
- logger.info(f"Processing option chain data for {currency}...")
198
+ logger.info(f"Processing data for {currency}...")
199
199
 
200
200
  # Extract instrument details
201
201
  # Format is typically BTC-DDMMMYY-STRIKE-C/P or ETH-DDMMMYY-STRIKE-C/P
@@ -248,10 +248,7 @@ def process_option_chain(df: pd.DataFrame, currency: str, min_dte: float = 2.0)
248
248
  # Calculate log-moneyness
249
249
  df['log_moneyness'] = np.log(df['underlying_price'] / df['strike'])
250
250
 
251
- # Remove rows with missing implied volatility
252
- original_rows = len(df)
253
- df = df.dropna(subset=['mark_iv', 'log_moneyness', 'yte'])
254
- logger.info(f"Removed {original_rows - len(df)} rows with missing data")
251
+ logger.info(f"Processing complete!")
255
252
 
256
253
  return df
257
254
 
voly/core/fit.py CHANGED
@@ -13,6 +13,8 @@ from sklearn.metrics import mean_squared_error, mean_absolute_error, r2_score
13
13
  from voly.utils.logger import logger, catch_exception
14
14
  from voly.exceptions import VolyError
15
15
  from voly.models import SVIModel
16
+ import warnings
17
+ warnings.filterwarnings("ignore")
16
18
 
17
19
 
18
20
  @catch_exception
@@ -161,7 +163,7 @@ def create_parameters_matrix(optimization_results: Dict[str, Dict[str, Any]]) ->
161
163
  dte_values[maturity_name] = result['dte']
162
164
 
163
165
  # Calculate JW parameters
164
- nu, psi, p, c, nu_tilde = SVIModel.svi_jw_params(a, b, sigma, rho, m, yte)
166
+ nu, psi, p, c, nu_tilde = SVIModel.raw_to_jw_params(a, b, sigma, rho, m, yte)
165
167
  jw_param_matrix[maturity_name] = [nu, psi, p, c, nu_tilde]
166
168
 
167
169
  # Store YTE and DTE as attributes in all DataFrames for reference
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: voly
3
- Version: 0.0.11
3
+ Version: 0.0.12
4
4
  Summary: Options & volatility research package
5
5
  Author-email: Manu de Cara <manu.de.cara@gmail.com>
6
6
  License: MIT
@@ -5,14 +5,14 @@ voly/formulas.py,sha256=aG_HSq_a4j7TcuKiINlHSpmNdmfZa_fzYbAk8EGt954,7427
5
5
  voly/models.py,sha256=YJ12aamLz_-aOni4Qm0_XV9u4bjKK3vfJz0J2gc1h0o,3565
6
6
  voly/core/__init__.py,sha256=GU6l7hpxJfitPx9jnmBtcb_QIeqOO8liZsSbLXXSbq8,384
7
7
  voly/core/charts.py,sha256=GF55IS-aZfcc_0yoSPRPIPBPcJhFD1El18wNCo_mI_A,29918
8
- voly/core/data.py,sha256=RCvL9ZZWHgO2cfNbLSby2zNsoJmF2VCkJ0yRb1HtjHs,10171
9
- voly/core/fit.py,sha256=JSQuEkdriVdilcIPAJaieZUofYdCfSGJ5wVB1wRBfVs,11280
8
+ voly/core/data.py,sha256=Dfk-ByHpdteUiLXr0p-wRLr3VAmdyjdDBKwjwdTgCjA,9939
9
+ voly/core/fit.py,sha256=pCP1WL1zlMEgJw5aZuPYGGIfH2F9GD8QsN_oj6ZLeHo,11333
10
10
  voly/core/interpolate.py,sha256=ztVIePJZOh-CIbn69wkh1JW2rKywNe2FEewRN0zcSAo,8185
11
11
  voly/core/rnd.py,sha256=-xBVzvM9sMIBtfOfWyBJKtiVcBShSGTNNp2PZFOD5j0,12155
12
12
  voly/utils/__init__.py,sha256=E05mWatyC-PDOsCxQV1p5Xi1IgpOomxrNURyCx_gB-w,200
13
13
  voly/utils/logger.py,sha256=4-_2bVJmq17Q0d7Rd2mPg1AeR8gxv6EPvcmBDMFWcSM,1744
14
- voly-0.0.11.dist-info/LICENSE,sha256=wcHIVbE12jfcBOai_wqBKY6xvNQU5E909xL1zZNq_2Q,1065
15
- voly-0.0.11.dist-info/METADATA,sha256=ggw_f34HW4h4RTN5_37TpH7bW_sVJ-_AdCpVeG_Fz9Y,4092
16
- voly-0.0.11.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
17
- voly-0.0.11.dist-info/top_level.txt,sha256=ZfLw2sSxF-LrKAkgGjOmeTcw6_gD-30zvtdEY5W4B7c,5
18
- voly-0.0.11.dist-info/RECORD,,
14
+ voly-0.0.12.dist-info/LICENSE,sha256=wcHIVbE12jfcBOai_wqBKY6xvNQU5E909xL1zZNq_2Q,1065
15
+ voly-0.0.12.dist-info/METADATA,sha256=GxT2PrLToCnIj-pA5K030JjzQZFMkPUH1kN_Y-3cdIs,4092
16
+ voly-0.0.12.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
17
+ voly-0.0.12.dist-info/top_level.txt,sha256=ZfLw2sSxF-LrKAkgGjOmeTcw6_gD-30zvtdEY5W4B7c,5
18
+ voly-0.0.12.dist-info/RECORD,,
File without changes
File without changes