The Custom Index is, without exaggeration, one of the most powerful tools in the entire Builder. It’s the ability to build a tailor-made metric: instead of selecting strategies by looking at one metric at a time, you combine as many as you want into a single quality formula — your formula — reflecting exactly how you think a strategy should be judged.
In simple terms: where a standard filter asks “Sharpe Ratio above 0.8?”, a Custom Index lets you declare something like “reward those with good risk-adjusted return, linear equity and contained drawdown, all together, with these weights”. The result is a single score for each strategy, which you can then use anywhere in the Builder: in a Top N filter, in a threshold comparison, as the target metric of a Percentile Rank Filter, or as an exclusion criterion for the Portfolio Rebalancer. Once saved, your index appears in the metrics list with the 🔧 prefix, ready like any native metric.
QANTHOS offers two paths to build it, designed for two different styles: the Visual Builder, weighted components with a click-based interface, for those who want to compose quickly; and the Formula Editor, a text editor that speaks Excel’s language, for those who want full expressive control. Both lead to the same place — a reusable index — but with different freedoms.
An important premise. QANTHOS is an analysis, validation and discovery tool, not a financial advisor. The formulas, weights and metrics described in this chapter are configurable levers and educational starting points, not recommendations. A Custom Index encodes your idea of quality: the tool computes it consistently and repeatably, but whether that idea is valid for your pool is for you to establish, validating it with Walk-Forward Analysis, stress testing and observation over time.
1. What a Custom Index is and why it’s powerful
Anyone building systematic portfolios soon runs into a limit: no single metric tells a strategy’s whole story. Sharpe Ratio rewards risk-adjusted return but ignores the equity curve’s shape; Profit Factor tells you if it earns more than it loses but not how regular it is; Max Drawdown measures pain but not return. Selecting by looking at one metric at a time inevitably means neglecting the others.
The Custom Index solves this at the root. It’s a composite index: a formula that merges several metrics into a single number, according to the weights and logic you decide. This makes it possible to express multi-dimensional judgements — “I want strategies balanced on risk, regularity and robustness” — in a single criterion the Builder can sort, filter, and rank by.
Its power comes from three properties worth focusing on:
It’s a first-class metric. Once created, a Custom Index behaves exactly like a native metric. You’ll find it in the metrics list (with the 🔧 prefix) and can use it in any filter: a Top N selecting the best by your index, a threshold comparison, or as the Target Metric of a Percentile Rank Filter or as an exclusion criterion for the Rebalancer. It’s the glue holding together the Builder’s most sophisticated selection workflows.
It draws on the entire metric catalog. While the Rules tab’s direct filters work on a reduced set of commonly used metrics, the Custom Index has access to QANTHOS’s full catalog — several dozen metrics, including the more advanced ones: rolling Sharpe and Sortino and their stability, downside deviation, upside potential ratio, return skewness and kurtosis, the entire VaR/CVaR family, OOS/IS robustness metrics, and more. It’s the way to bring dimensions into selection that would otherwise stay inaccessible.
It’s consistent with standard filters. A Custom Index using profit_factor reads exactly the same value a “Profit Factor” filter would use: the components draw on the same canonical calculation source as standard metrics. There’s no risk of your index “seeing” different numbers than the rest of the Builder.
2. Where they’re managed: the Custom Index Manager
Custom Indexes are created and managed from the Custom Index Manager window, opened from the Custom Index button in the Portfolio Rules bottom bar. The window is split into two columns.
On the left is the list of Saved Custom Indexes and the management commands: New to create one from scratch, the trash icon to delete the selected one, Load Preset to start from a ready-made configuration, and the Export / Import pair to exchange indexes as .qix files (you can also drag a .qix file directly onto the window).
On the right is the editor for the selected index: at the top the common Name and Description fields, and below a two-tab block — Visual Builder and Formula Editor — the two build modes described in the following paragraphs. At the bottom, Cancel and Save Custom Index.
One index, one mode. A saved Custom Index is of type visual or formula: on save QANTHOS records the active tab. If you worked in one tab but had also filled the other, a warning reminds you that only the active one will be saved — so you don’t lose work by accident.

3. Mode 1 — Visual Builder
The Visual Builder is the click-based mode: you compose the index by adding metrics one at a time, each with its own weight, and QANTHOS derives the formula for you. Ideal for experimenting quickly without writing anything.
Each component is a row with four controls:
| Control | Meaning |
|---|---|
| Metric | The metric to include, chosen by name from the full catalog. |
| Weight | The component’s relative weight (0.1 to 10, default 1.0). Higher = weighs more in the score. |
| Power | An exponent applied to the value (0.1 to 5, default 1.0). Used to give more “relief” to the tails of the distribution: a power greater than 1 amplifies the differences between high and low values. |
| Invert | Inverts the component’s sign. Useful when you want a “higher is better” metric to weigh negatively in your index. |
Above the components you choose two options governing how they merge:
- Combination: Weighted Sum (contributions add up), Weighted Average (the sum divided by the weights, keeps the components’ scale) or Product (contributions multiply — a component near zero collapses the whole score).
- Normalization: None, 0-1 or 0-100. With normalization enabled, each component is brought to a common scale before being combined, using each metric’s typical ranges.
Automatic inversion of “lower is better” metrics. The Visual Builder knows, for every metric in the catalog, whether high values are better or worse. Metrics where lower is better — like Max Drawdown, Ulcer Index, volatilities — are automatically inverted under the hood, so a smaller drawdown produces a higher score. You don’t need to worry about it: the interface handles it. The Invert checkbox is for the opposite case — when you want a normally “higher is better” metric to weigh negatively. This behaviour reduces sign errors, at the cost of a bit less flexibility than the Formula Editor.
As you compose, the Resulting Formula area below shows in plain text the formula generated by your configuration: a useful window into what the interface is producing, and a natural bridge to the Formula Editor when you want more control.
Watch out for different scales. If you combine metrics with very different orders of magnitude without normalization — for example Profit Factor (typically between 0 and 5) and Net Profit (which can be tens of thousands) — the “large” metric dominates the score and crushes the others’ contribution. QANTHOS flags this on save and suggests setting Normalization to 0-1 or 0-100. It’s one of the most common pitfalls in building a composite index.

4. Mode 2 — Formula Editor (Excel syntax)
The Formula Editor is the mode that unlocks the Custom Index’s full potential. Here you write a text formula directly, exactly as you would in a spreadsheet: you use metric names as variables and combine them with operators and functions. It’s the path for those who want total expressive freedom — including conditions, functions and logic the Visual Builder can’t represent.
4.1 A syntax that speaks Excel
The formula is written with the same grammar as Excel:
- Arithmetic operators:
+-*/%, exponentiation^and parentheses( ). - Comparisons:
><>=<===!=. - Functions (name followed by parentheses, case-insensitive):
| Function | Syntax | What it does |
|---|---|---|
| MAX | MAX(a, b, …) |
The maximum of two or more values. |
| MIN | MIN(a, b, …) |
The minimum of two or more values. |
| ABS | ABS(x) |
Absolute value. |
| LOG | LOG(x) |
Natural logarithm (requires x > 0). |
| SQRT | SQRT(x) |
Square root (requires x ≥ 0). |
| IF | IF(condition, true_value, false_value) |
Returns one value or the other depending on the condition. |
| AND | AND(a, b, …) |
True if all conditions are true. |
| OR | OR(a, b, …) |
True if at least one is true. |
| NOT | NOT(x) |
Logical negation. |
Paste formulas from Excel, even in Italian format. The Formula Editor recognizes both conventions: the international one (comma as argument separator, period for decimals) and Italian-format Excel (semicolon as argument separator, comma for decimals). If a
;appears in the formula, QANTHOS automatically interprets it Italian-style. In practice you can copy a formula written in Excel and paste it here without rewriting it:MAX(0; MIN(1; profit_factor / 5))works exactly like its international counterpart.
Variables are the metrics’ technical names (lowercase, with underscores): profit_factor, sharpe_ratio, max_dd_pct, equity_r_squared, and so on. So you don’t have to memorize them, the editor gives you the catalog (see below): a double-click inserts the exact name at the right spot.
4.2 The editor and its aids
The Formula Editor interface is designed for writing without mistakes:
- A multi-line editor where you type the formula, with an example already visible as a guide.
- A real-time validation banner below the editor: on every change QANTHOS checks the formula and tells you whether it’s valid (flagging how many metrics it references) or, if there’s a problem, what it is — wrong syntax, unrecognized metric, disallowed function.
- An Available Metrics panel, filterable by text, with all catalog metrics: each entry shows the technical name and the descriptive one, and a hint indicates the typical range and whether “higher is better” or “lower is better”. Double-click and the metric lands in the formula.
- A Functions and Operators panel listing the functions and a reminder of the operators. Double-click on a function inserts its template ready to fill in.
- A Strategy Preview section: choose a strategy from the menu and see instantly the value your formula produces for it. The fastest way to verify the formula does what you think, before even saving it.
Full control, full responsibility. Unlike the Visual Builder, the Formula Editor doesn’t automatically invert “lower is better” metrics and doesn’t normalize anything: the formula is evaluated exactly as you wrote it. That’s the price of maximum expressiveness. If you want
max_dd_pctto weigh negatively, you put it in the denominator or prepend a minus sign yourself; if you combine metrics of different scales, you normalize by hand (for example(metric - min) / (max - min)). QANTHOS warns you on save if the formula mixes very different scales without normalization, but the logic stays in your hands.

