aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/risk/bonds.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/python/risk/bonds.py b/python/risk/bonds.py
index 9f02a5fd..f78c28ef 100644
--- a/python/risk/bonds.py
+++ b/python/risk/bonds.py
@@ -4,7 +4,7 @@ from serenitas.analytics.base import Trade
import datetime
from enum import Enum, auto
-from serenitas.analytics.yieldcurve import YC
+from serenitas.analytics.yieldcurve import get_curve, jp_to_ql
class AssetClass(Enum):
@@ -135,7 +135,7 @@ def subprime_risk(date, conn, engine, model_date=None, fund="SERCGMAST"):
)
df_calc = df_pos.join(df_risk)
- yc = YC(evaluation_date=date, curve_type="OIS")
+ yc = jp_to_ql(get_curve(date, "USD"))
df_calc = df_calc.assign(
swap_rate=df_calc.modDur.apply(
@@ -227,7 +227,7 @@ def get_portfolio(date, conn, asset_class: AssetClass, fund="SERCGMAST"):
def crt_risk(date, dawn_conn, fund="SERCGMAST"):
Trade.init_ontr(date)
- yc = YC(evaluation_date=date, curve_type="OIS")
+ yc = jp_to_ql(get_curve(date, "USD"))
df = pd.read_sql_query(
"SELECT * FROM list_crt_data(%s, %s)",
dawn_conn,
@@ -255,7 +255,7 @@ def crt_risk(date, dawn_conn, fund="SERCGMAST"):
def clo_risk(date, dawn_conn, et_conn, fund="SERCGMAST"):
- yc = YC(evaluation_date=date, curve_type="OIS")
+ yc = jp_to_ql(get_curve(date, "USD"))
df = get_portfolio(date, dawn_conn, AssetClass.CLO, fund)
if df.empty:
return None