Flagging existing INITIAL_MARGIN_FLAG column in Cache for CSA.
Using BNS.LEI and Counterparty.LEI combination, lookup cache table’s matching record. If ALL of the following conditions are met then set cache table INITIAL_MARGIN_FLAG to TRUE. If not, set it to FALSE.
- ISL_Initial_Margin_CSA. CSA_EFFective should be less than or equal to Cache Table. Trade Date
- ISL_Initial_Margin_CSA.DocumentSubtype should not be equal to “Placeholder IM CSA”
- ISL_Initial_Margin_CSA..BNS.lei equal to Cache Table. .Party1LEI
- ISL_Initial_Margin_CSA.Counterparty.lei equal to Cache Table. .Party2LEI