|
From: Luigi B. <lui...@gm...> - 2015-07-16 15:23:46
|
Hello,
it seems to be a side-effect of the way we're calculating forward
rates. In the base YieldTermStructure class, where the calculation is
defined, the forward rate is defined basically as the numerical derivative
of the zero rate (unfortunately, we didn't provide a way to override the
calculation, for instance to take into account that the curve has the
forwards available for interpolation). The numerical derivative at time T
is calculated as [f(t+dt) - f(t-dt)]/(2*dt), which at the nodes has the
unfortunate effect of averaging the forward before the node and the one
after the node. You can check this by asking for the forward rate one day
before the node and one day after; those two will have the values you
expect, and the value at the node will be the average.
I'm afraid there's no easy way out of this. The good news is that the
discount factors and the zero rates are correct even at the nodes, so
instrument pricing will work correctly. As for retrieving the forward
rates, if you know that you're in this particular case, you can just ask
for them at the dates one day after the nodes.
Hope this helps,
Luigi
On Sat, Jul 11, 2015 at 4:55 PM Boris Chow <cho...@gm...> wrote:
> Dear all,
>
> I am new to the list and would like to query about generating the yield
> curve object and way to generate forward rate.
>
> I have tried to use the excel addin of QuantLibXL-1.5.0
>
> I find that it is using Forward rate (cell containing G10) to create yield
> curve object (cell D5), and then use the same object to retrieve forward
> rate (cell N10). However, it is funny that the rates are different with an
> extent of 0.5% (the cells are highlighted in yellow). I tried to play
> around different combination of last 2 parameters of qlYieldTSForwardRate
> but it cannot succeed.
>
> Please kindly advise the reason behind.
>
>
> Many thanks,
> Boris
>
>
> ------------------------------------------------------------------------------
> Don't Limit Your Business. Reach for the Cloud.
> GigeNET's Cloud Solutions provide you with the tools and support that
> you need to offload your IT needs and focus on growing your business.
> Configured For All Businesses. Start Your Cloud Today.
> https://www.gigenetcloud.com/
> _______________________________________________
> QuantLib-dev mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-dev
>
--
<http://leanpub.com/implementingquantlib/>
<http://implementingquantlib.com>
<http://twitter.com/lballabio>
|