Skip to content

v0.2.4 - VaR Warning System

Choose a tag to compare

@irresi irresi released this 24 Nov 10:45
· 42 commits to main since this release
b750963

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 warnings field is added to results when views exceed historical 95th percentile
  • New MCP Tool: calculate_var_egarch for 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.0 for EGARCH models

Full Changelog: v0.2.3...v0.2.4