Apama Capital Markets Foundation Documentation : Capital Markets Foundation : Finance Smart Blocks for Developing Scenarios : CMF legacy finance support smart blocks : Basket Calculator v2.0
Basket Calculator v2.0
This block calculates real-time pricing for an arbitrary basket of securities given relative weightings for each constituent. Each parameter of this block is a comma-separated list of values for each instrument. The block subscribes to market data (see the Market Depth block for details of how this works and the meaning of the service ids parameter).
The output is the weighted average of all of the constituents that there exist values for.
The previous version of this block used the mid price. This version can be set to use either of the bid, ask or mid price depending on the setting of the price mode parameter.
To make this block available to your scenario, you must add the Legacy Finance Support bundle to your project.
A comma separated list of instruments.
A comma separated list of weights.
service ids
A single service identifier, or a comma separated list of service identifiers.
price mode
Sets whether to use bid/ask/mid prices for pricing the basket (default is mid). Valid values for this enumeration type parameter are BID, ASK and MID.
If the number of entries in the service id or weights lists is less than that of the number of entries in the instruments list, then the last value is repeated. Thus, to specify an equal weighting for all entries in the basket, supply a single weight (whose value should be non-zero but may otherwise be anything). Any extra weights or service ids beyond the length of the instruments list are ignored.
Starts the calculation of basket values. Must be called before the calculator will generate any statistics.
Stops the calculation of further basket values. Any subsequent input feeds are ignored.
Input feeds
This block has no input feeds.
Output feeds
the weighted average price of the basket
the total number of instruments in the basket – always set to the length of the instruments parameter
the number of different prices that have been used to produce the average value
You might want a scenario to wait until the basket has all or some majority of the prices seen. Specify a condition such as the following:
seen from Basket calculator (price) is equal to constituents from Basket calculator (price)
Copyright © 2013-2017 Software AG, Darmstadt, Germany. (Innovation Release)

Product LogoContact Support   |   Community   |   Feedback