ivolatility-backtesting 1.29__tar.gz → 1.30__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: 1.29
3
+ Version: 1.30
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
@@ -4472,6 +4472,16 @@ class PositionManager:
4472
4472
  if key in kwargs:
4473
4473
  trade[key] = kwargs[key]
4474
4474
 
4475
+ # ========================================================
4476
+ # AUTO-COPY ALL CUSTOM ENTRY FIELDS
4477
+ # ========================================================
4478
+ # Universal mechanism: copy ANY field with 'entry' from position to trade
4479
+ # This allows strategies to add custom fields without modifying the framework
4480
+ # Matches: entry_*, *_entry, *entry* (e.g., entry_earnings_date, long_delta_entry, etc.)
4481
+ for key in position.keys():
4482
+ if 'entry' in key and key not in trade:
4483
+ trade[key] = position[key]
4484
+
4475
4485
  self.closed_trades.append(trade)
4476
4486
 
4477
4487
  if self.sl_enabled and self.sl_manager:
@@ -6019,10 +6029,12 @@ OPTIMAL_COLUMN_ORDER = [
6019
6029
  'short_put_entry_bid', 'short_put_entry_ask', 'short_put_entry_mid',
6020
6030
  'long_put_entry_bid', 'long_put_entry_ask', 'long_put_entry_mid',
6021
6031
 
6022
- # 6. ENTRY METRICS (11) - Added Iron Condor IV
6032
+ # 6. ENTRY METRICS (15) - Added Iron Condor IV & Spread Greeks
6023
6033
  'entry_z_score', 'entry_lean', 'iv_lean_entry',
6024
6034
  'call_iv_entry', 'put_iv_entry', 'iv_entry',
6025
6035
  'iv_rank_entry', 'iv_percentile_entry',
6036
+ # ✅ Spread strategies (BULL_CALL_SPREAD, BEAR_PUT_SPREAD, etc.)
6037
+ 'long_delta_entry', 'short_delta_entry', 'long_iv_entry', 'short_iv_entry',
6026
6038
  # ✅ Iron Condor entry IV (4 legs)
6027
6039
  'short_call_iv_entry', 'long_call_iv_entry',
6028
6040
  'short_put_iv_entry', 'long_put_iv_entry',
@@ -6037,7 +6049,7 @@ OPTIMAL_COLUMN_ORDER = [
6037
6049
  'short_put_delta_entry', 'short_put_gamma_entry', 'short_put_vega_entry', 'short_put_theta_entry',
6038
6050
  'long_put_delta_entry', 'long_put_gamma_entry', 'long_put_vega_entry', 'long_put_theta_entry',
6039
6051
 
6040
- # 8. ENTRY CRITERIA (15) - Added Iron Condor signals
6052
+ # 8. ENTRY CRITERIA (20) - Added Iron Condor signals & Earnings data
6041
6053
  'target_delta_entry', 'delta_threshold_entry',
6042
6054
  'entry_price_pct', 'distance_from_strike_entry',
6043
6055
  'dte_entry', 'target_dte_entry',
@@ -6045,6 +6057,9 @@ OPTIMAL_COLUMN_ORDER = [
6045
6057
  'entry_criteria', 'entry_signal', 'entry_reason',
6046
6058
  # ✅ Iron Condor strategy signals
6047
6059
  'entry_iv_rank', 'entry_signal_type', 'entry_wing_width',
6060
+ # ✅ Earnings Momentum strategy data
6061
+ 'entry_earnings_date', 'entry_earnings_surprise_pct', 'entry_earnings_estimate',
6062
+ 'entry_earnings_reported', 'entry_earnings_direction',
6048
6063
 
6049
6064
  # 9. STOP-LOSS (2)
6050
6065
  'stop_threshold', 'actual_value',
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ivolatility_backtesting
3
- Version: 1.29
3
+ Version: 1.30
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 = "1.29"
7
+ version = "1.30"
8
8
  description = "A universal backtesting framework for financial strategies using the IVolatility API."
9
9
  readme = "README.md"
10
10
  authors = [