Home › RPS Guide › Calculation Methodology
RPS calculation methodology
This site's RPS is a percentile ranking ofhistorical price performance within the same market and same lookback windowhistorical price performance. The following formulas, tie rules, and missing value handling all correspond to the production calculation code, not conceptual approximations.
1. Five lookback windows
| Field | Trading day window | Approximate meaning | Comparison range |
|---|---|---|---|
| RPS20 | 20 | Approximately one trading month | Compared only with the current valid samples in the same market |
| RPS50 | 50 | Approximately two and a half trading months | |
| RPS90 | 90 | Approximately four and a half trading months | |
| RPS120 | 120 | Approximately six months | |
| RPS250 | 250 | Approximately one trading year |
2. Interval return calculation
Calculates the interval return for a security based on the valid closing prices at both ends of the specified window. The expression used in the production code is:
If the historical length does not meet the required trading days, or if the window start and end prices are missing or non-positive, the security's return for the corresponding window and its RPS are both recorded as null values and do not participate in the window ranking. Different windows are judged independently, so a recently listed stock may have RPS20 but temporarily not have RPS250.
3. Market-internal percentile ranking
The system first splits the samples by market, then performs percentile ranking on all non-null interval returns. The production implementation is equivalent to rank(pct=True, method="max") × 100, finally retaining two decimal places. The higher the return, the higher the RPS; the highest return corresponds to approximately or equal to 100.
Tied returns use max rules: Securities with the same return receive the percentile corresponding to the highest rank in the tied group. This ensures the same input gets the same score, and also means that the scores do not necessarily uniformly cover every integer.
4. How the valid sample is formed
Inclusion criteria
The corresponding window has sufficient history; start and end closing prices are valid and greater than zero; and the security has an available record in the current database.
Common reasons for temporary exclusion
Insufficient history after a new listing, a trading halt or missing prices, failure of data-quality checks, delisting, or a change in ticker status.
As of 2026-09-24 the current valid sample for RPS50 is: A-shares 5,212 U.S. stocks 8,948 Hong Kong stocks 2,774 Japanese stocks 3,698. These figures change with listings, delistings, history length, and quality checks, and should not be treated as a fixed market size.
5. Boundaries for cross-market and cross-date comparisons
The four markets are ranked separately. An RPS90 in two markets both means each security is in approximately the top 10% of its own market, but this does not imply that their absolute gains are the same. Trading currencies, trading calendars, halt rules, price-limit regimes, and sample composition all differ. Cross-market research must retain the market, window, and snapshot date together.
Historical RPS readings are also affected by data revisions, corporate actions, and sample changes. When citing weekly reports or commentary, preserve the observation date shown on the contemporaneous page rather than backfilling historical conclusions with today’s sample size.
6. Review path
Four-Market Data Coverage Archive
Public data catalog and citation guide
Research and editorial standards
Common methodology questions
Are RPS and RSI the same indicator?
No. RPS on this site is a cross-sectional percentile rank of a security within the same market; RSI is a time-series oscillator of a single security’s own up/down momentum.
Why do stocks with RPS≥90 typically account for about 10%?
Because RPS is a percentile rank. As long as the valid sample is large enough, the top 10% of securities naturally concentrate at 90 and above; this is not a bull- or bear-market signal.
Why does the valid sample size change across dates?
Newly listed securities enter shorter windows once they have accumulated enough history; delistings, trading halts, missing prices, and data-quality checks also change the current sample.
Does a high RPS mean a security can be bought?
No. It only describes relative performance over a past window and must be combined with liquidity, fundamentals, price structure, and independent risk judgment.