Guide · 3 of 5

How to build a ranking system in Stoxa

Build a ranking tree of factors and composites, choose directions, scopes and NA policies, test it with the bucket test, and use the rank in a screen or backtest.

Screenshots from the Stoxa app on 2026-11-02. Figures in them are examples from that date and will differ from current output.

A ranking system scores every stock from 0 to 100 so a screen, a backtest or a simulation can buy from the top. This guide copies a built-in system, changes it, tests it with the bucket test and puts it to work. The theory, with worked examples, is in Ranking systems and the bucket test.

Open Rankings and start from a template

Open Rankings in the top bar. The right-hand list has the Templates (the eight built-in systems, such as Core: Combination and Quality at a Reasonable Price) and My rankings. Templates are read-only: open one and press Copy to edit, or press + new ranking to start blank.

Edit the tree

The tree starts at the root composite. Every node has a name and a weight; weights are relative among siblings, and the editor shows each node’s share among its siblings and, in brackets, of the whole system. Add nodes with + factor, + composite and + conditional:

  • a factor takes one numeric field and a direction, higher is better (ROIC, margins, momentum) or lower is better (P/E, leverage, volatility), and a scope: universe, sector or industry. Rank valuation multiples and margins within the industry; rank momentum and volatility across the universe;
  • a composite groups factors (a Value block, a Quality block) and re-ranks their weighted mean;
  • a conditional sends stocks that meet a condition (for example sector in Financials) to one branch and the rest to another, so banks can be scored on different factors.
Ranking tree editor with Value and Quality composites, factor rows with direction, scope and weight, and the share of each node

Errors appear under the tree with the path of the node at fault; nothing is saved until the definition is valid.

Choose what a missing value scores

missing values sets the NA policy. negative (the default) puts stocks with a missing value just below the worst valid one; neutral puts them in the middle; skip drops the factor from that stock’s average. A loss-maker has no P/E, so under negative a value ranking pushes it down, under skip it is judged on its other multiples. The choice can move results by several points a year; the theory section has a five-stock example.

Save it

Give it a name and press Save new (later, Save). Your systems are private to your account.

Run the bucket test

Under Performance test, choose the universe, the window, the rebalance frequency and the number of buckets (10 by default), and press Run performance test. On every rebalance date the universe is ranked and cut into equal buckets, bucket 1 the lowest ranks, and each bucket is held at equal weight to the next date.

Rank performance test: Spearman, slope, top and bottom bucket returns and the excess return by bucket bar chart

Read the ladder

The bar chart shows each bucket’s annual return (or excess over the benchmark). A ranking that works shows a ladder rising from bucket 1 to the top. The cards give the Spearman correlation between bucket and return (1 = a perfect ladder), the Slope (annual return per bucket), the Top bucket, Bottom bucket and Top minus bottom. The Statistics table repeats them for the Whole period, the First half and the Second half: a ranking that worked in only one half has probably been lucky.

Resist tuning weights until the chart looks perfect: every variation you try and keep makes the test less trustworthy. Round weights, few factors and a reason for each factor beat a decimal-perfect fit.

Use the rank in a screen or a backtest

Use in screener and Use in backtest open those pages with the system chosen in rank by. The screener then sorts by rank, adds a rank column, and offers the fields Rank, rank position and the 4- and 13-week rank changes in the filter builder, so a rule such as “Rank >= 80” works like any other. In a backtest, the top N are picked by rank, and hold tolerance counts rank positions. In the simulator, a rank orders the candidates and drives the “rank falls below” sell rule.

Next: run the ranking as a portfolio in How to simulate a strategy.