Navigation: Realtest Script Language > Syntax Element Details >







Strategy Elements


Dollars allocated to this strategy


Any formula specifying a dollar amount


In most scripts it is not necessary to specify Allocation.

It is generally not recommended to use Allocation to specify the fraction of the account that a strategy should use.

Instead apply the fraction via the Quantity formula when modeling combined compounding, or use StartPercent to specify an initial fraction when modeling strategies trading in separate accounts.

See Asset Allocation and Position Sizing for an example of each of these alternatives.

The default allocation is Combined(S.Equity) when no StartPercent is specified (all strategies in one account).

Strategies that specify StartPercent have a default allocation of S.Equity (each strategy in its own account).

Strategies that specify Compounded: False have a default allocation of S.StartEquity (maintain a constant dollar allocation).

The S.Alloc variable is updated daily by evaluating the Allocation formula if specified or using its default value otherwise.

S.Alloc is used implicitly in Quantity when QtyType is Percent.

Quantity should refer to S.Alloc rather than S.Equity when using either of the other quantity types (Value or Shares).

Allocation has no effect on the maximum investment level allowed for a strategy.

Investment level limits are specified using MaxExposure and/or MaxInvested and/or MaxPositions.





Copyright © 2020-2024 Systematic Solutions, LLC