Class
caplin.trading.derivation

TierDerivation

The TierDerivation class is used to generate the derived fields for an ESP trade. For example, the bid/ask prices are derived from the dealt amount and the corresponding tier limits. When the dealt amount changes, then the bid/ask rate must be recalculated.

Constructor Summary

Attributes Name and Description
caplin.trading.derivation.TierDerivation()

Method Summary

Attributes Name and Description
Array getDerivedFields()

Returns a list of fields that are derived from this derivation.

Array getInputFields()

Returns a list of fields used as inputs to the Derivation.

void recalculateDerivedFields(caplin.trading.trademodel.DataHolderWrapper oData)

Recalculates the bid and ask price and updates the specified DataHolder with these derived fields.

Constructor Detail

caplin.trading.derivation.TierDerivation()

Method Detail

Array getDerivedFields()

Returns a list of fields that are derived from this derivation. These fields may be required as input fields to another derivation, and will be appended to the dataHolder when recalculateDerivedFields is called.

Returns
A list of derived field names (as strings).

Array getInputFields()

Returns a list of fields used as inputs to the Derivation. The input fields of one derivation may be the derived fields of another derivation, and thus will determine the order in which the derivations will be performed.

Returns
A list of input field names (as strings).

void recalculateDerivedFields(caplin.trading.trademodel.DataHolderWrapper oData)

Recalculates the bid and ask price and updates the specified DataHolder with these derived fields.

Parameters
caplin.trading.trademodel.DataHolderWrapper oData The data that is augmented by this derivation. Must be a non null instance.