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.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/python/trade_dataclasses.py b/python/trade_dataclasses.py
index be3bef07..1baff39d 100644
--- a/python/trade_dataclasses.py
+++ b/python/trade_dataclasses.py
@@ -28,10 +28,7 @@ Portfolio = Literal[
"OPTIONS", "IR", "MORTGAGES", "CURVE", "TRANCHE", "CLO", "HEDGE_MAC"
] # deprecated IG, HY, STRUCTURED
-_funds = {
- "SERENITAS_CGMF": "SERCGMAST",
- "BOWDOINST": "BOWDST",
-}
+_funds = {"BAML": "SERCGMAST", "GS": "BOWDST", "WF": "SERCGMAST"}
_fcms = {
"Bank of America, N.A.": "BAML",
"Goldman Sachs": "GS",
@@ -432,10 +429,18 @@ class CDSDeal(
coupon, index, series, tenor = c.fetchone()
line["Security"] = desc_str(index, series, tenor.removesuffix("yr"))
line["Coupon"] = coupon
+ if line["Brkr"] == "BSEF": # BSEF means CDX BLOCK
+ line["Price (Dec)"] = line["Price"]
+ line["Quantity"] = line["Qty (M)"] * 1000
+ values = [list(line.values())[0]] + [None] * 21
+ values[14] = _funds[_fcms[line["Client FCM"]]]
+ values[15] = _fcms[line["Client FCM"]]
+ else:
+ values = line.values()
cp_code = cls.get_cp_code(line["Brkr"], "CDS")
- cls._bbg_insert_queue.append(list(line.values()))
+ cls._bbg_insert_queue.append(list(values))
return cls(
- fund=_funds[line["Account"]],
+ fund=_funds[_fcms[line["Client FCM"]]],
folder="*",
portfolio="UNALLOCATED",
security_id=line["Red Code"],