v0.2.4 - VaR Warning System
What's New
🆕 VaR Warning System (EGARCH-based)
- Automatic View Validation: Views exceeding 40% return trigger automatic VaR analysis using EGARCH(1,1) model
- Non-blocking Warnings: Calculations proceed normally, but
warningsfield is added to results when views exceed historical 95th percentile - New MCP Tool:
calculate_var_egarchfor direct VaR calculations
Example
# Optimistic view triggers warning
result = optimize_portfolio_bl(
tickers=["NVDA", "AAPL", "MSFT"],
views={"P": [{"NVDA": 1}], "Q": [0.80]}, # 80% return prediction
confidence=0.7
)
if "warnings" in result:
print(result["warnings"])
# ⚠️ VaR Warning: Your prediction (80%) exceeds historical 95th percentile (75.9%)📚 Documentation
- Added Git workflow rules (always use PR for merge)
- Updated CLAUDE.md with VaR warning system documentation
🔧 Dependencies
- Added
arch>=6.0.0for EGARCH models
Full Changelog: v0.2.3...v0.2.4