aboutsummaryrefslogtreecommitdiffstats
path: root/python/markit
diff options
context:
space:
mode:
Diffstat (limited to 'python/markit')
-rw-r--r--python/markit/import_quotes.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/python/markit/import_quotes.py b/python/markit/import_quotes.py
index a8d05a29..5692b3aa 100644
--- a/python/markit/import_quotes.py
+++ b/python/markit/import_quotes.py
@@ -201,6 +201,8 @@ def insert_cds(database, workdate: datetime.date):
fixed = next(g)
with database.cursor() as c:
for line, spread in g:
+ if len(line["DocClause"]) == 2:
+ line["DocClause"] += "14"
k = CurveKey(
line["Ticker"], line["Tier"], line["Ccy"], line["DocClause"], spread,
)
@@ -218,7 +220,7 @@ def insert_cds(database, workdate: datetime.date):
for (cid, sen), curves in mappings:
defaulted = None
- if event_date := default_table.get(cid, False):
+ if event_date := default_table.get((cid, sen), False):
if workdate >= event_date:
defaulted = event_date
try: