aboutsummaryrefslogtreecommitdiffstats
path: root/python/position.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/position.py')
-rw-r--r--python/position.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/python/position.py b/python/position.py
index 3f40db1d..81f5af5c 100644
--- a/python/position.py
+++ b/python/position.py
@@ -277,11 +277,13 @@ def update_swap_rates(
conn.commit()
-def update_cash_rates(conn, session, start_date=None):
+def update_cash_rates(conn, session, start_date: datetime.date = None):
securities = {
"FEDL01 Index": "FED_FUND",
"US0001M Index": "1M_LIBOR",
"US0003M Index": "3M_LIBOR",
+ "SOFRRATE Index": "SOFR_RATE",
+ "SOFRINDX Index": "SOFR_INDEX",
}
if start_date is None:
data = retrieve_data(
@@ -289,7 +291,7 @@ def update_cash_rates(conn, session, start_date=None):
)
else:
data = retrieve_data(
- session, list(securities.keys()), ["PX_LAST"], start_date=start_date.date()
+ session, list(securities.keys()), ["PX_LAST"], start_date=start_date
)
sql_str = "INSERT INTO rates VALUES(%s, %s, %s) ON CONFLICT DO NOTHING"
with conn.cursor() as c: