yield curve bootstrapping

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

Re: yield curve bootstrapping

Luigi Ballabio
On Tue, 2010-05-04 at 12:30 +0200, Paolo Baroni wrote:
> Hi,
> sorry for my ignorance but which kind of rate is the "DepoSN"?

Spot-next (that is, from spot to the day after.)

Luigi


--

Anyone who says he can see through women is missing a lot.
-- Groucho Marx



------------------------------------------------------------------------------
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: yield curve bootstrapping

paolo baroni
Thank you
ciao 
Paolo

2010/5/4 Luigi Ballabio <[hidden email]>
On Tue, 2010-05-04 at 12:30 +0200, Paolo Baroni wrote:
> Hi,
> sorry for my ignorance but which kind of rate is the "DepoSN"?

Spot-next (that is, from spot to the day after.)

Luigi


--

Anyone who says he can see through women is missing a lot.
-- Groucho Marx




------------------------------------------------------------------------------

_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: yield curve bootstrapping

brb204
Hello all

I tryed to build yeild curve with  constant Deposit rates (0.06) upto one year. But when i tried to get zero rate from that curve, I am always getting a rate which is less than 0.06. Could you guys please help me out.

Thanks in Advance
Ram



On Wed, May 5, 2010 at 2:14 PM, Paolo Baroni <[hidden email]> wrote:
Thank you
ciao 
Paolo

2010/5/4 Luigi Ballabio <[hidden email]>

On Tue, 2010-05-04 at 12:30 +0200, Paolo Baroni wrote:
> Hi,
> sorry for my ignorance but which kind of rate is the "DepoSN"?

Spot-next (that is, from spot to the day after.)

Luigi


--

Anyone who says he can see through women is missing a lot.
-- Groucho Marx




------------------------------------------------------------------------------

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



------------------------------------------------------------------------------

_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: yield curve bootstrapping

Luigi Ballabio
On Thu, 2010-05-06 at 11:57 +0530, Rambo Bachalakuri wrote:
> I tryed to build yeild curve with  constant Deposit rates (0.06) upto
> one year. But when i tried to get zero rate from that curve, I am
> always getting a rate which is less than 0.06. Could you guys please
> help me out.

The deposit rate is simply compounded.  You're probably asking for the
continuously-compounded zero rate, which is lower since it has to
satisfy the equivalence (1+Rt) = exp(Zt) with t = 1 year, R = deposit
rate and Z = zero rate.

Luigi


--

Discontent is the first necessity of progress.
-- Thomas A. Edison



------------------------------------------------------------------------------
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: yield curve bootstrapping

Ferdinando M. Ametrano-3
In reply to this post by brb204
Hi Ram

> I tryed to build yeild curve with  constant Deposit rates (0.06) upto one
> year. But when i tried to get zero rate from that curve, I am always getting
> a rate which is less than 0.06. Could you guys please help me out.

You cannot compare apples and oranges: zero rate are continuous
compounding, while deposit (up to 1Y) are simple compounding.

You must also pay attention to dayconting conventions. In the EUR case
deposits use act/360, while zeros use whatever you selected (hopefully
act/365 or some strictly monotone daycounter)

ciao -- Nando

------------------------------------------------------------------------------
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: yield curve bootstrapping

brb204
In reply to this post by Luigi Ballabio
Hi Luigi

Thanks for your reply, I tried almost all permutations and combinations of all compounding and frequencies. But i never got the inputted 0.06 rate. 

I think for these inputs of zero rate i should get 0.06, as zero coupon rates and deposit rates are same.
double riskFreeDiscount = DepoTermStructure->zeroRate(chekDate,depositDayCounter,Simple,Once); 

can you please correct me. I am also attaching my code in text file.

thanks in advance
Ram


On Thu, May 6, 2010 at 1:11 PM, Luigi Ballabio <[hidden email]> wrote:
On Thu, 2010-05-06 at 11:57 +0530, Rambo Bachalakuri wrote:
> I tryed to build yeild curve with  constant Deposit rates (0.06) upto
> one year. But when i tried to get zero rate from that curve, I am
> always getting a rate which is less than 0.06. Could you guys please
> help me out.

The deposit rate is simply compounded.  You're probably asking for the
continuously-compounded zero rate, which is lower since it has to
satisfy the equivalence (1+Rt) = exp(Zt) with t = 1 year, R = deposit
rate and Z = zero rate.

Luigi


--

Discontent is the first necessity of progress.
-- Thomas A. Edison




------------------------------------------------------------------------------

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

