|
From: Luigi B. <lui...@gm...> - 2021-03-11 09:24:22
|
Hello,
the forwards are instantaneous — meaning they span an infinitesimal
time, not 0.001, so you can calculate the 1M and 3M rates as integrals.
For the flat region over 1M, you'll get exp(- rate * 1M) = 1M DF. For the
3M, exp(I) = 3M DF where I is the integral between 0 and 3M; it's the area
of the rectangle below the flat part plus the area of the trapezoid below
the linear part, so you have simple formulas for both.
Alternatively, once you bootstrapped the curve, you can ask it the implied
deposit rates by calling
curve->forwardRate(d1, d2, day_count, Simple);
where d1 is the beginning of the deposit (usually spot, not today), d2 =
d1 + 1M or 3M (taking holidays into account), and day_count is the
day-count convention of the deposit.
Hope this helps,
Luigi
On Wed, Mar 10, 2021 at 4:30 PM Arkadiy Naumov <ark...@gm...>
wrote:
> Have a question for the community, which is a bit on obscure side. When
> using piecewise yield curve with interpolation on forward rates, how should
> I use instantaneous forward rates to make sure the original instruments
> (those set up by ratehelpers) are priced accurately?
>
> Here is what I mean:
>
> suppose all I have is two deposit helpers for 1M and 3M and I chose linear
> interpolation.
> Instantaneous forward rates (which span 0.001 fraction of a year) are flat
> prior to 1M. If these were daily rates, I would be looking for the rate
> that satisfies exp(-rate/365)^31 = 1M DF (1M DF is implied by 1M deposit
> rate). How do I modify this for the instantaneous forward? Is it
> exp(-rate*0.001)^85 (this is approximate - .001 is about 2.74 times smaller
> than 1 day of 365-day year)
>
> And then to get the rates filled out between 1M and 3M, is it
> PRODUCT (exp(-(1M_NodeRate + k*n) *0.001)) = 3M DF ?
>
> Where k is the slope (it is linear interpolation after all) and n is the
> number of times 0.001 fits between 1M and 3M
>
> Which would mean I can calculate k analytically
>
> Thank you in advance! I am going to go ahead and test my theory out
> anyway, but if it’s incorrect, I need the advice anyway!
>
> Sent from my iPhone
>
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|