Docs menu

Combined backtests

A combined backtest runs several portfolios together as one account split into subaccounts, one portfolio per subaccount. It answers what a set of portfolios does to one balance, which is a different question from what one of them returns.

Setting it up

The Combined tab of the portfolio page asks how many portfolios to run, from one to eight, the window and the starting balance of the whole account. Each subaccount row carries a name, an allocation in percent and a risk per trade with its unit. The allocations have to add up to one hundred, and a button splits them equally.

Edit opens that subaccount's full setup below the table, the same form a one-portfolio run uses: strategy, build, selector or coin list, coins per day, positions at once, parameters, timeframe, fill data, warm-up and advanced settings. Nothing has to be run first, and a new subaccount starts from the strategy defaults saved on the Strategies page. A saved portfolio run can also be loaded into a subaccount, which copies its whole configuration including the window's settings. The form is kept between visits.

The money

Every morning the account is split again by the allocations, and each portfolio sizes its trades off its own share, so a one percent risk is one percent of that subaccount. Every portfolio's profit or loss goes back into the one account, so a winning portfolio compounds the whole balance and a losing one draws on it.

Two portfolios may trade the same coin. They are different subaccounts, and the engine treats them that way. Margin is not modelled, which is why the report shows the largest amount that was open at once as a multiple of the account.

The data check

Before a combined run starts, the app checks the data of every portfolio in it, and missing days offer the same three choices as a single run: download them, run anyway, or cancel. The run ends at the out-of-sample cutoff like any other.

The report

The top of the report is the global account's ordinary one: equity, drawdown, statistics, trades and coverage. A Combined section follows it.

  • The global curve, with every portfolio's own curve drawn with it, or with each portfolio drawn as if it had held the whole starting balance, for comparing alternatives.
  • A table of what each portfolio contributed: net profit and loss, its share of the profit, return on its share, maximum drawdown, Sharpe, trade count, win rate, profit factor and peak open positions, with the global account as the last row.
  • How much the portfolios' daily returns move together, where one means the same days, zero means unrelated and below zero means opposite.
  • The most that was open at once, as a multiple of the account.

A portfolio's own curve is its real daily result on its share, so a portfolio the morning split keeps topping up is never drawn as wiped out.

Reopening one

History lists a combined run under Portfolio and reopens it on the portfolio page. Re-run opens the combined form filled with that run, down to each subaccount's settings, allocation and name, and New backtest opens it empty.

One portfolio at one hundred percent gives exactly the result that portfolio gives on its own, which is the check to run before trusting a combined number.