compare_peers
Compare a stock against its peers using key financial ratios like valuation, profitability, and leverage. Auto-discover peers or provide tickers, and view summary or full comparison.
Instructions
Compare a stock against its peers on key financial ratios.
Fetches the peer group for a stock and builds a side-by-side comparison of financial ratios including valuation, profitability, margins, and leverage. By default, auto-discovery is operating-peer oriented. For dividend payout, buyback, and shareholder-return questions, pass peer_context="capital_allocation" or metric="dividend_payout" so the peer set favors mature dividend-paying capital-allocation comps over no-dividend growth operating peers.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of peers to include (default: 5, max: 10). | |
| peers | No | Optional comma-separated peer tickers (e.g., "MSFT,GOOGL,META"). If not provided, peers are auto-discovered via FMP. | |
| format | No | Output format: - "summary": Comparison table with key metrics (P/E, P/B, P/S, ROE, ROA, gross/operating/net margin, debt/equity, current ratio, dividend yield, PEG ratio) - "full": All TTM ratios for each peer (60+ metrics) | summary |
| metric | No | Optional metric hint used to infer peer_context. | |
| symbol | Yes | Stock symbol to compare (e.g., "AAPL", "MSFT"). | |
| fiscal_year | No | Optional fiscal year for supported annual metric comparisons. For "FY24", pass 2024. Currently supports metric="dividend_payout_ratio". | |
| peer_context | No | Optional peer-selection context. Use "capital_allocation" for payout ratio, dividend, buyback, or shareholder-return metrics. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||