Preliminary 0.9.0 tarballs

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

Preliminary 0.9.0 tarballs - IborLeg class

Toyin Akin
Hi Luigi,
 
Within the IborLeg class, the Leg() method creates and returns a Leg (cashflow array).
 
However it only checks whether the internal caps/floors arrays are empty before applying a default couponPricer object to the leg. The method also needs to check the inArrears_ flag otherwise a mispricing can occur as the default couponPricer object is not correct in the inArrears case.
 
Toy out...


Get closer to the jungle… I'm a Celebrity Get Me Out Of Here!
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Preliminary 0.9.0 tarballs - SwapRateHelper::ImpliedQuote

Toyin Akin
Hi all,
 
I'm slightly confused as to how the spread is treated/used within this function.
 
I first thought it was a swap spread, thus this spread would be simply added onto the inputted swap rate and the stripper would do it's stuff.
 
But looking at it, it's more like a spread that is added onto every floating rate fixing within the underlying swap. This spread looks more like a basis swap spread.
 
Am I correct in assuming this?
 
If this is the case how does one price a basis swap from the construction of two floating legs back to back via this spreaded curve? I'm not really concerned about the actual QuantLib classes involved, just where does one pass in the yieldcurve handles.
 
To be a little clearer, we would now have two yieldcurves, (one without basis spreads and one with) and two different yieldcurve inputs for each floating leg.
 
Leg1 will have a discounting curve (probably embedded in a discounting engine) and a fixing curve (embedded in the index).
 
The same is true for leg2
 
Thus if one wanted to recreate the basis swap value entered into the yieldcurve stripper (lets say the 10Y point), what are the input yieldcurve combinations  (discounting/refixing) and (spreaded/non spreaded) for each leg?
 
Also there is a comment of "weak implementation" stated within this method...
 
Thanks in advance,
Toy out...
 
 


Can you guess the film? Search Charades!
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: Preliminary 0.9.0 tarballs - SwapRateHelper::ImpliedQuote

Ferdinando M. Ametrano-3
Hi Toyin

>  I'm slightly confused as to how the spread is treated/used within this
> function. [...]
>  But looking at it, it's more like a spread that is added onto every
> floating rate fixing within the underlying swap.
yes it it. The previous SwapRateHelper was able to deal with a fixed
rate versus flat floating rate swap, the new one is able to deal with
fixed rate vs floating rate + spread

>  Also there is a comment of "weak implementation" stated within this
> method...
I kinda dislike the actual implementation, with the spread algebra
hardcoded in the SwaprateHelper, but since the spread is a Quote it
can dynamically change and could not be set in the swap at
construction time.
I couldn't come up with a cleaner implementation: probably having Rate
VanillaSwap::fairRate(Spread s = 0.0) would help

> This spread looks more like a basis swap spread.
>  Am I correct in assuming this?
yes and no.
No: if you take my previous explanation at face value basis swaps are
not involved at all.
Yes: you can use it to transform a fixed rate vs 6M flat swap into an
equivalent fixed rate vs 3M plus spread swap. And the spread would be
the 3M/6M basis

Of curse SwapRateHelper is a bootstrapping ancillary class, so it can
be used to bootstrap yield curve, not for pricing (basis) swaps.
The rest of your post concern how to price a basis swap: I won't go
into details as your mileage might vary, but would appreciate if
anyone could share its expertise on the subject

ciao -- Nando

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: Preliminary 0.9.0 tarballs - SwapRateHelper::ImpliedQuote

Luigi Ballabio

On Mon, 2007-12-03 at 11:09 +0100, Ferdinando Ametrano wrote:
> yes it it. The previous SwapRateHelper was able to deal with a fixed
> rate versus flat floating rate swap, the new one is able to deal with
> fixed rate vs floating rate + spread

Are these actually quoted? Just curious...

Luigi


--

There is no likelihood man can ever tap the power of the atom.
-- Robert Millikan, Nobel Prize in Physics, 1923



-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: Preliminary 0.9.0 tarballs - IborLeg class

Luigi Ballabio
In reply to this post by Toyin Akin

On Mon, 2007-12-03 at 06:11 +0000, Toyin Akin wrote:
> Within the IborLeg class, the Leg() method creates and returns a Leg
> (cashflow array).
>  
> However it only checks whether the internal caps/floors arrays are
> empty before applying a default couponPricer object to the leg. The
> method also needs to check the inArrears_ flag otherwise a mispricing
> can occur as the default couponPricer object is not correct in the
> inArrears case.

You're right. I've fixed it.

Thanks,
        Luigi


--

Perfection is reached, not when there is no longer anything to add, but
when there is no longer anything to take away.
-- Antoine de Saint-Exupery



-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: Preliminary 0.9.0 tarballs - SwapRateHelper::ImpliedQuote

