diff options
Diffstat (limited to 'python/yieldcurve.py')
| -rw-r--r-- | python/yieldcurve.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/python/yieldcurve.py b/python/yieldcurve.py index 17e21a3e..94f7ceb1 100644 --- a/python/yieldcurve.py +++ b/python/yieldcurve.py @@ -147,10 +147,13 @@ def roll_yc(yc, forward_date): dfs = np.array([yc.discount_factor(d, forward_date) for d in dates]) return YieldCurve.from_discount_factors(forward_date, dates, dfs, 'ACT/365F') -def YC(helpers = None, currency="USD", MarkitData=None): +def YC(helpers = None, currency="USD", MarkitData=None, evaluation_date=None): if helpers is None: - helpers = rate_helpers(currency, MarkitData) + helpers = rate_helpers(currency, MarkitData, evaluation_date) calendar = WeekendsOnly() + settings = Settings() + if evaluation_date: + settings.evaluation_date = Date.from_datetime(evaluation_date) return PiecewiseYieldCurve(BootstrapTrait.Discount, Interpolator.LogLinear, 0, calendar, helpers, Actual365Fixed()) |
