Methods
-
getDerivedFields() → {Array}
-
Returns the list of fields that this derivation will provide.
These fields may be required as input fields to another derivation, and will be appended to the data-holder when
module:caplin/trading/derivation/Derivation#recalculateDerivedFields
is called.Returns:
A list of derived field names as strings.- Type
- Array
-
getInputFields() → {Array}
-
Returns the list of fields that are required to perform the derivation.
The input fields of one derivation may be the derived fields of another derivation, and so will determine the order in which the derivations will be performed.
Returns:
A list of input field names as strings.- Type
- Array
-
recalculateDerivedFields(oDataHolder)
-
Allows the derivation to recalculate the derived fields using the supplied trade data as input.
Derivations must be designed not to throw exceptions; in general, recalculation of the derived fields can occur due to a wide range of stimuli, and therefore exception handling would be dispersed and difficult to manage.
Parameters:
Name Type Description oDataHolder
module:caplin/trading/trademodel/DataHolder The trade data to be updated.