risk
Compute financial risk indicators like Value at Risk, Conditional VaR, GARCH volatility, and drawdown duration. Input tickers, select period frequency, and choose rolling windows.
Instructions
Pre-computed risk metrics (VaR incl. historic/gaussian/cf/studentt/evt distributions, CVaR, EVaR, GARCH volatility, max drawdown, drawdown duration, drawdown recovery time, Conditional Drawdown at Risk (CDaR), Tail Ratio, skewness, kurtosis, downside deviation, Variance, Volatility, Excess Volatility). VaR, CVaR, skewness, kurtosis, CDaR, Tail Ratio, downside deviation, Variance, Volatility and Excess Volatility support rolling=N for a rolling N-period value spanning the full history instead of one value per period (e.g. period='monthly', rolling=6 for a rolling 6-month figure). Requires tickers='AAPL' — use comma-separated values for multiple tickers. Does NOT support period='daily'; use weekly, monthly, quarterly, or yearly instead.
Available indicators: get_autocorrelation, get_coefficient_of_variation, get_conditional_drawdown_at_risk, get_conditional_value_at_risk, get_downside_deviation, get_entropic_value_at_risk, get_ewma_volatility, get_excess_volatility, get_garch, get_garch_forecast, get_hurst_exponent, get_kurtosis, get_maximum_drawdown, get_maximum_drawdown_duration, get_maximum_drawdown_recovery_time, get_mean_absolute_deviation, get_skewness, get_tail_ratio, get_ulcer_index, get_value_at_risk, get_variance, get_volatility.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lag | No | Number of periods to lag when computing growth rates. | |
| lags | No | Value for lags. | |
| alpha | No | Value for alpha. | |
| fisher | No | Value for fisher. | |
| growth | No | Return period-over-period growth rates instead of absolute values. | |
| period | No | Observation frequency, e.g. 'monthly', 'quarterly', or 'annual'. | |
| lambda_ | No | Value for lambda_. | |
| max_lag | No | Value for max_lag. | |
| rolling | No | Rolling window size in number of periods. When set, the metric is computed over a smoothly overlapping trailing window across the full history (e.g. period='monthly' and rolling=6 gives a rolling 6-month value) instead of one value per period, or (for economics indicators) a simple moving average used to smooth the raw series. | |
| tickers | No | Comma-separated ticker symbols, e.g. 'AAPL,MSFT,GOOGL'. | |
| end_date | No | End of the date range in YYYY-MM-DD format. | 2026-07-14 |
| indicator | Yes | Name of the specific metric to calculate, e.g. 'get_asset_turnover_ratio'. Required — omitting it returns the list of available indicators. | |
| quarterly | No | Return quarterly data instead of annual when True. | |
| start_date | No | Start of the date range in YYYY-MM-DD format. | 2021-07-15 |
| time_steps | No | Value for time_steps. | |
| standardize | No | Return the Z-Score (standard score) instead of the raw values, i.e. how many standard deviations each value is from the mean of its own series. When combined with growth=True, the growth values are standardized instead of the raw values. | |
| distribution | No | Value for distribution. | historic |
| show_columns | No | Comma-separated names to filter the output. For historical data use the key names visible in any response record (e.g. 'Close,Volume,Return'). For financial statements use the 'metric' field values from the response (e.g. 'Revenue,Net Income,EBITDA'). Call the tool once without this parameter to see all available names, then repeat with show_columns to reduce response size and token usage. | |
| within_period | No | Value for within_period. | |
| optimization_t | No | Value for optimization_t. | |
| benchmark_ticker | No | Ticker used as the market benchmark, e.g. 'SPY' or '^GSPC'. | SPY |
| threshold_percentile | No | Only used when distribution='evt'. The percentile of losses above which the Generalized Pareto Distribution is fitted, e.g. 0.95 fits on the worst 5% of losses. | |
| minimum_acceptable_return | No | The minimum acceptable return (MAR) threshold below which returns are considered downside, e.g. 0.0 for downside relative to a zero return. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |