Standing orders
The implementation of alerts and rule-based trading is not yet complete. This documentation describes the planned and partially implemented functionality.
Work in Progress - Target version V0.38.0
Setting up a standing order for a replay
- Create the simulation environment and enter it with Switch to simulation.
- Open Standing orders. Only Standing order cash is available in a simulation.
- Create the standing order for one of the simulation’s accounts. Deposit, Withdrawal, Account interest, and Account/Depot cost are supported.
- Set the recurrence, execution day, weekend adjustment, Valid from, and Valid to so that the required dates fall after the opening date and no later than the replay end date.
- Return with Switch to main tenant. From there, use the simulation environment’s context menu to start the historical replay with Start replay….
Configuration belongs to the simulation
Standing orders from the main tenant are not copied when a simulation environment is created. Define the required cash standing orders inside the simulation. This lets different simulation environments compare different savings amounts or periods.
When a run starts, GT records the cash-standing-order configuration together with the other run inputs. Changes made to an order afterwards apply only to the next replay. A repeated replay first restores the opening state and then recreates the transactions from the recorded orders, so it does not append duplicate bookings.
Execution during the replay
GT creates a schedule from Valid from through Valid to. Dates on or before the opening date are not booked. A cash standing order is booked before the other events on its effective date. Deposited money can therefore be used by the valuation, rebalancing, and strategy evaluation that follow on the same day.
For cash standing orders, GT shifts only Saturdays and Sundays according to Shift to earlier day or Shift to later day. Public holidays are not skipped. An effective date can therefore fall on a day on which the exchanges are closed; the cash booking is still created.
For an amount in a foreign currency, GT uses only an exchange rate from the effective date or an earlier date within the Quote tolerance (days). A simulation may not use a future rate. Its quote tolerance can therefore be no greater than zero; its magnitude determines how many days GT may search backwards. A configured amount formula and fixed transaction cost are applied in the same way as for an ordinary cash standing order.
Effect on results and the course
Deposits and withdrawals are external capital flows. They change the cash balance but do not count as profit or loss. Total return, annualized return, maximum drawdown, and Sharpe ratio are therefore adjusted for those flows. Account interest and Account/Depot cost, on the other hand, are income or expense and affect return.
Every successful booking appears in the course as Cash standing order and as an ordinary transaction of the simulation. If an occurrence fails, the course shows Unavailable with the affected order; the replay continues with later dates. Possible causes include:
- no historical exchange rate within the backward-looking tolerance;
- an account that no longer exists or is no longer active on that date;
- an invalid amount formula;
- the transaction limit being reached.
Failed occurrences are not also written to the general standing-order failure list. For a Historical Replay, its course is the authoritative record.
Limitations
- Only cash standing orders are supported. Security standing orders can neither be created nor replayed in a simulation.
- A standing order must refer to an account in the same simulation environment.
- Only dates after the opening date and up to and including the end date are booked.
- The replay never uses exchange rates later than the effective date.
- Changes made while a run is in progress are not part of its recorded inputs.
- The normal background execution of standing orders processes main tenants only. Simulation orders advance only through a Historical Replay.