aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/markit/rates.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/python/markit/rates.py b/python/markit/rates.py
index 8c8e54d7..861a753e 100644
--- a/python/markit/rates.py
+++ b/python/markit/rates.py
@@ -122,7 +122,6 @@ def update_bbg_desc(conn, session, download_date):
"SECURITY_TYP2",
"INT_RATE_FUT_START_DT",
"INT_RATE_FUT_END_DT",
- "CONVEXITY_BIAS_BASIS_POINTS",
"CRNCY",
]
data = retrieve_data(session, missing_tickers, fields)
@@ -155,7 +154,10 @@ def get_bbg_quotes(conn, session, start_from):
with conn.cursor() as c:
for k, v in data.items():
c.executemany(
- "INSERT INTO bbg_rate_quotes(bbg_ticker, date, quote1) VALUES(%s, %s, %s)",
+ "INSERT INTO bbg_rate_quotes(bbg_ticker, date, quote1) "
+ "VALUES(%s, %s, %s) "
+ "ON CONFLICT (date, bbg_ticker) "
+ "DO UPDATE SET quote1=EXCLUDED.quote1",
[(k, *t) for t in v.itertuples()],
)
conn.commit()