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.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/python/trade_dataclasses.py b/python/trade_dataclasses.py
index 82ead0fc..6f50ecc9 100644
--- a/python/trade_dataclasses.py
+++ b/python/trade_dataclasses.py
@@ -481,16 +481,17 @@ class SwaptionDeal(
obj["Trade ID"] = obj["Swap ID"]
obj["Product Type"] = "CDISW"
obj["Transaction Type"] = "NEW"
- obj["Transaction Code"] = "Pay" if obj["buysell"] else "Receive"
- obj["Protection"] = (
- ("Buy" if obj["option_type"] == "PAYER" else "Sell")
- if obj["buysell"]
- else ("Sell" if obj["option_type"] == "PAYER" else "Buy")
- )
+ if obj["buysell"]:
+ obj["Transaction Code"] = "Pay"
+ obj["Protection"] = "Buy" if obj["option_type"] == "PAYER" else "Sell"
+ obj["OptionBuySellIndicator"] = "Buy"
+ else:
+ obj["Transaction Code"] = "Receive"
+ obj["Protection"] = "Sell" if obj["option_type"] == "PAYER" else "Buy"
+ obj["OptionBuySellIndicator"] = "Sell"
obj["Entity Matrix"] = "Publisher"
obj["Clearing House"] = "ICE_FCM_US"
obj["Swaption Settlement Type"] = "Physical"
- obj["OptionBuySellIndicator"] = "Buy" if obj["buysell"] else "Sell"
obj["Supplement Date"] = datetime.date(2021, 12, 13)
obj["Supplement 2 Date"] = datetime.date(2020, 1, 27)
if "IG" in obj["security_desc"]: