compare_funds
Compare TEFAS funds on return, risk, and size metrics to identify performance and risk profile. Calculates cumulative return, volatility, Sharpe ratio, max drawdown, AUM, and investor count.
Instructions
Compare multiple TEFAS funds on return, risk, and size metrics.
Fetches price history for each code and computes selected metrics: cumulative/annualized return, volatility, Sharpe ratio, max drawdown, latest AUM, and investor count.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| metrics | No | Subset of ``return``, ``volatility``, ``sharpe``, ``max_drawdown``, ``aum``, ``investors``. Default: all. | |
| end_date | Yes | Analysis window end. | |
| fund_type | No | Default fund kind for all codes (YAT/EMK/BYF/…). If a code is not found in this type, other types are tried. | YAT |
| fund_codes | Yes | 2–10 fund codes to compare (e.g. ``["AAL", "AAK"]``). | |
| start_date | Yes | Analysis window start (YYYY-MM-DD or DD.MM.YYYY). | |
| output_format | No | ``markdown`` or ``json``. | markdown |
| risk_free_annual | No | Annual risk-free rate for Sharpe (fraction, e.g. 0.45 = 45%). Adjust to current TR policy / deposit rates. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |