Portfolio Rules is the heart of QANTHOS. It’s the tab where you declare, one rule at a time, how the portfolio should be built: which strategies to keep, which to discard, in what order to evaluate them, how to handle their correlation, how to size them. Everything the other Builder tabs show you — equity, filter analysis, margin, stress — is a consequence of the rules you set here.
In simple terms: you loaded a pool of strategies in the Strategies tab, defined each instrument’s operating thresholds in the Tools tab, and now you want a concrete portfolio to emerge from that pool. Portfolio Rules is where you write the instructions that do this work, and the GENERATE PORTFOLIO button is what executes them. The result isn’t a number carved in stone: it’s a portfolio you can inspect, compare, regenerate by changing a rule, and — once you’re convinced — promote to a live portfolio.
An important premise. QANTHOS is an analysis, validation and discovery tool, not a financial advisor. The rules you set in this tab produce a portfolio based on criteria you decide: they are information to be interpreted with your own experience, not investment recommendations. Example thresholds and configurations cited in this chapter are educational starting points and reference conventions common in systematic trading literature, not prescriptions from QANTHOS. Whether a rule is valid in your specific case depends on your pool, the market, the costs and your objectives: you are always the final judge.
1. The underlying idea: a chain of rules
The most useful way to think of Portfolio Rules is as an assembly line. A pool of strategies goes in; it passes through a sequence of stages; a portfolio comes out. Each stage does one precise thing, and the order in which the stages follow one another isn’t a cosmetic detail: it changes the result.
The chain is made up, top to bottom, of four rule families:
- The filters — the ordered list of selection criteria (quality, ranking, thresholds). Configured in the central part of the tab and reordered by drag & drop.
- The Correlation stage — a single final decorrelation pass, applied after all filters. Configured from the 🔗 Correlation button.
- The Portfolio Rebalancer — a balancer that steps in downstream, to keep the portfolio from concentrating too much on a single instrument or asset class. Configured from the ⚖️ Portfolio Rebalancer button.
- Money Management — the sizing: how much size to assign to each surviving strategy. Configured from the ⚙️ Money Management button.
Why are Correlation and Rebalancer separate stages, not filters in the list?
This is one of the Builder’s most important design choices. A classic scalar filter — “Profit Factor greater than 1.0” — judges each strategy on its own: whether you put it before or after another scalar filter, the outcome for a single strategy doesn’t change. Decorrelation is different in nature: it’s greedy and path-dependent. Excluding a strategy because it’s too correlated with another changes the set of survivors, and therefore changes subsequent decisions. That’s why decorrelation doesn’t live in the ordered filter list, but is a single final stage, applied once after all filters have done their work. The same goes for the Rebalancer, which reasons about the overall composition and therefore only makes sense downstream. Keeping the “per-strategy” stages separate from the “on-the-set” ones makes the system’s behaviour predictable.
This entire chain runs at every rotation when the portfolio is rotational: from rotation to rotation the rules stay the same, but the underlying pool evolves and so the selected composition can change. This is exactly the mechanism that lets a portfolio adapt to the market without you having to rewrite the rules every time.

2. The header: how the portfolio is built over time
The first row of the tab gathers the parameters defining when and how the rule chain is applied across history. They don’t concern which strategies to keep — that’s the filters’ job — but the time frame within which everything happens.
| Control | What it sets |
|---|---|
| Type | Static or Rotational. Static: the selection is made once over the entire period and stays fixed. Rotational: the selection is redone periodically, as in a Walk-Forward Analysis, recalculating the filters at each rotation. |
| Test | The period over which to evaluate the portfolio: Full History (all available history), OOS Only (only the Out-of-Sample period, downstream of the OOS date configured for each strategy) or Custom (a date range you choose). |
| Frequency | Only for rotational portfolios: how often to redo the selection — Monthly, Quarterly, Semi-annual, Annual. |
| Day | The rotation day: Last Saturday or First Saturday of the period. Determines the moment the new composition replaces the previous one. |
| Min trades | Minimum number of trades each strategy must have in each filter’s lookback window. If the window contains fewer, the lookback is extended until the threshold is reached (up to a 10-year cap). Set to Off it’s disabled. |
| Lock-box | The portfolio-level anti-overfitting control. Reserves the last N rotations as a validation sample (Out-of-Sample holdout), kept out of rule tuning. Three states: Off (not used), Development (rules are tuned only on the In-Sample, the holdout is hidden) and Validation (everything is generated, IS+OOS, and performance is compared). The Auto checkbox sizes the holdout automatically (~30% of rotations); unchecking it lets you set the number of rotations manually. Applies only to rotational portfolios. |
What “Min trades” is really for. Statistical metrics lose reliability when computed on few trades: a Profit Factor estimated on 4 trades doesn’t say much. Min trades is a safeguard: it ensures the filters’ judgement rests on a sufficient sample, automatically extending the window for slower strategies instead of evaluating them on too-thin data. It’s particularly useful in rotational portfolios with low-frequency strategies, where a short lookback would risk capturing very few trades.
When Type is set to Static, the frequency and day controls have no effect: the selection is unique. When Test is set to Custom, the From: and To: fields appear, along with the OOS Date Only option, which — within the custom period — starts each strategy from its own OOS date if that falls later than the start of the range.

Lock-box: portfolio development and validation
There’s a subtler form of overfitting than the one affecting a single strategy, and it concerns the portfolio as a whole. Even starting from strategies already validated one by one, the way you select and combine them — which filters, which thresholds, which correlation, which Money Management — is itself a series of choices. If you try dozens of configurations and keep the one whose historical equity looks best, you risk having “stitched” the rules to the past: a portfolio that shines on history but might not hold up on new data.
The Lock-box is the safeguard against this risk. The idea is to treat the entire portfolio as if it were a single strategy to validate: you set aside a sample — the last N rotations, the Out-of-Sample holdout — and keep it out of rule tuning. The configuration is chosen looking only at the In-Sample part; then, with rules frozen, you check how it behaves on the never-seen sample. It’s the In-Sample / Out-of-Sample principle applied not to a single strategy, but to portfolio construction. (Applies to rotational portfolios, because it operates by reserving rotations.)
The Lock-box control in the header has three states:
| State | What it does |
|---|---|
| Off | Disabled: historical behaviour, the entire period is used for generation. |
| Development | The last N rotations (the holdout) aren’t even generated: all analyses — equity, filters, metrics — are computed only on the In-Sample. The Out-of-Sample is invisible, and precisely for that reason you can’t tune rules to it, not even unintentionally. |
| Validation | The entire available history is generated (IS + OOS). In the Equity tab you see the full equity and, in the Validation sub-tab, the comparison between In-Sample and Out-of-Sample performance. |
The holdout share is governed by two controls next to the menu. The Auto checkbox (on by default) sizes it automatically to about 30% of the total rotations, always leaving at least one rotation to the In-Sample. Unchecking Auto activates the numeric field, where you manually set how many rotations to reserve for the holdout.
The “hard lock” is the key. In Development mode the holdout rotations aren’t produced at all — they’re not simply hidden from a chart. This is what makes the safeguard real: you can’t peek at the Out-of-Sample result while tuning the rules, so you can’t (even unknowingly) pick precisely the configuration that works best on that sample. It’s the portfolio-level equivalent of not looking at the answers while doing the exercise.
The usage flow happens in two stages: first you work in Development, iterating on the rules until the In-Sample equity convinces you; then, once, you switch to Validation to see whether the Out-of-Sample confirms expectations or performance drops suspiciously.
The holdout is worth using once. This is a discipline rule, not a software constraint: once you’ve seen the Out-of-Sample result, if you go back and change the rules you are — again — tuning them to data you now know, and the holdout is no longer “clean”. A genuine validation would require a never-seen sample. QANTHOS reminds you of this in the validation panel.
Two different “OOS”, not to be confused. Two notions of Out-of-Sample coexist in the header. The Test → OOS Only option refers to each strategy’s own OOS date (the one configured in the Strategies tab): it’s a per-strategy OOS. The Lock-box, instead, reserves the last N rotations of the entire portfolio backtest: it’s a portfolio-level OOS. These are different, independent levels, and they can also be combined.
What the Validation sub-tab shows (full detail in the Equity tab chapter): a synthetic verdict — Robust, Borderline, Overfit or Insufficient Data — accompanied by the comparison of key In-Sample vs Out-of-Sample metrics (CAGR, Sharpe, Sortino, Calmar, Equity R²), by the Walk-Forward Efficiency (WFE) — the ratio between annualized OOS return and IS return — and by statistical robustness indicators such as PBO (Probability of Backtest Overfitting) and DSR (Deflated Sharpe Ratio). The verdict is transparent: it lists the criteria that determined it, so you see why the portfolio is judged one way or another.
Two technical notes. The comparison is computed on RAW equity (one contract per strategy): this way it measures the quality of the selection independent of the Money Management layer. And the thresholds used for the verdict (for example a WFE around 0.50 as a reference for solidity) are conventions common in the literature on systematic trading, not prescriptions from QANTHOS: the tool offers an orientation judgement, the final interpretation is yours.
3. The filters: the selection engine
The central block of the tab is where most of the time is spent. Here you create filters, see them collected in a table, and decide in what order to apply them.
3.1 Creating a filter
The Create/Edit Filter section is a compact row of controls. You set the fields, press Add, and the filter appears in the table below. To edit an existing one, recall it from the table, change the values and press Update.
| Field | Meaning |
|---|---|
| Sel (Selection / Scope) | Which subset of strategies the filter acts on: All Strategies, Single Symbol (one ticker), Asset Class, Custom Group (a group you define). |
| Tgt (Target) | Activated when the scope requires it: indicates which ticker, asset class or group. Inactive with “All Strategies” scope. |
| Metric | The metric to filter on (Profit Factor, Sortino Ratio, Net Profit…). At the end of the list you’ll also find your 🔧 Custom Index entries and the special 📊 Percentile Rank Filter. |
| Per (Period) | The lookback window in months over which to compute the metric. All (0) uses all available history up to the evaluation date. |
| Op (Operator) | The type of selection: Top N (Biggest), Bottom N (Smallest), or a direct comparison — Greater Than (>), Smaller Than (<), Greater or Equal (≥), Smaller or Equal (≤). |
| Val (Value) | The threshold used by the comparison operators (e.g. > 1.5). |
| N | How many strategies to keep with Top N / Bottom N (e.g. the top 15 by Sortino). |
| Active | Enables or disables the filter without removing it from the list. Useful for trying alternative configurations. |
In practice there are two families of filters, and the difference matters:
- Threshold filters (
>,<,≥,≤) are absolute: they compare each strategy’s metric with a fixed value. They’re the typical “quality gates” — “keep only those with Profit Factor above 1.0”. - Top N / Bottom N filters are relative: they rank strategies against each other and keep a fixed number, regardless of the absolute value. They’re the way to say “give me the N best”, letting the pool decide what “best” means at that moment.
The “Any Symbol” scope. When you want to apply the same criterion separately to each ticker — for example “the 2 best strategies for each instrument” — QANTHOS offers the Any Symbol option, which automatically expands the filter into as many filters as there are tickers present. It’s a fast way to build instrument-balanced portfolios without creating filters one by one.
3.2 The Active Filters table and ordering
Created filters accumulate in the Active Filters table, which you can expand or collapse from the header. The table isn’t just a list: row order is application order, top to bottom, and you change it by dragging rows (drag & drop).
For threshold filters the order doesn’t affect the final result — a strict quality gate produces the same effect wherever you place it. But it becomes crucial for relative filters and for multi-metric workflows: a Top N applied before or after a quality gate selects from different sets, and a Percentile Rank Filter that prepares data for a Custom Index must necessarily sit above the Custom Index that consumes it. As a general rule it’s best to arrange filters in three logical blocks: first the absolute quality gates, then the relative ranking, finally any finishing touches.
The ideal tool for checking the effect of the sequence is the Filters Analysis Tab, which shows row by row how many strategies each filter lets through and how many it discards. It’s the first thing to check when a portfolio comes out emptier or more crowded than expected.

3.3 Presets
Above the creation controls there’s a row dedicated to filter presets. A preset is a saved configuration you can recall with a click to repopulate the list, useful for starting from a known base instead of rebuilding filters every time. Some presets apply only the filter list; others, more complete, also restore rotation settings, Money Management, Rebalancer and Correlation.
4. The modules with a dedicated dialog
Four elements of the chain have a configuration rich enough to deserve a separate window, and a separate chapter in this manual. Here we give the framing — what they do and where they sit in the chain — pointing to the sub-chapters for operational details.
⚙️ Money Management. Decides how to size the selected strategies: how much size to assign to each, according to which allocation logic. It’s the last link in the chain, the one that turns a list of strategies into a portfolio with real weight. Includes ready-made presets and an advanced configuration area, including allocation (weights) management.
⚖️ Portfolio Rebalancer. The balancer. After rotation and correlation have produced a composition, the Rebalancer steps in to reduce concentration: if too many strategies pile onto the same ticker or asset class, it excludes some according to a “dominance over the average of the others” logic. Which strategy to sacrifice, when there’s one too many, is decided by a ranking criterion you configure (see the Exclusion Criterion box below).
🔗 Correlation. The final decorrelation stage, applied once after all filters, within each rotation. It compares the equities of surviving strategies and excludes those too correlated with each other, to avoid concentrating risk on twin behaviours. It offers three mutually exclusive methods — classic equity correlation, simultaneous-loss frequency (Co-Loss), stress correlation — and an exclusion rule that acts only on positive correlations above the threshold: two anti-correlated strategies are diversification, not risk, and are never discarded.
Custom Index. The ability to build custom composite metrics, combining several metrics into a single ranking formula. Managed from the Custom Index button in the bottom bar, and once saved they appear in the list of available metrics (prefixed with 🔧), ready to use in any filter. Together with the Percentile Rank Filter they enable multi-metric selection workflows.
These four modules combine: a Custom Index can feed a Top N filter, whose result passes to the Correlation stage, and finally to the Rebalancer and Money Management. It’s the composition of simple pieces that produces sophisticated behaviour. Operational details for each module are in the respective sub-chapters (Money Management, Portfolio Rebalancer, Correlations, Custom Index).
5. The Rebalancer’s “Exclusion Criterion” box
Right below the filters table there’s a collapsible box titled Portfolio Rebalancer — Exclusion Criterion. It’s worth clarifying its nature right away, because it’s the point where the tab most easily misleads: the criteria you set here filter nothing.
They’re used by the Portfolio Rebalancer to answer a precise question: when an over-represented group has one strategy too many, which one gets excluded? The criterion computes a value for each strategy and uses it as an exclusion rank: the strategy with the lowest value on the first criterion is the first to go. In case of a tie, the next criterion acts as a tiebreaker.
The most powerful way to use it is to define a Custom Index that synthesizes several metrics into a single quality score, so the Rebalancer always sacrifices the “least deserving” strategy according to your composite judgement. Details on how these criteria interact with the balancing logic are covered in the dedicated Portfolio Rebalancer sub-chapter.

6. Generate, save, promote: the command bar
The bottom bar gathers the actions performed after setting the rules.
GENERATE PORTFOLIO is the main button: it runs the entire chain on the available strategies and produces the portfolio. Before starting, QANTHOS checks that strategies are loaded and at least one filter exists, and runs a data integrity check. On completion it opens the Equity tab to show results and updates the other analysis tabs. If some selected strategies had few or zero trades in the lookback window, a summary flagging this appears at the end of processing — the right moment to evaluate the Min trades field.
Save and Load export and re-import the entire rule configuration to a .json file: the filter set, the rotation header, Money Management, weights, Rebalancer and Correlation stage. It’s the way to archive a configuration, share it, or keep alternative versions. Regardless, QANTHOS always auto-saves the last configuration, so you find it again on reopening.
Custom Index opens the composite index management window (see dedicated sub-chapter).
The two 💾 Snapshot… and 📂 Snapshot… buttons talk to the Portfolio Comparison Engine: they save the current configuration as a comparable “snapshot” and reload a previously saved one, applying it to the Builder. They’re the bridge to the portfolio comparison tab.
Mark as live is the action that closes the loop: it promotes the current rules and composition to a live portfolio, freezing them as the reference. Once a portfolio is marked live, the indicator in the bottom right shows it, and the Recall settings button in the status bar lets you bring those same rules back into the tab to relaunch the analysis at the next rotation. QANTHOS checks consistency between the current rules and the ones that generated the composition: if you changed them after generating, it invites you to regenerate before marking live, to avoid composition and rules telling different stories.

