get_valuation_metrics
Fetch valuation metrics history and current snapshot for any A-share stock, including PE, PB, PS, and PCF with percentile rankings.
Instructions
Fetch valuation metrics (PE/PB/PS/PCF) history and current snapshot.
Each metric in metrics independently reports current and as_of
(the date of its last valid observation), since close and PE/PB/PS can be
missing on different days. period.last_trading_date reports the last
K-line bar in the window, separate from any metric's as_of.
Each non-close metric also reports positive_mean/positive_median/
positive_min/positive_max plus percentile_pct (0-100 rank of current:
a fresh low ~0.4, an all-time high ~100), computed over POSITIVE values
only. sample_size is the positive-observation count; percentile_pct
is null when current is non-positive.
Args: code: Stock code. start_date: Optional, defaults to 1 year ago. end_date: Optional, defaults to today.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| start_date | No | ||
| end_date | No |