risk_metrics
Computes risk and performance metrics from daily total-return prices for a security or index, optionally against a benchmark, including volatility, Sharpe, drawdown, VaR, beta, and alpha.
Instructions
Risk and performance of one security or index from daily total-return prices.
Returns CAGR, close-to-close and range-based volatility (Garman-Klass, Parkinson, Rogers-Satchell), Sharpe with its standard error, Probabilistic Sharpe Ratio, Sortino, Omega, maximum drawdown, CDaR, Calmar, historical and Cornish-Fisher one-day VaR and expected shortfall. With a benchmark ticker (converted to the security's currency) also daily beta and correlation, Bloomberg-style beta (two years of weekly returns, adjusted 0.67 raw + 0.33), Jensen's alpha, Treynor, M2, information ratio and tracking error, and Morningstar-style up and down capture on monthly returns. period: 1y, 2y, 3y, 5y, 10y or max. risk_free_annual as a decimal (0.03 = 3%).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| period | No | 3y | |
| ticker | Yes | ||
| benchmark | No | ||
| confidence | No | ||
| risk_free_annual | No |