7. Reading the status bar
The status bar at the bottom of the tab gives immediate feedback without opening other tabs:
- Available — how many strategies are loaded and eligible.
- After filters — a synthetic reference to the filters’ effect (rotation-by-rotation detail lives in the Filters Analysis Tab).
- The live indicator — which portfolio is currently marked live, with name, number of strategies and promotion date, or “No live portfolio”.
- Recall settings — brings the current live portfolio’s rules back into the tab.
8. Common issues and how to avoid them
You pressed GENERATE but nothing happens / a warning appears. You need at least one loaded strategy (Strategies tab) and at least one filter in the list. Without either, QANTHOS stops and flags it.
The portfolio comes out empty or nearly empty. Almost always a too-strict filter chain, or a wrong order. Open the Filters Analysis Tab and look row by row where the pool thins out: often the culprit is a single overly aggressive quality gate or a Top N with too small an N.
A Custom Index errors out or produces zeros. If the formula uses injected percentiles (pct_...), a Percentile Rank Filter on the same metric must exist higher up in the list. Order matters: the filter that prepares the data goes above the index that consumes it.
Changing Correlation or Rebalancer settings doesn’t change the results. It can happen that the stage is enabled but never “bites”: for example if no pair exceeds the correlation threshold, or if risk is already under target. In these cases QANTHOS flags it with a warning at the end of generation, distinguishing “wasn’t needed” from “wasn’t computable”. It isn’t a bug: it’s confirmation that, on that pool, the stage had no exclusions to make.
You changed the rules and “Mark as live” refuses. This is the consistency safeguard: the live composition was generated with a certain rule set, and you’ve since changed them. Regenerate the portfolio with the current rules, then mark it live.
9. An example workflow
What follows is an exploration path, not a recipe. The specific choices depend on your pool, rotation frequency and your objectives.
- Open Portfolio Analyzer → Portfolio Builder → Portfolio Rules.
- In the header choose Type (usually Rotational for a portfolio that adapts over time), the Test period, the Frequency and the rotation Day. Consider whether to enable Min trades depending on how frequent your strategies are.
- Build the filter list: first the absolute quality gates, then the relative ranking (possibly with Percentile Rank + Custom Index), finally the finishing touches. Reorder by drag & drop.
- If you want to manage diversification, configure the Correlation stage (🔗 Correlation).
- If you want to limit concentration on single instruments or asset classes, configure the Portfolio Rebalancer (⚖️) and, if needed, the criteria in the Exclusion Criterion box.
- Set the Money Management (⚙️) to size the selected strategies.
- Press GENERATE PORTFOLIO and analyze the result in the Equity and Filters Analysis tabs. Change a rule, regenerate, compare.
- To defend against portfolio-level overfitting, keep Lock-box on Development while tuning the rules (you’ll only see the In-Sample). Once satisfied, switch once to Validation and check in the Equity tab’s Validation sub-tab whether the Out-of-Sample confirms expectations.
- When the configuration convinces you, consider saving it (Save) or promoting it with Mark as live.
Portfolio Rules’ value lies precisely in this fast cycle of hypothesis and verification: change a rule and immediately see the effect on the whole portfolio. The tool is powerful, but the interpretation — understanding why one configuration works better than another, and whether that “better” will hold out of sample — remains human work, done with Walk-Forward Analysis, stress testing and ongoing monitoring.
10. To learn more
- Money Management — sizing and allocation of selected strategies.
- Portfolio Rebalancer — concentration balancing and exclusion criteria.
- Correlations — the final decorrelation stage and its three methods.
- Custom Index — building composite metrics and multi-metric workflows (Percentile Rank).
- Strategies Tab — loading the pool and starting metrics.
- Tools Tab — per-ticker operating thresholds, including Min Avg Trade.