Skip to Content
NeurotraderDocs
Concepts

Algorithm groups

Several algorithms trading one account together as a single algorithm: how a group shares the balance, what it reports and where it runs.

Sometimes one strategy is not the whole plan. You may want a trend strategy and a mean-reversion strategy to trade the same money, as a portfolio. In Neurotrader you do this with an algorithm group: several algorithms that share one account and count as one algorithm.

Algorithm groups

An algorithm group is one algorithm that holds other algorithms. The ones it holds are its children. To the rest of Neurotrader, a group is a single algorithm instance with a single account and a single result.

A child can be any algorithm in the catalogue: a built-in, a plugin algorithm or a remote algorithm. A child cannot itself be a group. Groups have one level.

The rule behind groups is simple: an account is traded by one algorithm instance. When several strategies have to share an account, they become one instance, and that instance is a group.

Creation of a group

You never pick "Group" from a list. The app builds the group for you.

  • On a single account. Add two or more algorithms to a single-account simulation, and they trade the account together as one group. The Algorithms card lists them as separate rows, and the group itself has no name.
  • In a comparison. Select two or more instances on the Algorithms card and choose the group button. The Group algorithms dialog asks for a Name for the group and a label for each child. The group then takes one row in the comparison, with its children listed under it, and competes against the other rows.
Screenshot
The Group 2 algorithms dialog with the Name field filled in and one label field for each of the two selected algorithms, SMA Crossover and RSI Threshold

A group with a name is how you compare mixes of strategies: put two groups side by side in a comparison and see which combination does better.

Labels

Every child has a label, and the label is required. It must be unique within the group and cannot contain /, . or @. The app proposes the algorithm's name, and you change it in the Label field when you add or configure the child.

The label names the child in the list and in the run's indicator series. It is also part of the child's identity inside the group: a child that makes random choices, such as Random, makes different choices under a different label. Rename a child only when you mean to.

A shared balance

The children share the account without dividing it.

  • Every child sees the whole account. Nothing is split, reserved or allocated. Each child can spend all of the balance.
  • Children act in order. On every step the children run in the order they are listed, and their orders go to the account in that order.
  • The first to act takes what it takes. If an earlier child has spent the money, a later child's order for more than is left is refused, exactly as it would be for a single algorithm on a real account. The refused order appears in the journal with its cause.
  • Children do not see each other. A child sees its own open orders and its own fills only. It cannot cancel or close another child's order.
  • Each child reads its own data. A child reads the data sources you link it to, which can be all of the group's or some of them.

Opposite orders from two children are both sent. If one child buys an instrument and another sells it on the same step, the account places both orders and pays the fees on both.

No allocation in a group

A group does not give each child a budget, and it does not rebalance between them. If your plan needs a fixed share per strategy, write that rule into an algorithm of your own. To give each strategy its own separate money, use a comparison instead.

Results of a group

A group is one algorithm on one account, so its results are one set of figures: one net worth line, one return, one maximum drawdown, one journal. A run does not report a separate return per child.

This is deliberate. On a shared account there is no honest way to say which child a balance belongs to after the children have traded the same assets back and forth. Any split would be a guess. If the question is "which of these strategies makes the money", run them in a comparison, where each has its own account and its own result.

The children stay visible in one place: the indicators. Each child's indicator series carries the child's label as a prefix, for example trend/fast, so the charts show which child read which value.

Groups and comparisons

Algorithm groupComparison
AccountsOne, shared by the childrenOne per algorithm
The algorithmsAffect each other through the shared balanceCannot affect each other
ResultsOne result for the groupOne result per algorithm
Question answeredHow does this mix do as a whole?Which of these does best?

The two combine: an algorithm in a comparison can be a group.

Modes

A group runs wherever an algorithm runs: in Simulation, Live Simulation, Live Paper Trade and Real Trade.

In Live Paper Trade and Real Trade a broker account is traded by one algorithm, so a group is the way to run several strategies on a broker account. The group you tested in a simulation is the same group that trades with the broker: the children, their order and their labels do not change between modes. See Operation modes.

A group can be paused and resumed like any other algorithm. Each child continues from where it stopped.

On this page