4.3 Injected percentiles
The Formula Editor is also the only place to use percentiles injected by the Percentile Rank Filter. Writing pct_sortino_ratio, pct_k_ratio and similar references the percentile a Percentile Rank Filter (in Injector mode) has computed and “injected” higher up in the pipeline. It’s the mechanism enabling the Builder’s most powerful multi-metric composite rankings. Rule to remember: if a formula uses pct_<metric>, a Percentile Rank Filter on that metric must exist before the Custom Index in the filter list. The full workings of this pairing are described in the dedicated Percentile Rank and Custom Index chapter.
5. Visual Builder or Formula Editor?
The two modes aren’t in competition: they cover different needs. This table helps you choose.
| Visual Builder | Formula Editor | |
|---|---|---|
| How you build it | By components, with clicks | Writing a text formula |
| Learning curve | Immediate | Requires formula familiarity |
| “Lower is better” inversion | Automatic | Manual (you handle it) |
| Normalization | Built-in option (0-1 / 0-100) | By hand, inside the formula |
| Conditions and functions (IF, MAX, …) | No | Yes |
Injected percentiles (pct_*) |
No | Yes |
| Expressive freedom | Good | Maximum |
In short: the Visual Builder is perfect for “linear” composite indexes — weighted sums or averages of a few metrics — built quickly and without sign risks. The Formula Editor is the choice when you need richer logic: conditions (“if continuity is high, double the profit factor’s weight”), functions, custom normalizations, or using injected percentiles.
6. Saving, reusing and sharing
A saved Custom Index is persistent: you find it again on reopening and it appears in the metrics list ready to use. Besides creating them from scratch, QANTHOS offers three shortcuts:
Presets. The Load Preset button opens a collection of ready-made indexes, each with a name and description, that populate the Visual Builder as a starting point. A great way to see “how a composite index is made” before building your own: load one, study it, modify it and save it under your name.
Export / Import .qix. A Custom Index can be exported as a .qix file and re-imported elsewhere — useful for archiving your indexes, keeping versions, or sharing them. Import shows a preview before confirming and handles name conflicts; you can also drag a .qix file onto the window to import it on the fly. On export you can sign your indexes with an author name (asked once and then remembered).
Both modes — visual and formula — export and import the same way.
7. Common issues and how to avoid them
The formula errors out or won’t save. Look at the validation banner below the editor: it says exactly what’s wrong. The most frequent causes are a misspelled metric name (they must match the catalog’s technical names — use double-click to insert them without errors) and an unbalanced parenthesis.
An index using pct_... produces zeros or errors. Injected percentiles only exist if a Percentile Rank Filter on the same metric is applied higher up in the filter list. Without that filter upstream, the field doesn’t exist. Order matters: the filter that prepares the data goes above the index that consumes it.
The score is dominated by a single metric. Almost always an unnormalized-scale issue: a metric with large values (Net Profit) crushes the others. In the Visual Builder set Normalization; in the Formula Editor normalize by hand. QANTHOS warns you on save when it detects this situation.
I lost the work done in a tab. An index saves as either visual or formula, according to the tab active at save time. If the other tab also had content, QANTHOS flags it before proceeding: read the warning and confirm only if the active tab is the right one.
The formula returns a calculation error. Division by zero, logarithm of a non-positive number, square root of a negative one, or infinite results are caught and flagged instead of producing meaningless numbers. Often a defensive touch in the formula is enough, like adding + 1 to a denominator that can hit zero.
8. Formula examples
The formulas below are educational examples to show the Formula Editor’s syntax and possibilities. They’re starting points, not optimal recipes: every index should be tested and validated on your own pool before going into production.
Profit/risk efficiency, robust to zero drawdowns:
profit_factor * sharpe_ratio / (max_dd_pct + 1)
Conditional quality gate (rewards profit factor only if continuity is high):
IF(continuity_index > 70, profit_factor * 2, profit_factor)
Score with double condition (assigns a value only to those meeting two requirements, otherwise zero):
IF(AND(profit_factor > 1.5, avg_trade > 50), recovery_factor, 0)
Multi-percentile composite (requires three upstream Percentile Rank Filters, on Sortino, UPI and K-Ratio):
(pct_sortino_ratio + pct_ulcer_performance_index + pct_k_ratio) / 3
Manual normalization with clamp (brings profit factor onto a bounded 0–1 scale):
MAX(0, MIN(1, profit_factor / 5))
9. An example workflow
An exploration path, not a recipe. The right metrics, weights and formula depend on your pool and what you’re looking for.
- From the Portfolio Rules tab, open Custom Index in the bottom bar.
- Press New and give the index a Name and a Description.
- Choose the mode: Visual Builder for a weighted-component index, Formula Editor for richer logic or to use injected percentiles.
- Build the index: in the Visual Builder add metrics with their weights and choose combination and normalization; in the Formula Editor write the formula, aided by the metrics catalog, functions, and the Strategy Preview to verify it on the fly.
- Save Custom Index. From then on it appears in the metrics list with the 🔧 prefix.
- Go back to the filter list and use your index: as a Top N metric, as a threshold, as a Percentile Rank Filter target, or as a Rebalancer exclusion criterion.
- GENERATE PORTFOLIO and evaluate the result in the Equity and Filters Analysis tabs. Compare different versions of the index via Walk-Forward Analysis before choosing one.
The Custom Index is the tool that turns your selection philosophy into an executable rule. It’s expressive and powerful precisely because it doesn’t impose a “right quality”: you define it. But with that freedom comes the responsibility to validate — the most elegant formula isn’t necessarily the one that holds up out of sample, and only testing can tell.
10. To learn more
- Portfolio Rules — the rule chain and where the Custom Index fits.
- Percentile Rank — the Percentile Rank Filter’s Injector mode and multi-percentile composite workflows (
pct_*). - Portfolio Rebalancer — using a Custom Index as a composite exclusion criterion.
- Correlations — the decorrelation stage’s ranking metric.