analyze_derivatives
Assess options and futures portfolio risk using FLOW-generated market paths. Computes VaR, CVaR, Sharpe, Sortino, max drawdown, and per-position Greeks.
Instructions
Run options risk analysis on FLOW-generated paths for a mixed futures + options portfolio. Reprices each option at every timestep of every path using Black-76, then computes portfolio-level risk metrics (VaR, CVaR, Sharpe, Sortino, max drawdown) and per-position Greeks (delta, gamma, vega, theta, rho). Returns separate risk breakdowns for: combined portfolio, futures-only, and options-only components, plus P&L timeseries percentile bands. Requires a flow_job_id from generate_flow_paths or simulate_flow_scenario. For scenario analysis: run simulate_flow_scenario first (e.g., 'VIX > 30 and crude drops 20%'), then call this tool to see how your options hedge performs under that scenario.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| capital | No | Override portfolio capital. If None, uses portfolio's capital. | |
| flow_job_id | Yes | Flow generation job ID (from generate_flow_paths, or simulate_flow_scenario) | |
| portfolio_id | No | Portfolio UUID for underlying futures weights. Optional for standalone options analysis. | |
| risk_free_rate | No | Annualized risk-free rate (default 0.045 = 4.5%) | |
| options_positions | Yes | List of option positions. Each dict must have: underlying (display_name of the futures, e.g. 'E-mini S&P 500 Futures'), option_type ('call' or 'put'), strike (float), days_to_expiry (int), quantity (int, negative for short), implied_vol (float, annualized e.g. 0.20). Optional: entry_premium (float), multiplier (float, defaults to contract spec). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |