"Vibe-Trading: Your Personal Trading Agent"
Python ai-agentalgorithmic-tradingbacktestingfintechllmmcpmulti-agentpythonquantitative-financetrading
Merge PR #1305: use configured default IV for HV warm-up bars
Haozhe Wu36b204dd2c4a
diff --cc agent/backtest/engines/options_portfolio.pyindex 825ecafa1,47642f5f7..b4c6ce21e--- a/agent/backtest/engines/options_portfolio.py+++ b/agent/backtest/engines/options_portfolio.py@@@ -213,7 -220,9 +220,10 @@@ def run_options_backtestexercise_style = options_cfg.get("exercise_style", "european") # v2: "european" or "american"iv_skew = options_cfg.get("iv_skew", 0.0) # v2: smile skew param (0 = flat)iv_curvature = options_cfg.get("iv_curvature", 0.0) # v2: smile curvature+ same_day_fill = options_cfg.get("same_day_fill", False)+ default_iv = options_cfg.get("default_iv", 0.3)+ if not math.isfinite(default_iv) or default_iv <= 0.0:+ raise ValueError("options_config.default_iv must be a finite, positive float")# Load underlying datadata_map = loader.fetch(codes, start_date, end_date)diff --cc agent/src/skills/options-strategy/SKILL.mdindex cbe06ff6e,6d6ebf09e..27a2b866a--- a/agent/src/skills/options-strategy/SKILL.md+++ b/agent/src/skills/options-strategy/SKILL.md@@@ -91,7 -91,7 +91,8 @@@ Iron Condor opening signal"risk_free_rate": 0.05,"iv_source": "historical","contract_multiplier": 1.0,- "same_day_fill": false++ "same_day_fill": false,+ "default_iv": 0.3}}```@@@ -101,7 -101,7 +102,8 @@@ Key fields- `options_config.risk_free_rate`: risk-free rate, default `0.05`- `options_config.iv_source`: volatility source, currently supports `"historical"` (30-day rolling historical volatility computed from underlying closes)- `options_config.contract_multiplier`: contract multiplier, default `1.0`+- `options_config.same_day_fill`: `false` (default) fills a signal dated T on the next bar's close; `true` restores the legacy same-date fill (signal and fill share T's close and IV)+ - `options_config.default_iv`: volatility used for bars without a full rolling window (warm-up and NaN gaps), default `0.3`; must be finite and positive## BS Model Principles