Finance Plugin Options

The Finance Plugin Options contains some useful properties if using AdapTable in the financial services sector.

PropertyDescription
instrumentColumnsColumns to be defined as (FDC3) Instrument
weightedAverageColumnsColumns to use a Weighted Average aggregation

Cell Summary Definitions

The Finance Plugin provides 2 additional Cell Summary Definitions:

OperationColumnsDescription
OnlyNumericReturns true if all selected cells match (single column only)
WeightedAverageNumericCalculates the Weighted Average (is using a Weighted Average Column)

Weighted Average Columns

A common scenario in the Finance Industry is to aggregate or summarise data using a Weighted Average.

AdapTable facilitates this by providing Weighted Average Columns which defines the Column on which the aggregation is performed and the supporting Column used to calculate the aggregation.

caution

Aggregations for Weighted Average columns can be turned off and on at runtime through the AG Grid UI, but they can only be defined at design-time

The full definition is as follows:

PropertyDescription
columnIdColumn which will contain the aggregation
weightedColumnIdColumn used to perform the aggreation calculation
const adaptableOptions: AdaptableOptions = {
plugins: [
finance({
weightedColumns: [
{
columnId: 'interest',
weightedColumnId: 'bookValue',
},
],
}),
],
};

Weighted Average Cell Summary

The Weighted Average is also used when performing a Cell Summary.

If the selected cells are all in a Weighted Column, the Weighted Average Cell Summary will display the weighted average value for the cells.

FDC3 Instrument Columns

The Finance Plugin Options enables a Column to be defined as an Instrument Column.

The InstrumentColumn object requires a columnId which is the Id of the Column, and at least one 'Instrument Data' column to be picked. It is defined as follows:

PropertyDescription
bbgColumnIdColumn which holds a Bloomberg Ticker value as instrument data
columnIdColumn to be defined as an Instrument - its value will provide the name property in the FDC3 message
cusipColumnIdColumn which holds a CUSIP value as instrument data
figiColumnIdColumn which holds a FIGI value as instrument data
isinColumnIdColumn which holds an ISIN value as instrument data
permidColumnIdColumn which holds a PERMID value as instrument data
ricColumnIdColumn which holds a Reuters Instrument Code value as instrument data
sedolColumnIdColumn which holds a SEDOL value as instrument data
tickerColumnIdColumn which holds a ticker value as instrument data
const adaptableOptions: AdaptableOptions = {
plugins: [
finance({
instrumentColumns: [
{
columnId: 'instrument',
cusipColumnId: 'CUSIP',
tickerColumnId: 'ticker',
},
],
}),
],
};

When a Column is defined as an InstrumentColumn AdapTable will create an extra Menu Item Broadcast [cell value] to appear in the Context Menu for each cell in the Column.

Broadcasting FDC3 Message

When the context menu item is clicked AdapTable will fire the BroadcastInstrument event which packages the cell value as FDC3 Instrument Context.

For example clicking the entry 'Apple' in a row which contained 'ticker' and 'CUSIP' columns (as per the example above) would produce this Instrument Context:

{
"type" : "instrument",
"name" : "Apple",
"id" :
{
"ticker" : "aapl",
"CUSIP" : "037833100",
},
}
note

If the OpenFin Plugin is also active, then AdapTable will listen to this event and broadcast the context on the currently active channel.

More Information

Visit the Cell Summary Demo to see AdapTable with the Finance plugin.