# Build a portfolio

> Assemble several assets into one shared capital book, review the per asset split, and run it.

Source: https://docs.texttoquant.com/guides/build-a-portfolio

---

A portfolio runs several assets from one shared pool of capital as a single *book*. This guide takes
you from an idea to a scored book. For the full model behind it, contention, rebalancing, risk
controls and the report, see the [Portfolios reference](/docs/reference/portfolio).

<Steps>
  <Step n={1} title="Enter Portfolio mode">
    In the terminal, switch the sidebar toggle from **Single asset** to **Portfolio**. Or just write a
    prompt that names two or more assets: the terminal notices and switches for you.
  </Step>
  <Step n={2} title="Describe the book">
    Write one prompt that covers every asset, or open the **Visual** tab and add assets by hand. Each
    asset can carry its own strategy.

    ```text
    On the 1d, buy BTCUSDT when the 50 SMA crosses above the 200 SMA and exit when it crosses back
    below. Do the same on ETHUSDT and on SOLUSDT.
    ```
  </Step>
  <Step n={3} title="Review the per asset split">
    Analyze fans your prompt into one parsed strategy per asset. Check each asset's review card: the
    clause it was assigned ("Split as"), its logic, and its market. You can edit an asset, copy one
    asset's rules to the whole roster, or remove it.
  </Step>
  <Step n={4} title="Set capital, contention and window">
    Set the shared **capital** (the whole book trades from one pool), the **contention** rule (who
    gets the cash when assets signal together), and the backtest **window**. New books start at
    $30,000 with `rank` contention.
  </Step>
  <Step n={5} title="Add controls (optional)">
    Layer on rebalancing ("rebalance monthly to 40% BTC, 30% ETH, 30% SOL"), risk limits ("stop the
    book at 20%", "at most 3 open positions"), or cross asset gates ("when BTC RSI crosses above 65,
    if ETH RSI is above 50, buy ETHUSDT"). See the [reference](/docs/reference/portfolio) for every
    option.
  </Step>
  <Step n={6} title="Run and read the book">
    Run the book. The report plots the shared equity curve against an equal weight basket, breaks out
    each asset's contribution, lists a skip ledger of signals that could not be funded, and grades the
    whole book. Share it as a read only link or export the trades.
  </Step>
</Steps>

<RunInTerminal query="Buy BTCUSDT and ETHUSDT on 1d when price closes above the 20 EMA, exit when it closes below, $50k prorata" />

<Callout variant="warning" title="A portfolio bills per asset">
  Running a book bills one backtest credit per asset, so a three asset book costs three credits.
  Parsing the prompt is free, so review the per asset split before you run.
</Callout>

Next: the [Portfolios reference](/docs/reference/portfolio) for contention, rebalancing, risk controls
and the full book report.
