Skip to main content

Module factors

Module factors 

Source
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; None when close <= 0 or inputs aren’t finite.
pe_industry_pctile
P/E industry percentile in [0, 100]; None for a non-positive P/E or a cohort thinner than MIN_COHORT.
percentile_rank
Midrank percentile of v within cohort in [0, 1].