diff options
Diffstat (limited to 'python')
| -rw-r--r-- | python/calibrate_swaption.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/python/calibrate_swaption.py b/python/calibrate_swaption.py index 32478eaf..1d0951e8 100644 --- a/python/calibrate_swaption.py +++ b/python/calibrate_swaption.py @@ -24,7 +24,8 @@ def get_data(index, series, date=datetime.date.min): (df.quote_source == "GS") & (df["index"] == "HY"), ["pay_bid", "pay_offer", "rec_bid", "rec_offer"], ] *= 100 - df.quotedate = df.quotedate.dt.tz_convert("America/New_York") + if not df.empty: + df.quotedate = df.quotedate.dt.tz_convert("America/New_York") return df |
