Re: [QuantLib-svn] SF.net SVN: quantlib:[16065] trunk/QuantLib/ql/termstructures/yield/ forwardcurve.hpp

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [QuantLib-svn] SF.net SVN: quantlib:[16065] trunk/QuantLib/ql/termstructures/yield/ forwardcurve.hpp

Luigi Ballabio
On Wed, 2009-03-25 at 10:31 +0000, [hidden email] wrote:
> Revision: 16065
>           http://quantlib.svn.sourceforge.net/quantlib/?rev=16065&view=rev
> Author:   nando
> Date:     2009-03-25 10:31:08 +0000 (Wed, 25 Mar 2009)
>
> Log Message:
> -----------
> added flat extrapolation

Care to discuss?

Luigi


--

The shortest way to do many things is to do only one thing at once.
-- Samuel Smiles



------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: [QuantLib-svn] SF.net SVN: quantlib:[16065] trunk/QuantLib/ql/termstructures/yield/ forwardcurve.hpp

Ferdinando Ametrano-4
On Wed, Mar 25, 2009 at 11:38 AM, Luigi Ballabio
<[hidden email]> wrote:

> On Wed, 2009-03-25 at 10:31 +0000, [hidden email] wrote:
>> Revision: 16065
>>
>> Log Message:
>> -----------
>> added flat extrapolation
>>
>>  Modified Paths:
>> --------------
>>    trunk/QuantLib/ql/termstructures/yield/forwardcurve.hpp
>
> Care to discuss?

glad to oblige.

The InterpolatedForwardCurve used the interpolant to extrapolate,
which easily leads to implausible rates, unless one used
piecewise-constant interpolation. Even "basic" linear interpolation
could lead to negative rates or implausible high rates depending on
its slope in the final segment

Flat forward rate extrapolation keeps forward rate continuous, at the
cost of an angular point for non piecewise-constant interpolations.
This is a non-issue for linear interpolation since in this case the
curve already has an angular point at every knot. When it comes to
higher order interpolation it is still a bearable cost compared to
implausible extrapolation values.

In any case this cost is negligible in the overall smoothness
evaluation of the curve, as the forward rate curve is integrated in
order to obtain zero rate (and then discount factor)

Of course extrapolation is always a dangerous exercise, but if one
needs it then flat extrapolation of instantaneous forward rates is
usually the preferred approach, with no real feasible alternatives I
know of.

This is also the approach adopted in the InterpolatedHazardRateCurve.

Any contrarian out there?

ciao -- Nando

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: [QuantLib-svn] SF.net SVN: quantlib:[16065] trunk/QuantLib/ql/termstructures/yield/ forwardcurve.hpp

Luigi Ballabio
On Wed, 2009-03-25 at 12:23 +0100, Ferdinando Ametrano wrote:
> glad to oblige.

Thanks.  I agreed with the change, but I though it would have been a
good thing to have its rationale explained---which you did nicely.

Luigi


--

I'd never join any club that would have the likes of me as a member.
-- Groucho Marx



------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: [QuantLib-svn] SF.net SVN: quantlib:[16065] trunk/QuantLib/ql/termstructures/yield/ forwardcurve.hpp

Ferdinando Ametrano-4
On Wed, Mar 25, 2009 at 12:33 PM, Luigi Ballabio
<[hidden email]> wrote:
> I agreed with the change, but I though it would have been a
> good thing to have its rationale explained

which now prompts me to tackle a possible next step.

While I thought that flat fwd extrapolation was uncontroversial when
modelling fwd rates (InterpolatedForwardCurve), it might become
slightly controversial when applied to discount
(InterpolatedDiscountCurve) and zero (InterpolatedZeroCurve).

In the current situation for InterpolatedDiscountCurve we are
extrapolating discounts, which is not sensible and might lead to
negative and/or increasing discounts
Any flat discount extrapolation would simply make no sense at all as
it would imply null fwd rates.

As for InterpolatedZeroCurve we are now extrapolating zero, which
again is not sensible and might lead to negative rates.
In this case flat zero extrapolation might look tempting, but it is
actually equivalent to extrapolate flat fwd rates equal to their
average value over the interpolation interval: a quite bizzarre
assumption which also introduce a jump in fwd rates.

So I propose to extrapolate flat fwd rates and this could be quite
easily implemented in the InterpolatedXXXCurve classes.

Any opinion?

ciao -- Nando

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: [QuantLib-svn] SF.net SVN: quantlib:[16065] trunk/QuantLib/ql/termstructures/yield/ forwardcurve.hpp

Ferdinando Ametrano-4
On Wed, Mar 25, 2009 at 1:36 PM, Ferdinando Ametrano <[hidden email]> wrote:
> So I propose to extrapolate flat fwd rates and this could be quite
> easily implemented in the InterpolatedXXXCurve classes.

I just did it in Rev16082

http://quantlib.svn.sourceforge.net/quantlib/?rev=16082&view=rev

ciao -- Nando

------------------------------------------------------------------------------
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev