aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/collateral/gs_fcm.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/python/collateral/gs_fcm.py b/python/collateral/gs_fcm.py
index a035f5f5..352581ae 100644
--- a/python/collateral/gs_fcm.py
+++ b/python/collateral/gs_fcm.py
@@ -86,7 +86,9 @@ def collateral(d: datetime.date, positions, *, engine, **kwargs):
cols = col_mapping.values()
place_holders = ",".join(["%s"] * len(cols))
engine.execute(
- f"INSERT INTO fcm_moneyline({','.join(cols)}) VALUES({place_holders})",
+ f"INSERT INTO fcm_moneyline({','.join(cols)}) VALUES({place_holders})"
+ "ON CONFLICT (date, account, currency) "
+ "DO NOTHING",
list(df_margin[cols].itertuples(index=False)),
)
return df.set_index("Strategy")