valuation
Compute pre-computed valuation ratios such as P/E, EV/EBITDA, P/B, P/S and dividend yield for one or more tickers, replacing raw financial statement analysis.
Instructions
Pre-computed valuation ratios (P/E, EPS, EV/EBITDA, EV/EBIT, P/B, P/S, PEG, dividend yield, FCF yield, market cap, forward P/E, forward PEG, price to tangible book, EV to invested capital, FCF payout ratio, shareholder yield (the net payout yield: dividends plus buybacks minus issuance), and the issuance anomalies: net share issuance (Pontiff-Woodgate: log change in split-adjusted basic shares over a year), composite equity issuance (Daniel-Titman: log market cap growth minus log total return over five years) and net external financing (Bradshaw-Richardson-Sloan: equity and debt raised minus repurchases, repayments and dividends over average total assets, trailing twelve months on quarterly data)). Requires tickers='AAPL' — use comma-separated values for multiple tickers. Use instead of raw financial statements. Supports quarterly=true and start_date/end_date. basket=true adds up the tickers into one company, 'Total', whose ratios are calculated on the summed statements and the summed market cap (EV/EBITDA, FCF yield; per-share ratios such as P/E stay empty), so get_market_cap with basket=true adds a 'Total' of the tickers' market caps (share=true gives each ticker's share of it instead); show_daily=true gives the close of each day, e.g. limit=-1 for the latest. get_market_cap_to_gdp: the Buffett indicator of the tickers as one basket, their total market cap divided by the nominal GDP in US dollars of country= ('United States' by default, one country per call, e.g. country='China'), each date against the GDP of the last complete year; the tickers must be listed in US dollars. get_forward_price_earnings_ratio and get_forward_price_earnings_growth_ratio additionally require a Premium FMP subscription and are fetched on first use only; min_analysts= leaves out the periods whose EPS consensus has fewer analysts (market_data get_analyst_estimates shows the number per period). get_factor_analysis: factor analysis (predictive power) of the ratios across tickers: do the tickers that score high on one go on to return more than those that score low? Needs tickers= with at least ten, preferably twenty or more tickers. metrics= a ratio name, a comma-separated list, or a collection: 'valuation' (default: multiples, yields and market cap), 'profitability', 'solvency', 'liquidity', 'efficiency' or 'all'. Returns a row per metric and horizon: the mean information coefficient (IC, the Spearman rank correlation between the metric and the later returns), its standard deviation, IC information ratio, t-statistic, p-value, share of positive periods, number of periods, the Top Minus Bottom quantile spread, quantile turnover and rank autocorrelation. detail='information_coefficient', 'quantile_returns', 'quantile_turnover' or 'rank_autocorrelation' returns that part per period (or per quantile) for a single metric. period= sets how often it is evaluated (monthly by default), horizons= the periods ahead (e.g. 12 or [1, 12]), quantiles= the number of quantiles (5). Other parameters (e.g. trailing=) pass to the ratios. The IC is reported as measured: a negative IC means low values go on to outperform, as for a low P/E. Statement figures apply from the fiscal period end, so there is no look-ahead.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"indicator": "<indicator>"
},
"name": "valuation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lag | No | Number of periods to lag when computing growth rates. | |
| rank | No | true ranks the tickers (or countries) within every period, from the highest value (rank 1) to the lowest, and compares each with its neighbour toward the middle of the ranking: the Difference (in points for returns) and the Multiple (only when both have the same sign), so the first and last rank show how far the best and the worst stand apart, e.g. a fall more than twice as large as the next one. Needs a value per period and ticker; pick one field with show_columns where there are more. | |
| limit | No | The rows to return, like head and tail: 5 for the first five, -5 for the last five (the most recent of a time series). A table with its periods as columns (financial statements, ratios) keeps its first or last periods instead, and rows per ticker (an earnings calendar) are selected per ticker. For ETF holdings the largest (or, negative, the smallest) by weight, and for a list (e.g. news or a screener) its length. 0 returns every row. | |
| share | No | Whether to return each ticker's share of the total market cap of the tickers instead of its market cap, with the "Total" as 1. | |
| basket | No | Also analyse the tickers as one company, 'Total': its statements are the sums of theirs and its ratios are calculated on those sums (per-share figures stay empty). | |
| column | No | The price column to use, e.g. 'Close' or 'Adj Close'; for get_factor_analysis the output of a metric with several, e.g. 'Signal Line'. | |
| detail | No | get_factor_analysis only: 'information_coefficient', 'quantile_returns', 'quantile_turnover' or 'rank_autocorrelation' returns that part for a single metric instead of the summary. | |
| growth | No | Return period-over-period growth rates instead of absolute values. | |
| period | No | Observation frequency, e.g. 'daily', 'weekly', 'monthly', 'quarterly', or 'annual' (supported values differ per method). | monthly |
| country | No | The country whose GDP the basket is divided by, as named in toolkit.economics.get_gross_domestic_product. | United States |
| diluted | No | For get_earnings_per_share: Whether to use diluted earnings per share. For get_revenue_per_share, get_price_to_earnings_ratio, get_price_to_earnings_growth_ratio, get_book_value_per_share, get_price_to_book_ratio, get_interest_debt_per_share, get_capex_per_share, get_earnings_yield, get_weighted_dividend_yield, get_price_to_cash_flow_ratio, get_price_to_free_cash_flow_ratio, get_market_cap, get_market_cap_to_gdp, get_enterprise_value, get_ev_to_sales_ratio, get_ev_to_ebit, get_ev_to_ebitda_ratio, get_ev_to_operating_cashflow_ratio, get_ev_to_free_cash_flow_ratio, get_buyback_yield, get_shareholder_yield, get_price_to_sales_ratio, get_ev_to_invested_capital_ratio, get_price_to_tangible_book_ratio: Whether to use diluted shares in the calculation. For get_net_share_issuance, get_composite_equity_issuance: Whether to use the diluted weighted average shares instead of the basic ones. Leave unset to use the default of the indicator you selected. Defaults differ between indicators. | |
| metrics | No | get_factor_analysis only: the metric(s) to analyse, a method name such as 'get_price_to_earnings_ratio', a comma-separated list, or a collection of the tool (see the tool description), e.g. 'profitability'. | valuation |
| tickers | No | Comma-separated ticker symbols, e.g. 'AAPL,MSFT,GOOGL'. | |
| compound | No | With growth=true, return the compound annual growth rate (CAGR) over the lag instead of the total change, e.g. lag=5 for the five-year CAGR (lag=20 with quarterly=true). Missing when either value is zero or negative. | |
| end_date | No | End of the date range in YYYY-MM-DD format; left empty, today (or the indicator's own window). | |
| horizons | No | The number of periods the forward returns cover. | |
| trailing | No | Trailing window size in number of periods. Sums the raw values over the trailing N periods (e.g. trailing=4 on quarterly data gives a trailing-4-quarter / TTM-style sum) instead of returning one value per period. | |
| indicator | Yes | Name of the specific metric to calculate, one of the listed values. Required — search_metrics finds the indicator (and its tool) for a metric by name. | |
| quantiles | No | The number of quantiles the tickers are sorted into per period. | |
| quarterly | No | Return quarterly data instead of annual when True. | |
| show_daily | No | Whether to show daily values: the close of each trading day against the shares of the latest period that has ended and the GDP of the last complete year. | |
| start_date | No | Start of the date range in YYYY-MM-DD format; left empty, five years before today (or the indicator's own window). | |
| 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. | |
| min_analysts | No | The minimum number of analysts behind the EPS consensus of a period; periods covered by fewer are NaN. The number per period is the "Number of Analysts EPS" of `Toolkit.get_analyst_estimates`. | |
| 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. | |
| periods_apart | No | The number of periods between the dates the quantile turnover and the rank autocorrelation compare. | |
| benchmark_ticker | No | Ticker used as the market benchmark, e.g. 'SPY' or '^GSPC'; 'None' for no benchmark. | SPY |
| include_dividends | No | For get_earnings_per_share: Whether to deduct the preferred dividends paid from net income. For get_price_to_earnings_ratio, get_earnings_yield: Whether to deduct preferred dividends from net income. For get_price_to_earnings_growth_ratio: Whether to deduct preferred dividends from net income, in both the P/E and the EPS growth (not in the EBITDA growth). | |
| use_ebitda_growth_rate | No | Whether to use EBITDA growth rate for the calculation. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |