diff options
Diffstat (limited to 'python/cds_curve.py')
| -rw-r--r-- | python/cds_curve.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/python/cds_curve.py b/python/cds_curve.py index fb5e2cf0..f80ebd2b 100644 --- a/python/cds_curve.py +++ b/python/cds_curve.py @@ -38,10 +38,8 @@ def calibrate_portfolio(index_type, series, tenors=['3yr', '5yr', '7yr', '10yr'] for trade_date in index.index_quotes.index.get_level_values(0): index.trade_date = trade_date index.tweak() - durations = [index.duration(m) for m in index.maturities] - thetas = [index.theta(m) for m in index.maturities] - r[trade_date] = pd.DataFrame({'duration': durations, - 'theta': thetas, + r[trade_date] = pd.DataFrame({'duration': index.duration(), + 'theta': index.theta(), 'tweak': index.tweaks}, index=tenors) return pd.concat(r) |
