com.apama.position.tracker
Event ReservedPositionTrackerFactory


The ReservedPositionTrackerFactory allows the user to create an instance of the Reserved Position Tracker provided with the CMF out-of-the-box. This Position Tracker should be created in the context that the orders are being received.

The Reserved Position Tracker tracks potential positions that have been "reserved" in advance. A reservation allows an application to request the "right" to take a position up to a specified quantity. Reservations are designed (but not limited) to be used together with CMF Risk Firewall to limit the total order exposure while still allowing an applications trading strategy the freedom to trade with fewer concerns about hitting risk limits.

The Reserved Position Tracker itself has no role in granting or enforcing reservations ? it simply allows applications to monitor changes in the reserved position for a slice. This should be used in conjunction with the Reservation Enforcer Risk Firewall rule.

The Reserved Position Tracker is the same as the Pending Position Tracker, in that it tracks the cumulative quantity and cash value of all long orders and short orders that are currently active, and that match the specific slice criteria provided in the subscription configuration. The main difference is that this Position Tracker only tracks orders with the type of "RESERVATION".

For example, if a trader has open Buy orders with a type of "RESERVATION" in the market with a total quantity of 1000, then there will be a Reserved max position of 1000. This is the traders maximum possible additional position if all the active Buy reservation orders were to fully trade. Conversely, if a trader has open Sell orders with a type of "RESERVATION" in the market with a total quantity of 1000, then there will be a Reserved min position of -1000.

The Position Tracker may be configured to filter on a set of symbol names, serviceIds, marketIds, exchangeIds, and/or traderIds. The cumulative position is then published back to the subscriber. Internally, the individual positions are stored too, which allows for individual positions or a subset of positions to be queried through Config Store.

The Position Service Interface should be used to subscribe to this Position Tracker, specifying the tracker type as the constant TRACKER_TYPE string defined in the com.apama.position.tracker.ReservedPositionTrackerConstants event.
See Also:
com.apama.position.tracker.OpenPositionTrackerFactory - The factory to create a Position Tracker to track completed orders
com.apama.position.tracker.PendingPositionTrackerFactory - The factory to create a Position Tracker to track orders pending (IE not completed) in the market
com.apama.position.PSFactory - The factory to create an instance of the Position Service Interface

Action summary
 voidcreate(context mainContext, string trackerName, action<boolean, string> cbCreated)

This action creates a new Reserved Position Tracker in the current context.
 
Action detail

create

void create(context mainContext, string trackerName, action<boolean, string> cbCreated)
This action creates a new Reserved Position Tracker in the current context.
Parameters:
mainContext - The main context
trackerName - The unique name of the Reserved Position Tracker to be created
cbCreated - The callback action that will be called once the Position Tracker has been created, which indicates whether or not it was successful