diff options
Diffstat (limited to 'python')
| -rw-r--r-- | python/trade_dataclasses.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/python/trade_dataclasses.py b/python/trade_dataclasses.py index fd62c1d7..db7ebe11 100644 --- a/python/trade_dataclasses.py +++ b/python/trade_dataclasses.py @@ -574,6 +574,8 @@ class CDSDeal( obj["FillPrice"] = obj["AvgPrice"] obj["StrategyCode"] = f"{obj['portfolio']}/{obj['folder']}" obj["SettleCurrency"] = obj["SecurityCurrency"] + obj["TradeDate"] = obj["TradeDate"].strftime("%Y%m%d") + obj["SettlementDate"] = obj["SettlementDate"].strftime("%Y%m%d") if obj["orig_attach"]: # tranche process obj["IDSource"] = "USERID" @@ -601,6 +603,7 @@ class CDSDeal( obj[ "ClearingAgent" ] = "BOA_FC" # We need to query DB via accounts table here + return obj @classmethod @@ -792,6 +795,8 @@ class SwaptionDeal( ) instrument.citco_stage() obj["SecurityID"] = instrument.dealid + obj["TradeDate"] = obj["TradeDate"].strftime("%Y%m%d") + obj["SettlementDate"] = obj["SettlementDate"].strftime("%Y%m%d") return obj @@ -989,6 +994,8 @@ class SpotDeal( obj["SettleCurrency"] = obj["SecurityCurrency"] obj["IDSource"] = "USERID" obj["ClearingAgent"] = obj["ExecutionBroker"] + obj["TradeDate"] = obj["TradeDate"].strftime("%Y%m%d") + obj["SettlementDate"] = obj["SettlementDate"].strftime("%Y%m%d") return obj |
