performance_attribution
Break down portfolio performance into factor exposures, sector allocation, and position contributions. Computes Sharpe, Sortino, Treynor, Calmar, and Information ratios.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| benchmark | No | Benchmark ticker for relative performance metrics (Information Ratio, Tracking Error, Beta). Default: SPY. | SPY |
| positions | Yes | Array of portfolio positions. Free tier: max 20 positions (basic ratios only). Paid tier: up to 500 positions with full factor attribution. | |
| period_days | No | Measurement period in trading days. 252 = ~1 year. Range: 30-1260. Default: 252. | |
| risk_free_rate | No | Annualized risk-free rate as a decimal, e.g. 0.05 = 5%. Used in Sharpe, Sortino, and Treynor ratios. Default: 0.05. |