aboutsummaryrefslogtreecommitdiffstats
path: root/python/cds_rebook.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/cds_rebook.py')
-rw-r--r--python/cds_rebook.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/python/cds_rebook.py b/python/cds_rebook.py
index 47d76b1d..a85032a8 100644
--- a/python/cds_rebook.py
+++ b/python/cds_rebook.py
@@ -161,9 +161,7 @@ def rebook(conn, trade_date, company_id, seniority, fcm, fund="SERCGMAST"):
"account_code": fcm,
}
trade_new = copy(trade_old)
- trade_new["protection"] = (
- "Seller" if trade_old["protection"] == "Buyer" else "Buyer"
- )
+ trade_new["protection"] = "Sell" if trade_old["protection"] == "Buy" else "Buy"
trade_new["upfront"] = -adj - index_old.pv
trade_new["security_id"] = r.redindexcode
sql_str = f"INSERT INTO cds({','.join(trade_new.keys())}) VALUES %s"