Home › Documentation › Portfolio, capital & risk
Module

Strategy Portfolio

A basket of specific strategies discovered in the Mass Test. The portfolio re-tests them, charts them together and measures the effect of diversifying: the sum of several weakly correlated strategies usually has a smaller drawdown than any of them alone. It opens from the Portfolio menu in the main window.

How to add a strategy

① In the Mass Test results table, right click a strategy.
② Choose "➕ Add to Strategy Portfolio…".
③ Pick the destination portfolio from the list of existing ones (you create them beforehand with the New button in the Portfolio window).

Portfolios are multiple and named; if you create one with a name that already exists, the system warns you so you do not overwrite it.

What gets stored

For each strategy it stores its source symbol and timeframe, the metrics shown (a snapshot) and everything needed to re-test it: the specific entry/exit conditions, direction, TP/SL, MaxAnd, point value and commission.

C:\AniQuant\portafolios\
Trend_ES.json
Intraday_mixed.json
...

The Portfolio window

A grid lists every strategy with its columns: Symbol · TF · Strategy · Trades · Net P. · Win% · Net P% · Max DD% · P.F. · AvgT%. That is where you manage the portfolio:

Reassign symbol / TF

Each strategy stores where it came from, but you can override the underlying or the timeframe it runs on (an origin + reassignable model). Marked with *.

Enable / disable

Include or exclude strategies from the run without deleting them.

▶ RUN

Re-tests every active strategy on its effective symbol+TF (loading the BIN and resampling where needed) and recomputes the metrics live.

▦ CHART

Opens the portfolio's combined equity window.

↗ Export EL

Generates the selected strategy's EasyLanguage code, ready for TradeStation. No need to go back to the Mass Test to export.

↗ Export MT5

Generates the selected strategy's MQL5 Expert Advisor, for MetaTrader 5.

↗ Export PRT

Generates the selected strategy's ProRealTime (ProOrder) code, for ProRealTime.

↗ Export AFL

Generates the selected strategy's AmiBroker formula (AFL), with native stops (ApplyStop).

Capital model: profit in currency ($) at 1 contract using each instrument's point value and commission; the combined curve is the direct sum of the P&L.
Indicator parity in the export: the exported code reproduces AniQuant's calculations, not each platform's native functions. In particular, the ATR is computed with Wilder smoothing (as in AniQuant), because TradeStation's AvgTrueRange function uses a simple average of the True Range. That way strategies using ATR or Keltner give practically the same results in AniQuant, TradeStation and MetaTrader 5. The EasyLanguage code itself carries a comment explaining it.
The grid, like all the others

Each column gets only the width it needs and the strategy name gets the rest, so it does not get cut off mid-rule while a narrow column like Origin takes up as much room as Net P. Click the header to sort: text starts ascending and numbers descending, which is what you expect from "sort by name" versus "sort by profit".

With the keyboard: ↑ ↓ move the selection, Home and End jump to the ends, and the space bar enables or disables the selected strategy. The ordering is only a matter of the view: the buttons keep acting on the row you see selected, however you have sorted it.

⚡ The Actions menu: the same one in all six windows

What you can do with a strategy does not depend on the window you found it in. It would be easy for it to depend on that —each window with its own handful of actions: fifteen here, seven there, four somewhere else—, and then you would have to ask yourself a question that should not exist: "to run a Walk-Forward on this strategy, which window do I have to open it in?".

There is one single menu. Right click any strategy —or the ⚡ Actions button— and the same ones come up, grouped:

Analyze

Performance · AQ Contrast · 360 Analysis

Validate

Survival Test · Walk-Forward

Optimize

In the Strategy Lab · The exits only

Strategy

Edit AQ · Save to the Library

Export

EasyLanguage · MQL5 · ProRealTime · AmiBroker · TradingView (Pine)

Portfolio

Add to the Portfolio

A strategy sealed by AQ Genesis can be exported to TradingView, validated with Walk-Forward or dissected with AQ Contrast without first taking it through the Strategy Lab. The Portfolio offers 14 actions; the Library, 14; the Seasonal Optimizer, 13 — and there the actions apply to the whole plan (a strategy with its windows joined by OR), so a seasonal plan can be exported and validated like any other strategy.

When an action is not possible, it is grayed out and says why

That is deliberate: a menu that changes shape in every window has to be relearned every time; one that is always the same is learned once. The only case today is the 360 Analysis outside the Strategy Lab — two of its four phases need the full sweep's candidates, so it would give half a report there. PBO does not appear either: it is not an action on one strategy, it analyzes the whole sweep.

Four Strategy Lab actions keep a local version for a specific reason: Performance and AQ Contrast reuse the series it already has loaded instead of reopening the file (with 1-minute data that is millions of bars), and its Walk-Forward can re-optimize from the search template on each window, which cannot be done from outside.

The export does not depend on the window: all five languages come out character for character identical wherever you export from, with and without trailing, break-even and time-stop. It matters more than it looks: if it did depend on that, you would end up trading code different from the one you validated, and no error would give it away.
The strategy travels whole: the ones coming from AQ Genesis arrive at the Portfolio with their time-stop and their slippage. If the search applied them but they were not saved with the strategy, re-running it outside Genesis would produce different numbers — with different rules and different costs from the ones that selected it.

The portfolio's equity chart

On a real date time axis, it draws each strategy's equity and the combined curve (the sum of the ticked ones). Two tabs at the foot: Chart and Trades.

Side bar (always visible)

  • →One row per strategy: a color swatch (matching its curve), a Strategy N checkbox and its net profit (green/red).
  • → A tooltip with the full condition on hover.
  • →All / None buttons and Correlation matrix.
  • → Ticking or unticking recomputes the combined curve instantly.

Summary and crosshair

  • →A strip at the bottom with the portfolio summary (ticked ones): net profit, Max DD $ and %, return, trades, PF, Win%.
  • →Crosshair: as you move the mouse, guide lines plus a readout of the date and the combined equity at that point.
  • → Double-buffered rendering: crisp and flicker-free.
Trades tab

Profit by day

A grid with the P&L aggregated by day. For every ticked strategy it shows two columns —Simple (that day's) and Cum. (cumulative)— and at the end Total Simple / Total Cum. Each strategy's header carries its color; the amounts are green (profit), red (loss) or gray (zero).

Date     │ E1 Simple │ E1 Cum.  │ E2 Simple │ E2 Cum.  │ Total Simple │ Total Cum.
01/02/24 │ +120.00  │ +120.00 │ −80.00   │ −80.00  │ +40.00   │ +40.00
01/03/24 │ −45.00   │ +75.00 │ +60.00  │ −20.00  │ +15.00   │ +55.00
Analysis

Correlation matrix

It measures how the strategies' equities move together (Pearson on daily changes). It lets you spot redundant strategies and keep the ones that genuinely diversify. The heatmap:

Red · high correlation

The two strategies win and lose at the same time → they contribute the same thing. Candidates for pruning.

Gray · no relationship

Independent behavior. They diversify reasonably well.

Green · anticorrelation

One covers the other's falls → the best diversifier for cutting the combined drawdown.

💡
How to build a good portfolio

Combine strategies with low correlation to each other (green/gray in the matrix). Tick and untick in the side bar and watch the combined Max DD fall against the sum of the individual ones: that is the real benefit of diversifying. The Trades tab shows you which days each one contributes.

Try it yourself

AniQuant can be tried free for 30 days, with every module and no card.

← Previous
AQ Holding Profile: how long to hold
Next →
Portfolio builder by correlation
More in Portfolio, capital & risk