Margin Call Engine
The Margin Position Call engine allows computing margin call positions on security collateral.
1. Engine and Event Configuration
All Engine and Event configuration is completed in the Engine Manager.
Refer to the Calypso Web Admin documentation for details.
2. Margin Call Engine Parameters
The behavior of the margin call engine may be modified with the following engine parameters and attributes.
If a parameter is not available for setup, you can register it in the engineParam domain.
Parameters and Attributes |
Description |
Max Batch Size |
Maximum number of persistent events loaded at one time by an engine in batch mode. The engine will load events in MAX_BATCH_EVENT chunks until all events are processed. Persistent events received after MAX_QUEUE_SIZE is reached will be processed in batch mode. Allows controlling engine memory usage, therefore improving the performance. |
Max Queue Size |
Maximum number of events buffered on an engine event queue. When this number is exceeded, real time events are discarded and the engine restarts based on the restart timer (TIMEOUT_RESTART), in order to process the unprocessed persistent events using batch mode. This parameter can be useful for controlling the engine’s memory usage. If not set, the default value for this parameter is no limit on queue size. Allows controlling engine memory usage, therefore improving the performance. |
Pricing Environment |
Pricing environment used by the engine. If not set, the default Pricing Environment of the user running the engine will be used. |
Number of Threads |
Number of concurrent threads used in an engine for processing. Increase the thread count for better performance. |
TIMEOUT_RESTART |
Number of seconds to wait before an engine restarts after MAX_QUEUE_SIZE has been reached. The default value is 3600 seconds (1 hour). |
TWO_PHASE_ENGINE_NUMBER_OF_RETRY |
Number of times the engien will retry to process the list of events in the TwoPhaseEngine used by the Inventory engine, Margin Call Position engine and Position engine. Default value is 3. |
3. Starting the Margin Call Engine
The Margin Call Engine is started in the Engine Manager.
The margin call engine publishes message events (PSEventMessage) for the margin call statements, PSEventMarginCallCashPosition and PSEventMarginCallSecPosition events.
Whenever the margin call engine is started, it processes all outstanding events to which it subscribes that were published while it was inactive.
Refer to Calypso Web Admin documentation for details.