diff options
Diffstat (limited to 'python/cds_curve.py')
| -rw-r--r-- | python/cds_curve.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/python/cds_curve.py b/python/cds_curve.py index 2b321e59..027c61e9 100644 --- a/python/cds_curve.py +++ b/python/cds_curve.py @@ -30,7 +30,10 @@ def all_curves_pv(curves, today_date, jp_yc, start_date, step_in_date, value_dat def calibrate_portfolio(index_type, series, tenors=['3yr', '5yr', '7yr', '10yr'], start_date=None): - index = MarkitBasketIndex(index_type, series, tenors) + try: + index = MarkitBasketIndex(index_type, series, tenors) + except ValueError: + return if start_date: index.index_quotes = index.index_quotes[start_date:] for value_date, v in index.index_quotes.groupby('date')['id']: |
