com.apama.position.tracker
Event RealizedPnLTrackerFactory


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

This Position Tracker tracks the Profit and Loss of order executions that match the specific slice criteria provided in the subscription configuration, normalized to a base currency provided in the params on creation.

The Position Tracker may be configured to filter on a set of symbol names, serviceIds, marketIds, exchangeIds, and/or traderIds and the currency of this filter provided to allow for value normalization to a base currency. The Profit and Loss is then published back to the subscriber. Internally, the individual Profit and Losses are stored too, which allows for individual Profit and Loss or a subset of Profit and Losses 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.RealizedPnLTrackerConstants event.
See Also:
com.apama.position.tracker.RealizedPnLTrackerConstants - The constants to define parameters on creation
com.apama.position.PSFactory - The factory to create an instance of the Position Service Interface

Action Summary
 voidcreate(context mainContext, string trackerName, com.apama.ccyconverter.CurrencyConverter currencyConverter, action<boolean, string > cbCreated)

This action creates a new Realized PnL Tracker in the current context.
 
Action Detail

create

void create(context mainContext, string trackerName, com.apama.ccyconverter.CurrencyConverter currencyConverter, action<boolean, string > cbCreated)
This action creates a new Realized PnL Tracker in the current context.
Parameters:
mainContext - The main context
trackerName - The unique name of the Realized PnL Tracker to be created
currencyConverter - The Currency Converter interface to use to get normalization values.
cbCreated - The callback action that will be called once the Position Tracker has been created, which indicates whether or not it was successful