YCdeposits.txt (9K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: yield curve bootstrapping

zlee
In reply to this post by Luigi Ballabio
two questions related to bootstrapping for different currency. First, does the swapRateHelper take care of floating leg UK holidays? It seems that it does not. If it is true, does the UK holiday list have to be inputed to the used calendar for pricing a USD swap for instance. Another question is if there is an option for piecewise quadratic forward termstructure. Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: yield curve bootstrapping

Luigi Ballabio
In reply to this post by brb204
On Thu, 2010-05-06 at 14:37 +0530, Rambo Bachalakuri wrote:
> Thanks for your reply, I tried almost all permutations and
> combinations of all compounding and frequencies. But i never got the
> inputted 0.06 rate.

Apologies for the delay.
If you use the end date of one of the deposits you've used for the curve
(e.g., if you use
    Date checkDate = Date(6, August, 2010);
instead of September 6th, which doesn't correspond to any input deposit)
you get the correct rate back.  Alternatively, you can add the 4-months
deposit to the curve, at which point September 6th will give you the
correct rate, too.  But in between curve nodes, you won't always
retrieve the same value---you're using log-linear interpolation on
discounts, not linear interpolation on the zero rates.

Luigi



--

Brady's First Law of Problem Solving:
When confronted by a difficult problem, you can solve it more
easily by reducing it to the question, "How would the Lone
Ranger have handled this?"



------------------------------------------------------------------------------

_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: yield curve bootstrapping

Luigi Ballabio
In reply to this post by zlee
On Thu, 2010-05-06 at 05:26 -0700, zlee wrote:
> two questions related to bootstrapping for different currency. First, does
> the swapRateHelper take care of floating leg UK holidays? It seems that it
> does not.

It should, if you're passing it an USDLibor instance (the latter
calculates fixing dates based on both UK and US holidays, as specified
for LIBOR.)  Do you have a counterexample?


> Another question is if
> there is an option for piecewise quadratic forward termstructure. Thanks.

Not at this time.  If you wrote a quadratic interpolation with the same
interface as the existing ones (linear, cubic etc.---you can look at the
ql/math/interpolations folder) then you'll be able to plug it in the
piecewise curve.

Luigi



--

I have made this letter longer than usual, only because I have not had
the time to make it shorter.
-- B. Pascal



------------------------------------------------------------------------------

_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: yield curve bootstrapping

Ferdinando M. Ametrano-3
On Thu, May 27, 2010 at 3:18 PM, Luigi Ballabio
<[hidden email]> wrote:
> On Thu, 2010-05-06 at 05:26 -0700, zlee wrote:
>> Another question is if
>> there is an option for piecewise quadratic forward termstructure. Thanks.
>
> Not at this time.  If you wrote a quadratic interpolation with the same
> interface as the existing ones (linear, cubic etc.---you can look at the
> ql/math/interpolations folder) then you'll be able to plug it in the
> piecewise curve.

it's already available as sub-case of cubic interpolation: if you
choose Parabolic as DerivativeApprox method you obtain a piecewise
quadratic interpolation.
I know it might looks convoluted, but it isn't if you follow the cubic
interpolation definition in Hyman 83 and  Dougherty,  Edelman, Hyman
89

ciao -- Nando

------------------------------------------------------------------------------

_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: yield curve bootstrapping

Luigi Ballabio
On Thu, 2010-05-27 at 18:23 +0200, Ferdinando Ametrano wrote:

> On Thu, May 27, 2010 at 3:18 PM, Luigi Ballabio
> <[hidden email]> wrote:
> > On Thu, 2010-05-06 at 05:26 -0700, zlee wrote:
> >> Another question is if
> >> there is an option for piecewise quadratic forward termstructure. Thanks.
> >
> > Not at this time.
>
> it's already available as sub-case of cubic interpolation: if you
> choose Parabolic as DerivativeApprox method you obtain a piecewise
> quadratic interpolation.

I stand corrected.  How about providing an alias for it though?

Luigi


--

If you can't convince them, confuse them.
-- Harry S. Truman



------------------------------------------------------------------------------

_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: yield curve bootstrapping

Ferdinando M. Ametrano-3
On Thu, May 27, 2010 at 6:25 PM, Luigi Ballabio
<[hidden email]> wrote:
>> it's already available as sub-case of cubic interpolation: if you
>> choose Parabolic as DerivativeApprox method you obtain a piecewise
>> quadratic interpolation.
>
> I stand corrected.  How about providing an alias for it though?

mmm... the convenience class might be buried deep down in the file but
it's already there:


    class Parabolic : public CubicInterpolation {
      public:
        /*! \pre the \f$ x \f$ values must be sorted. */
        template <class I1, class I2>
        Parabolic(const I1& xBegin,
                  const I1& xEnd,
                  const I2& yBegin)
        : CubicInterpolation(xBegin, xEnd, yBegin,
                             CubicInterpolation::Parabolic, false,
                             SecondDerivative, 0.0,
                             SecondDerivative, 0.0) {}
    };

ciao -- Nando

------------------------------------------------------------------------------

_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: yield curve bootstrapping

Simon Ibbotson
The convex-monotone method also contains a piecewise quadratic function which can be set (removes the constraint of monotonicity).


Sent from my BlackBerry® wireless device

-----Original Message-----
From: Ferdinando Ametrano <[hidden email]>
Date: Thu, 27 May 2010 18:29:50
To: <[hidden email]>
Cc: <[hidden email]>; zlee<[hidden email]>
Subject: Re: [Quantlib-users] yield curve bootstrapping

On Thu, May 27, 2010 at 6:25 PM, Luigi Ballabio
<[hidden email]> wrote:
>> it's already available as sub-case of cubic interpolation: if you
>> choose Parabolic as DerivativeApprox method you obtain a piecewise
>> quadratic interpolation.
>
> I stand corrected.  How about providing an alias for it though?

mmm... the convenience class might be buried deep down in the file but
it's already there:


    class Parabolic : public CubicInterpolation {
      public:
        /*! \pre the \f$ x \f$ values must be sorted. */
        template <class I1, class I2>
        Parabolic(const I1& xBegin,
                  const I1& xEnd,
                  const I2& yBegin)
        : CubicInterpolation(xBegin, xEnd, yBegin,
                             CubicInterpolation::Parabolic, false,
                             SecondDerivative, 0.0,
                             SecondDerivative, 0.0) {}
    };

ciao -- Nando

------------------------------------------------------------------------------

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

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