|
From: Sumit S. <su...@mo...> - 2019-12-27 13:52:09
|
Hi, I have a 50y swap which I am trying to price using a ZeroCurve that I've fitted. However, the maturity of my zero curve is for *30Y.* Hence I modify the below statement.... engine = ql.DiscountingSwapEngine(self.z_discurve_1.QLZeroCurve) self.QL_Swap1.setPricingEngine(engine) to zc_extrapolated = self.z_discurve_1.QLZeroCurve.enableExtrapolation() engine = ql.DiscountingSwapEngine(*zc_extrapolated*) self.QL_Swap1.setPricingEngine(engine) However, the ql.DiscountingSwapEngine(...) line gives me an error:- def __init__(self, *args): > this = _QuantLib.new_DiscountingSwapEngine(*args) E ValueError: invalid null reference in method 'new_DiscountingSwapEngine', argument 1 of type 'Handle< YieldTermStructure > const &' Any help on how to correctly extrapolate my ZeroCurve would be appreciated. Thanks, Sumit |