aboutsummaryrefslogtreecommitdiffstats
path: root/python/risk
diff options
context:
space:
mode:
Diffstat (limited to 'python/risk')
-rw-r--r--python/risk/bonds.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/python/risk/bonds.py b/python/risk/bonds.py
index 9e1e3d3a..fda36111 100644
--- a/python/risk/bonds.py
+++ b/python/risk/bonds.py
@@ -111,10 +111,9 @@ def subprime_risk(date, conn, engine):
)
df_calc.b_yield += (
- ((df_calc.pv1 * df_calc.curr_ntl / df_calc.local_market_value).log() /
- df_calc.modDur).
- clip_upper(1.0)
- )
+ (df_calc.pv1 * df_calc.curr_ntl / df_calc.local_market_value).log()
+ / df_calc.modDur
+ ).clip_upper(1.0)
# delta scaled by ratio of market_value to model value
df_calc.delta_yield *= df_calc.local_market_value / df_calc.pv3
df_calc.delta_ir *= df_calc.local_market_value / df_calc.pv3