Rebalancing
Definition
See the Glossary for a definition.
Overview¶
The following diagram describes the rebalancing process at a high level.
Process¶
Depending on the following criteria, the rebalancing process is different:
- Broker/Custodian integration: by InvestSuite or by the Client
- Mandate: Advisory or Discretionary
- Portfolio Optimizer: by InvestSuite or by the Client
1. Optimization is triggered¶
Client integrates with broker¶
When the Client integrates with the Broker, an Optimization is triggered when the Portfolio object is PATCHed (with Holdings or Transactions):
- A funding happens, see Funding;
- A withdrawal request happens (setting the
withdrawal_amount
on the Portfolio); - We recommend to trigger periodic optimizations (eg. every night, by issuing an empty PATCH call) - even though no orders may result - to ensure the portfolio does not drift.
InvestSuite integrates with broker¶
When InvestSuite integrates with the Broker, an Optimization is triggered by a nightly batch job, run by InvestSuite.
External Optimizer¶
The client (the external optimizer) decides when it runs.
2. Optimization is ready to be executed¶
Discretionary mandate¶
When an Optimization is recommended (the portfolio_update.is_recommended
field on the Optimization is true
), the Optimization is considered ready to be executed.
Advisory mandate¶
When the Optimization is accepted by the user (the owner_choice
field on the Optimization is ACCEPT
), the Optimization is considered ready to be executed.
Portfolio not reoptimized¶
When an Optimization is ready to be executed, the Portfolio is (temporarily) excluded from optimization.
3. Orders of Optimization sent to the broker¶
Client integrates with broker¶
The Client middleware sends the Orders of the Optimization to the broker, and updates InvestSuite:
- The Client middleware gets the Orders from the Optimization object, see here.
- The Client middleware sends the Orders to the broker.
- The Client middleware creates corresponding Transactions in InvestSuite, see here.
InvestSuite integrates with the broker¶
InvestSuite sends the orders to the broker and keeps them up to date.
4. Orders are executed or settled¶
Client integrates with the broker¶
- The Client middleware updates the corresponding Transactions in InvestSuite, see here.
- The Client middleware updates the Portfolio holdings, see here.
InvestSuite integrates with the broker¶
InvestSuite keeps the orders up to date.
Portfolio reoptimized¶
When all Transactions of an Optimization have a status EXECUTED
or SETTLED
, the Portfolio is considered again for optimization.