New answers tagged

1

The fair rate calculated in the above example is the rate to be used for fixed rate leg to yield 0 NPV. You would need to reconstruct the swap with the float leg as is but a fixed leg with fair rate from above. That should yield a 0 NPV for the swap.


2

Try casting, something like c = as_coupon(cf) if not c.__nonzero__(): print "principal redemption" You can likewise attempt casting the cf to as_fixed_rate_coupon(cf) or to as_floating_rate_coupon(cf), and if they work, then access other useful info. Also, redemptions is another available inspector. Related question: how can i see the ...


1

I think you are missing the eval date, and then there are some subleties in how Excel/QL setup discount factors etc.: import QuantLib as ql now, you forgot this step: ql.Settings.instance().evaluationDate = ql.Date(15,5,2021) and then coupon = 0.00375 yld = 0.01 start = ql.Date(15,5,2021) maturity = ql.Date(30,11,2025) schedule = ql.Schedule(start, ...


3

Short answer: Gamma is computed differently; price is quoted by the exchange in a way QuantLib does not compute Long answer: BBG's DES page computes Gamma as 1% chg in underlying - there is also no flexibility with the DES page and frequently this is not the best calc they offer. However you can load any listed option in their OTC pricers to get listed ...


Top 50 recent answers are included