ivolatility-backtesting 2.142__tar.gz → 2.143__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ivolatility_backtesting
3
- Version: 2.142
3
+ Version: 2.143
4
4
  Summary: A universal backtesting framework for financial strategies using the IVolatility API.
5
5
  Author-email: IVolatility <support@ivolatility.com>
6
6
  Project-URL: Homepage, https://ivolatility.com
@@ -19832,8 +19832,30 @@ def _preload_duckdb_SSD_storage(config, cache_config):
19832
19832
 
19833
19833
  # Get connection for ChunkManager
19834
19834
  conn = _get_duckdb_storage_conn(cache_config)
19835
-
19835
+
19836
19836
  _opt_tbl = _get_options_eod_table(config)
19837
+
19838
+ # Cold-path completeness: every backtest trading day must exist in
19839
+ # the options table; misses are loud + flag _failed_chunks
19840
+ try:
19841
+ _cc_df = conn.execute(
19842
+ f"SELECT DISTINCT date FROM {_opt_tbl} WHERE symbol = ?", [symbol]
19843
+ ).fetchdf()
19844
+ _cc_have = set(pd.to_datetime(_cc_df['date']).dt.strftime('%Y-%m-%d'))
19845
+ _cc_need = {pd.Timestamp(d).strftime('%Y-%m-%d') for d in backtest_trading_days}
19846
+ _cc_missing = sorted(_cc_need - _cc_have)
19847
+ except Exception as _ce:
19848
+ _cc_missing = None
19849
+ print(f" ⚠️ Completeness check could not run: {_ce}")
19850
+ if _cc_missing:
19851
+ print(f" 🕳️ COMPLETENESS: {len(_cc_missing)} trading day(s) missing "
19852
+ f"in options after initial load: {_cc_missing[:10]}"
19853
+ + (' …' if len(_cc_missing) > 10 else ''))
19854
+ config.setdefault('_failed_chunks', []).extend(
19855
+ ('cold-completeness', d, d, '*') for d in _cc_missing)
19856
+ elif _cc_missing is not None:
19857
+ print(f" ✅ COMPLETENESS: options cover all {len(_cc_need)} backtest trading days")
19858
+
19837
19859
  chunk_mgr = OptionsChunkManager(
19838
19860
  db_path=db_path,
19839
19861
  symbol=symbol,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ivolatility_backtesting
3
- Version: 2.142
3
+ Version: 2.143
4
4
  Summary: A universal backtesting framework for financial strategies using the IVolatility API.
5
5
  Author-email: IVolatility <support@ivolatility.com>
6
6
  Project-URL: Homepage, https://ivolatility.com
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "ivolatility_backtesting"
7
- version = "2.142"
7
+ version = "2.143"
8
8
  description = "A universal backtesting framework for financial strategies using the IVolatility API."
9
9
  readme = "README.md"
10
10
  authors = [