aboutsummaryrefslogtreecommitdiffstats
path: root/python/trade_dataclasses.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/trade_dataclasses.py')
-rw-r--r--python/trade_dataclasses.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/python/trade_dataclasses.py b/python/trade_dataclasses.py
index 3186b7dc..1441be8f 100644
--- a/python/trade_dataclasses.py
+++ b/python/trade_dataclasses.py
@@ -597,6 +597,18 @@ class CDSDeal(
# tranche process
obj["IDSource"] = "USERID"
obj["ClearingAgent"] = obj["ExecutionBroker"]
+ redcode = (
+ obj["security_id"]
+ + "_"
+ + obj["SecurityDescription"].split()[4].removesuffix("Y")
+ )
+ instrument = TrancheProduct(
+ underlying_security_id=redcode,
+ attach=obj["orig_attach"],
+ detach=obj["orig_detach"],
+ )
+ instrument.citco_stage()
+ obj["SecurityID"] = instrument.dealid
else:
# cleared cds process
obj["IDSource"] = "RED"