Navigation: Realtest Script Language > Syntax Element Details >







Strategy Elements


Can be used to modify the quantity of an entry after top-down setup ranking has been done


The initial desired quantity of each setup must be specified prior to application of constraints such as MaxExposure or MaxInvested.

The final count of setups that can become orders is therefore not known yet when initial quantities are set.

QtyFinal is provided for cases where you want position sizes to be influenced by the number of orders that will be placed after constraints have been applied.

An example use case might be:

This sets the initial position sizes to 10% of equity.

After selecting today's setups while applying the MaxExposure constraint, positions are resized to use all remaining capital divided equally between them.

(Arbitrarily growing position sizes to use available exposure may increase position-specific risk and is probably not advisable, but if you wanted to test it, this would be a way to do so.)

See Also: Backtest Engine Details and Capacity Constraints




Copyright © 2020-2023 Systematic Solutions, LLC