Ferdinando M. Ametrano-3
In reply to this post by Luigi Ballabio
On Dec 3, 2007 11:21 AM, Luigi Ballabio <[hidden email]> wrote:
>
> On Mon, 2007-12-03 at 11:09 +0100, Ferdinando Ametrano wrote:
> > yes it it. The previous SwapRateHelper was able to deal with a fixed
> > rate versus flat floating rate swap, the new one is able to deal with
> > fixed rate vs floating rate + spread
>
> Are these actually quoted? Just curious...

they are increasingly available as alternative to quote standard and
non-standard basis swaps.
A lot of pages are popping up with these swaps, and the trend is
strong as these quotes are often used to bootstrap different
forecasting yield curves in software systems which are not ready to
deal with basis swaps

ciao -- Nando

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: Preliminary 0.9.0 tarballs - SwapRateHelper::ImpliedQuote

Toyin Akin

Interesting...
 
Do these spreads have an official name or are these spreads also named basis swaps?
 
Toy out...
 
> Date: Mon, 3 Dec 2007 12:51:35 +0100

> From: [hidden email]
> To: [hidden email]
> CC: [hidden email]; [hidden email]
> Subject: Re: [Quantlib-dev] Preliminary 0.9.0 tarballs - SwapRateHelper::ImpliedQuote
>
> On Dec 3, 2007 11:21 AM, Luigi Ballabio <[hidden email]> wrote:
> >
> > On Mon, 2007-12-03 at 11:09 +0100, Ferdinando Ametrano wrote:
> > > yes it it. The previous SwapRateHelper was able to deal with a fixed
> > > rate versus flat floating rate swap, the new one is able to deal with
> > > fixed rate vs floating rate + spread
> >
> > Are these actually quoted? Just curious...
>
> they are increasingly available as alternative to quote standard and
> non-standard basis swaps.
> A lot of pages are popping up with these swaps, and the trend is
> strong as these quotes are often used to bootstrap different
> forecasting yield curves in software systems which are not ready to
> deal with basis swaps
>
> ciao -- Nando
>
> -------------------------------------------------------------------------
> SF.Net email is sponsored by: The Future of Linux Business White Paper
> from Novell. From the desktop to the data center, Linux is going
> mainstream. Let it simplify your IT future.
> http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
> _______________________________________________
> QuantLib-dev mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-dev



Get closer to the jungle… I'm a Celebrity Get Me Out Of Here!
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: Preliminary 0.9.0 tarballs

Klaus Spanderen-2
In reply to this post by Luigi Ballabio
Hi Gary, Luigi,

the dependency of the test case on today's date is introduced by the day
counter Act360. In addition I used only 500 antithetic samplings to keep the
runtime short... seems that it was too short for a valid error calculation;-)
Everything is okay using e.g. gcc 4.0.1 and a 4 (or even 100) times larger
statistics.

The dependency on the gcc compiler version is more subtle. I get the same
error messages using 500 samples and 4.0.1 whereas gcc 4.2.1 gives no error
at all. The root of the difference is the routine

rankReducedSqrt(Matrix& m, ...)

which is needed to calculate the Monte-Carlo paths. The solution is not
unique, e.g. the sign of the result might differ. Both results for gcc 4.0.1
and 4.2.1 are numerically correct but differ with respect to the sign.
Therefore one gets different MC paths and by accident 4.0.1 is failing today
to fulfill the error bounds when using only 500 paths.

Luigi, I have relaxed the error bounds for some of the tests to avoid
bothersome error logs. Should we put this into 0.9 (?).



 

On Saturday 01 December 2007 21:58:12 Luigi Ballabio wrote:

> On Dec 1, 2007, at 8:58 PM, Gary Kennedy wrote:
> > I am also seeing some test fails relating HybridHestonHullWhiteProcess.
> > I'm using Suse10.0 with boost 1.33.1, gcc 4.0.2
>
> Gary,
> did you run them today (Saturday?)  If so, it might have to do with
> today being a holiday. I'll look into this in the next days.
>
> Thanks,
> Luigi
>
>
>
> -------------------------------------------------------------------------
> SF.Net email is sponsored by: The Future of Linux Business White Paper
> from Novell.  From the desktop to the data center, Linux is going
> mainstream.  Let it simplify your IT future.
> http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
> _______________________________________________
> QuantLib-dev mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-dev


--
Klaus Spanderen
Ludwig Erhard Str. 12
48734 Reken (Germany)
EMail: [hidden email] (remove NOSPAM from the address)

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev

hybridhestonhullwhiteprocess.cpp (58K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Preliminary 0.9.0 tarballs

Luigi Ballabio

On Mon, 2007-12-03 at 16:14 +0100, Klaus Spanderen wrote:
> Luigi, I have relaxed the error bounds for some of the tests to avoid
> bothersome error logs. Should we put this into 0.9 (?).

I did. Thanks.

Luigi


--

Testing can never demonstrate the absence of errors in software, only
their presence.
-- W.E. Dijkstra



-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
12