Portfolios, Accounts & Live TradingGuide

Portfolios

A single backtest runs one set of rules over one capital base and one date range. A Portfolio runs several backtests at once. You give each one a percentage of a shared capital base, set one date range for all of them, and the platform re-runs every backtest over that range and aggregates the results into one portfolio-level report. A Portfolio is a library entity, the same kind of saved object as a backtest or a signal, so you build it once and reuse it anywhere.

Updated Jul 20265 min read

What a Portfolio is

A Portfolio combines multiple backtests, each with a percentage allocation, into one combined performance evaluation. There is one capital base and one date range for the whole Portfolio. Each allocated backtest is re-run over that shared range, and the runs happen in parallel. Their outcomes aggregate into a single report that reads much like single-backtest results, with a few additions covered below.

Think of it as the level above the backtest. A backtest answers "how did this one strategy do." A Portfolio answers "how did this mix of strategies do together, sharing one account's capital."

A Portfolio is a library entity, global to your library rather than owned by any one project. That is what lets you open the same Portfolio from different projects, snapshot it, and clone it, all covered under Where Portfolios live.

Portfolio fields

A Portfolio has three fields.

Initial capital

The total capital for the Portfolio.

  • Values: a positive dollar amount.
  • Default: none; you set it when you build the Portfolio.
  • Effect: the amount is divided across the allocated backtests when the Portfolio runs, following the allocation percentages. Each backtest receives initial capital = portfolio initial capital × its allocation %.
  • Interactions: this overrides the Initial Capital set on each underlying backtest. The value on a backtest's own page is not used once the backtest is inside a Portfolio.

Date range

The window over which the Portfolio is evaluated.

  • Values: a start date and an end date.
  • Default: none; you set it when you build the Portfolio.
  • Effect: every underlying backtest is re-run over this range.
  • Interactions: this overrides the date range set on each backtest itself. The Portfolio's range is the one that runs.

Backtests and allocations

The list of backtests in the Portfolio, each with a percentage of the total capital.

  • Values: one or more backtests from your library, each paired with a percent.
  • Default: none; you add backtests and set each percent when you build the Portfolio.
  • Effect: each backtest is re-run with initial capital = portfolio initial capital × its allocation % and the Portfolio's date range.
  • Interactions: allocations are not required to sum to 100%. Any portion you leave unallocated is held as cash. See Allocations and unallocated cash.

Allocations and unallocated cash

Allocations do not have to sum to 100%. Whatever you do not allocate is held as cash inside the Portfolio for the full date range.

Take three backtests at 40%, 30%, and 20%. That is 90% allocated. The remaining 10% sits in cash and earns no strategy return. On a $100,000 Portfolio, the three backtests run on $40,000, $30,000, and $20,000, and $10,000 stays in cash.

This is deliberate. Leaving a cash buffer is a real allocation decision, so the Portfolio does not force your percentages up to 100 or silently rescale them. What you type is what runs.

How a Portfolio runs

When you run a Portfolio, it takes control of two settings on every backtest it holds: Initial Capital and Date Range. It replaces each backtest's own values with the Portfolio's.

Each backtest then re-runs with:

  • initial capital = portfolio capital × that backtest's allocation %
  • date range = the portfolio date range

All backtests run in parallel over the same window. Their results aggregate into one portfolio-level report. The Initial Capital and Date Range you set on a backtest's own page are not used once that backtest is inside a Portfolio: the Portfolio's Initial Capital (split by allocation) and Date Range replace them for every run inside it. To reason about a Portfolio number, read it against the Portfolio's capital and range, not the values on each backtest's page.

Portfolio results

The aggregated report resembles single-backtest results, with two additions: the equity curve carries a line per backtest plus an aggregate line, and there is a rolling-correlation chart that single-backtest results do not have.

Equity curves

The equity chart plots one line per allocated backtest plus one aggregate line for the Portfolio as a whole. You read each strategy's contribution and the combined result on the same axes, over the Portfolio's date range.

Rolling correlation

A rolling-correlation chart surfaces how correlated the allocated backtests' returns are over time. Two strategies that looked independent on average can move together in a stress window, and this chart is where that shows up. The rolling window is a control one level up on the chart, and the chart names its active window length.

Every other statistic in the report, Sharpe ratio, max drawdown, win rate, CAGR, and the rest, is the same statistic defined on single-backtest results, aggregated at the Portfolio level. For their definitions and the defaults behind them, see reading backtest results and the metrics glossary.

Where Portfolios live

A Portfolio is a library entity, global to your library. To view or edit one, you open it in a project tab. Opening it in a project is a working surface, not ownership: the same Portfolio can be opened from any project, and editing it in one place edits the one library entity.

This is what makes a Portfolio safe to attach to a running account. When an account trades a Portfolio, it trades a snapshot, a frozen copy taken at attach time, not the live library entity. You can keep editing the library Portfolio, or clone it to iterate, without disturbing what the account is trading.

In the DSL

Today the Signal language ships one book accessor, the no-arg book(). Inside a backtest it returns the current backtest's book-level state per minute: net liquidation value, margin, and excess liquidity. See signals inside a backtest for how book() is used in an adjustment trigger. A single backtest is a single book, so book() takes no argument.

Portfolios add a second level of state above the book, and two accessors are planned to reach it:

  • A portfolio() accessor for aggregated cross-strategy state at the Portfolio level.
  • A book(slug) form to reach a specific book within a Portfolio.

Neither is callable yet. Only the no-arg book() exists in the current Signal language.

Was this page helpful?