diff options
| -rw-r--r-- | python/analytics/curve_trades.py | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/python/analytics/curve_trades.py b/python/analytics/curve_trades.py index 6eb13d7f..b7fc68bc 100644 --- a/python/analytics/curve_trades.py +++ b/python/analytics/curve_trades.py @@ -293,23 +293,14 @@ def spot_forward(index="IG", series=None, tenors=["3yr", "5yr", "7yr", "10yr"]): spreads_current = b_index.spread() spreads_current.name = "current" spreads_1yr = pd.Series( - [ - b_index.spread(m - relativedelta(years=1), b_index.coupon(m)) - for m in b_index.maturities - ], + [b_index.spread(m - relativedelta(years=1)) for m in b_index.maturities], index=tenors, ) spreads_1yr.name = "1yr" df = pd.concat([spreads_current, spreads_1yr], axis=1) maturity_1yr = roll_date(b_index.index_desc.issue_date[0], 1) df_0 = pd.DataFrame( - { - "current": [ - 0.0, - b_index.spread(maturity_1yr, 0.01 if index == "IG" else 0.05), - ], - "1yr": [0.0, 0.0], - }, + {"current": [0.0, b_index.spread(maturity_1yr)], "1yr": [0.0, 0.0]}, index=["0yr", "1yr"], ) df_0.index.name = "tenor" |
