aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/trade_dataclasses.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/python/trade_dataclasses.py b/python/trade_dataclasses.py
index 8bfc4a32..843f3b2e 100644
--- a/python/trade_dataclasses.py
+++ b/python/trade_dataclasses.py
@@ -620,8 +620,8 @@ class CDSDeal(
@classmethod
def from_bbg_line(cls, line: dict):
- if "Seq#" in line and line["Brkr"] != "BSEF":
- raise ValueError("Ignoring file, we have an allocation file")
+ if line["Client FCM"] == "":
+ raise ValueError("Trade is unallocated")
if line["Coupon"] == "":
with cls._conn.cursor() as c:
c.execute(
@@ -635,7 +635,7 @@ 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
+ if "Price (Dec)" not in line: # Means this is a BSEF block file
line["Price (Dec)"] = line["Price"]
line["Quantity"] = float(line["Qty (M)"]) * 1000
values = [line["bbg_ticket_id"]] + [None] * 21