Handle trade order properties in rebalancing
Calculating trade orders based on amount or trade amount
When creating trade orders with rebalancing, the trade orders can be created either based on the amount or trade amount of the trade order. Which approach is used can be set in rebalancing Preferences: you can choose to always Create trade orders based on trade amount (calculate unit price based on amount and difference) (default option) or to Create trade orders based on amount (calculate trade amount based on amount and market unit price).
NOTE! Despite your selection, the amount is always calculated in the same way as difference in your portfolio compared to the model divided by market unit price - the selection determines whether the final trade orders are created by adjusting the unit price or trade amount to achieve valid calculations for amount * unit price = trade amount.
Example: You need to buy for 300 €, your unit price is 8 € per share => Number of shares you need is 300 € / 8 € = 37,5 However, if you are buying a stock with 0 decimals allowed, then you actually get only 37 shares (since you cannot buy 0,5 shares) => Amount (37), unit price (8 €) and difference (300 €) don’t match ==> 37 * 8 € = 296 € instead of 300 € Preferences come into play on what to adjust in the order for the calculations to match – the amount of the trade order is always calculated the same way: a) “Create trade orders based on trade amount (calculate unit price based on amount and difference)” => Fixes amount (e.g. 37 share) and difference (e.g. 300 €), and then recalculates the unit price based on them ==> 37 * 8,108108.. € = 300 € b) “Create trade orders based on amount (calculate trade amount based on amount and unit price)” => Fixes amount (e.g. 37 shares) and unit price (e.g. 8 € ), and then recalculates the trade amount based on them ==> 37 * 8 € = 296 € |
Trade orders created by rebalancing indicate whether the trade order was created based on trade amount or units, as defined in the Rebalancing Preferences. This information is stored on the trade order as trade order's Execution method and in trade order's Internal info as follows:
Create trade orders based on trade amount results in trade orders with execution method Net trade amount and internal info type=CASH.
Create trade orders based on amount results in trade orders with execution method Units and internal info type=UNITS.
When you are using the default setting to Create trade orders based on trade amount, most trade orders are calculated based on the trade amount (execution method Net trade amount and internal info type=CASH), but when selling away an entire position or all securities in the portfolio, the trade orders are always calculated based on the amount / units (execution method Units and internal info type=UNITS). In addition, in such a scenario, rebalancing supports creating the "sell units" trade orders with a different transaction type (configurable in Rebalancing Preferences).
Decimals in trade orders' amount
The decimal places allowed for the amount of the trade order (how many decimals are used to announce the amount of the trade amount) can be defined for each security in the Block size field in the security window. For example, if the block size for a security is defined to be 0,01, the amount of the trade orders for this security are created with two decimal places. If no block size is defined for a security, the decimal places in the amount of the trade order are determined by the decimals allowed in the security type for the security defined in security Preferences.
Selling an entire position
Rebalancing has logic to recognise when selling an entire position from a portfolio. This usually happens when you remove a security from your model portfolio or investment plan, and want to get rid of the entire position in your portfolio as well. When selling an entire position, the minimum change you have defined has no effect - when selling an entire position, the sell orders are generated without size restrictions to ensure you get rid of the entire position. The amount of such an order is also never adjusted, but corresponds with the current position amount in the portfolio. If rebalancing is restricted to accounts, entire positions are not sold unless there is "room to sell" based on the target cash balance.
Rebalancing identifies such positions through creating them with a separate transaction type, as configured in "Select the transaction type used for trade orders when selling an entire position" in Rebalancing preferences. In addition, rebalancing creates these trade order as unit-based (see Calculating trade orders based on amount or trade amount for more details).