|
From: Luigi B. <lui...@gm...> - 2021-04-08 13:53:02
|
Hello,
I don't think we have example code for the treasury curve, but the idea
is that if you have the par yields of a set of bonds (i.e., the coupons
that cause those bonds to have price 100) you can use the
PiecewiseYieldCurve class for bootstrap and pass it a series of BondHelpers
corresponding to that set of bonds — that is, each will have one of the
given maturities, the corresponding coupon rate, and a quoted price of 100.
Once you have the curve, you can use it as any other curve. For vanilla
options, you can look at the EquityOption example distributed with QuantLib
and replace the flat curve in the example with your curve.
Hope this helps,
Luigi
On Tue, Mar 16, 2021 at 9:17 PM Prasanna Katta <pk...@ku...>
wrote:
> Hello.
> Are there any examples which show how to bootstrap the US Treasury yield
> curve, and then use them to price vanilla options? The following is an
> example of the US Treasury yield curve.
>
> Date1 Mo2 Mo3 Mo6 Mo1 Yr2 Yr3 Yr5 Yr7 Yr10 Yr20 Yr30 Yr
> 01/02/13 0.07 N/A 0.08 0.12 0.15 0.27 0.37 0.76 1.25 1.86 2.63 3.04
>
> Any guidance would be appreciated.
>
> Thanks.
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|