DocsPortfolios, Accounts & Live TradingAccounts and the entity hierarchy
Portfolios, Accounts & Live TradingGuide

Accounts and the entity hierarchy

An Account sits at the bottom of the entity hierarchy. It wraps at most one Portfolio and runs it forward on live data, either simulated (paper) or real (live). Everything above it is design and evaluation over history; the Account is where a set of rules starts trading forward in time. This page defines the Account entity and shows how Strategy, Backtest, Portfolio, and Account fit together.

Updated Jul 20264 min read

The hierarchy, in full

Four entities stack in order: Strategy, then Backtest, then Portfolio, then Account. A Strategy is a mental model, the conceptual set of entry, exit, position design, and sizing rules. It has no object in the app; you define it by filling in the fields of a Backtest. A Backtest evaluates those rules against historical data. A Portfolio combines several Backtests, each with a percentage allocation. An Account wraps a Portfolio and runs it on live data.

An Account holds at most one Portfolio, and an empty Account with no Portfolio is a valid state. That is the whole span of the accounts area. For the reasoning behind this shape, see the section overview.

What an Account is

An Account is a wrapper over a Portfolio that runs it on live data. The data is real; the orders are either simulated (paper) or real (live). See paper vs live trading and brokers for the mode split.

An Account holds at most one Portfolio at a time. An empty account, one with no Portfolio, is a valid state.

The Portfolio an Account holds is a snapshot owned by the account, not a live reference to the library entity. Once the Portfolio is attached, edits made later to the library version do not reach the account. The account trades the snapshot it took, frozen at attach time.

Account fields

An Account carries five fields. Initial capital and start date are set once at creation; Portfolio, state, and the ledger track what the account is doing over its life.

Initial capital

The account's starting capital.

  • Values: a user-defined dollar amount for a paper account; read from the linked broker account for a live account.
  • Default: set once at account creation. There is no separate default.
  • Effect: seeds the account's starting capital. For a live account, that figure is read from the linked broker account, not typed by the user, so the account starts from the broker's figure. After creation it changes only through ledger events (trades, deposits, withdrawals), never by direct edit.

Start date

The date the account came into existence.

  • Values: fixed at the date of account creation.
  • Default: the creation date. Not user-editable.
  • Effect: the account exists indefinitely from this date forward. There is no end-date field.

Portfolio

The single Portfolio the account is currently trading.

  • Values: one Portfolio snapshot, or none.
  • Default: none. A newly created account holds no Portfolio.
  • Effect: determines what the account trades. With no Portfolio attached, the account has nothing to run.
  • Interactions: attaching a Portfolio, or swapping the current one for a different Portfolio, requires the account to be in the Stopped state. See attaching a Portfolio: promotion and swaps.

State

Where the account is in its lifecycle.

  • Values: Running, Paused, or Stopped.
  • Default: Stopped. A newly created account with no Portfolio starts Stopped.
  • Effect: controls whether the account opens new positions, manages existing ones, or trades at all.
  • Interactions: see account states and lifecycle for the transitions between the three states and the actions that drive them.

Ledger

An immutable, append-only event log of every state-changing event in the account.

  • Values: an ordered record of events, including the initial-capital event at creation, every trade, every deposit and withdrawal, every Portfolio attach and swap, and every state transition.
  • Default: starts with the initial-capital event written at account creation.
  • Effect: the ledger is the account's source of truth for capital. Balances change as a result of ledger events, not by direct edit. See the account ledger.

An Account has no end date

An account exists indefinitely from its start date forward. Trading inside it can be stopped, but the account itself always persists. Stopping the account halts trading and force-closes open positions; it does not delete or retire the account. The start date is fixed; there is no matching end date.

One Portfolio at a time

An account holds at most one Portfolio. Attaching a different Portfolio is always a swap that replaces the current one, never an addition alongside it. There is no way to run two Portfolios in a single account. If you want to trade a second Portfolio, create a second account. The swap mechanics, including how open positions from the outgoing Portfolio wind down, live on attaching a Portfolio: promotion and swaps.

How many accounts you can have

You can create many paper accounts freely. You can also create many live accounts, but each live account requires its own linked broker account, so the count of live accounts is bounded by how many broker accounts you link.

On signup, the platform automatically creates one default paper account for you. It starts empty (no Portfolio) and Stopped. For the difference between paper and live modes, and what linking a broker involves, see paper vs live trading and brokers.

Where accounts live

Accounts are a top-level area of the app, separate from Projects. They have their own page and navigation, and they live outside the project structure entirely. A Project is a working surface for opening and editing library entities; an Account is a running thing that trades forward on live data. The two do not nest. You reach your accounts from their own navigation, not from inside any project.

Was this page helpful?