score_compute
Compute custom quality scores against a selected peer group using weighted metrics, winsorization, and z-scoring; filter results by sector, region, or market cap.
Instructions
Compute custom scores from a CustomScoreConfig, scored against a chosen peer group.
The config is a CustomScoreConfig: weighted metric groups (each with weighted
metrics) plus scoring parameters winsorizePercentile (1-10), missingDataPercentile
(0.1-0.5), normalizeGroupZScores and includeDuplicatesInScoring (booleans). Loose
inputs (snake_case keys, legacy winsorize/zScore flags) are normalized automatically.
Scoring happens in two stages, and they answer different questions.
Stage 1 — scoring_universe: who is in the peer group. Quality scores are
relative: each company is winsorized and z-scored against a population. Narrowing this
changes every score and can reorder the list. Accepts sectors, industries,
regions, countries, currencies, exchanges, min_market_cap_usd and
max_market_cap_usd. Omit it to score against the whole universe.
Stage 2 — the filter arguments below: which rows come back. Applied after scoring, so they never change a score. They accept the same keys as stage 1, so any filter can be asked either way. OR logic within a filter, AND across filters.
So "best European tech judged against European tech" is
scoring_universe={"sectors": ["Technology"], "regions": ["Europe"]}, while "best
European tech judged against the world" is sectors=["Technology"], regions=[...] as
stage-2 arguments. The response's scoring_universe field reports the peer group and
its size — scores computed against different peer groups are not comparable, so do not
mix them in one table.
Two things do not fit the split cleanly, and both are deliberate:
min_market_cap_usdas a stage-2 argument also floors the scoring population (a long-standing backend behaviour). Setmin_market_cap_usdinsidescoring_universeto control the peer group explicitly; it overrides the stage-2 floor.max_market_cap_usdfilters rows only unless set inscoring_universe.min_score/max_score/ticker/tickerscannot appear inscoring_universe: the first two filter on the scores being computed, the rest select rows. Passing them there returns an error rather than being ignored.
A nested config['filters'] block is saved-screen state, persisted by
screen_share/systems_create/systems_update so a screen restores its view.
Passing a saved config here applies that block as stage-2 filters (an explicit argument
below wins), matching what the web app does — it never defines the peer group.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| config | Yes | ||
| offset | No | ||
| regions | No | ||
| sectors | No | ||
| sort_by | No | quality_score | |
| countries | No | ||
| exchanges | No | ||
| currencies | No | ||
| industries | No | ||
| sort_order | No | desc | |
| scoring_universe | No | ||
| include_duplicates | No | ||
| max_market_cap_usd | No | ||
| min_market_cap_usd | No |