| description | Risk/return dossier for ONE symbol over a window: annualized return, volatility, Sharpe, Sortino, max drawdown, Calmar, win-rate. Auto-routes A-share / HK / US by suffix.
Use when the user asks "how risky / how good is X", or wants 夏普 / 最大回撤 / 年化 over a window.
**Why:** backed by our own `panda_data` (A-share) / `tqx_data` (HK/US) daily closes — no scraping, no external stats service. It turns a raw close series into the ratios an allocator actually reasons over in one call, instead of the agent hand-writing pandas each time. Metrics are computed on daily log-of-simple returns with 252 trading days/year; a 0-vol or 0-drawdown series yields `null` for the ratio that would divide by zero, never a crash. NOT a multi-stock screener (→ `factor_standardize`) and NOT a signal generator (→ `ma_crossover_signal`).
|
| parameters | [{"name":"stock_code","type":"str","required":true,"description":"Ticker. A 股 `600519` / `600519.SH` / `000001.SZ`; 港股 `0700.HK`; 美股 `AAPL.NB`. Must match `[A-Za-z0-9._-]+` — Chinese / spaces / punctuation are rejected before any network call."},{"name":"market","type":"str","required":false,"default":"auto","enum":["auto","cn","hk","us"],"description":"Market routing. `auto` infers from suffix (`.HK`→hk, `.NB`/`.US`/`.NY`→us, `.SH`/`.SZ`/`.BJ` or bare 6-digit→cn). Pass `cn`/`hk`/`us` to force it."},{"name":"start_date","type":"str","required":false,"default":"","description":"Window start, `YYYYMMDD`. Empty → derived from `lookback_days` back from `end_date`."},{"name":"end_date","type":"str","required":false,"default":"","description":"Window end, `YYYYMMDD`. Empty → today."},{"name":"lookback_days","type":"int","required":false,"default":250,"description":"Trailing trading-day target used ONLY when `start_date` is empty. Calendar buffer is added for weekends/holidays, so the realized sample may differ slightly."},{"name":"risk_free_rate","type":"float","required":false,"default":0,"description":"Annualized risk-free rate (decimal, e.g. `0.02` = 2%) used in Sharpe / Sortino. Default 0."}] |