Expand description
Pure snapshot-factor scoring helpers (no I/O), shared by every pomelo-*
vendor sync crate so a pe_industry_pctile / analyst_upside_pct panel means
the same thing regardless of which vendor produced it (conventions:
citrusquant issue #211).
These operate on values a vendor has already extracted — the vendor-specific field maps and the rating-count/string mappers stay in each vendor crate. Only the cross-vendor scoring math lives here.
Constants§
- MIN_
COHORT - Minimum cohort size for a meaningful industry percentile.
Functions§
- analyst_
upside_ pct (target − close) / close × 100;Nonewhenclose <= 0or inputs aren’t finite.- pe_
industry_ pctile - P/E industry percentile in
[0, 100];Nonefor a non-positive P/E or a cohort thinner thanMIN_COHORT. - percentile_
rank - Midrank percentile of
vwithincohortin[0, 1].