finos/common-domain-model

CDM support for increase on existing Trade Lot

Closed this issue · 2 comments

Source of Issue - CDM Modelling for ASIC/MAS DRR Implementation for Equity Derivatives

CDM does not allow for an existing tradeLot to be increased by a delta amount, however it does allow decrease via a delta amount. Using 'replace' as a quantityChange direction inherently forces the producer to calculate the position, which may not match the underlying granularity of the RMS. The ability to perform an increase to an existing tradeLot via summation (delay of increase plus existing lot quantity) is for us critical.

A change has already been made to allow for the specification of lotIdentifier in the new executionInstruction, but if you then specify that same lotIdentifier within the quantityCHange, CDM creates a new TradeLot even if the identifier matches. This results in two tradeLots with the same identifier which should not be possible. If the tradeLot identifier on an increase matches with an existing tradeLot identifier, the quantityChange should be 'applied to' the existing tradeLot (as is seemingly the case for decrease).

fully agree with above issue.

User shall have the choice :

  • either to create new lot (trigger : populate new lotIdentifier, not existing for any prior tradeLot linked to the parent trade)
  • else to update any existing lot (trigger : populate same lotIdentifier than for prior existing tradeLot)

And the relevant calculation shall be handled in either case, in accordance with quantityChange directionEnum e.g. Increase or Decrease or Replace, all should work properly in any cases...

@nicholas-moger We have built enhancements to the function create_QuantityChange in line with what you have written, that is to update the tradeLot quantity with awareness of the lotIdentifier.

The input to the function is QuantityChangeInstruction which can have a price as well as a quantity. Is the price relevant in a quantity change? The definition of QuantityChangeInstruction implies that it is, furthermore, that there can be fees involved in the quantity change which need to be reflected in the new trade lots.

Thoughts on this please?