z-spread

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

z-spread

paolo baroni
Hi!  Is there a way in the function 'ZeroSpreadedTermStructure' to pass it a z-spread as a vector (set of values for different maturities)?

Thanks

Paolo

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: z-spread

Luigi Ballabio
Yes, use PiecewiseZeroSpreadedTermStructure instead.

Luigi


On Wed, Jun 4, 2014 at 11:39 AM, Paolo Baroni <[hidden email]> wrote:

> Hi!  Is there a way in the function 'ZeroSpreadedTermStructure' to pass it a
> z-spread as a vector (set of values for different maturities)?
>
> Thanks
>
> Paolo
>
> ------------------------------------------------------------------------------
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and their
> applications. Written by three acclaimed leaders in the field,
> this first edition is now available. Download your free book today!
> http://p.sf.net/sfu/NeoTech
> _______________________________________________
> QuantLib-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>



--
<https://implementingquantlib.blogspot.com>
<https://twitter.com/lballabio>

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: z-spread

paolo baroni

Thanks Luigi.
P

Il 04/giu/2014 12:01 "Luigi Ballabio" <[hidden email]> ha scritto:
Yes, use PiecewiseZeroSpreadedTermStructure instead.

Luigi


On Wed, Jun 4, 2014 at 11:39 AM, Paolo Baroni <[hidden email]> wrote:
> Hi!  Is there a way in the function 'ZeroSpreadedTermStructure' to pass it a
> z-spread as a vector (set of values for different maturities)?
>
> Thanks
>
> Paolo
>
> ------------------------------------------------------------------------------
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and their
> applications. Written by three acclaimed leaders in the field,
> this first edition is now available. Download your free book today!
> http://p.sf.net/sfu/NeoTech
> _______________________________________________
> QuantLib-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>



--
<https://implementingquantlib.blogspot.com>
<https://twitter.com/lballabio>

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: z-spread

paolo baroni
In reply to this post by Luigi Ballabio
Luigi, can I use the same function to manage CDS spread? Or there is a different way?

Thanks

Paolo


2014-06-04 12:01 GMT+02:00 Luigi Ballabio <[hidden email]>:
Yes, use PiecewiseZeroSpreadedTermStructure instead.

Luigi


On Wed, Jun 4, 2014 at 11:39 AM, Paolo Baroni <[hidden email]> wrote:
> Hi!  Is there a way in the function 'ZeroSpreadedTermStructure' to pass it a
> z-spread as a vector (set of values for different maturities)?
>
> Thanks
>
> Paolo
>
> ------------------------------------------------------------------------------
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and their
> applications. Written by three acclaimed leaders in the field,
> this first edition is now available. Download your free book today!
> http://p.sf.net/sfu/NeoTech
> _______________________________________________
> QuantLib-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>



--
<https://implementingquantlib.blogspot.com>
<https://twitter.com/lballabio>


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: z-spread

Luigi Ballabio
It depends on what you want to do with CDS spreads. They can't be just
added to the interest rates (financially, I mean). There's some
conversion to z-spreads involved which depend on your pricing models.

Luigi


On Wed, Jun 4, 2014 at 10:03 PM, Paolo Baroni <[hidden email]> wrote:

> Luigi, can I use the same function to manage CDS spread? Or there is a
> different way?
>
> Thanks
>
> Paolo
>
>
> 2014-06-04 12:01 GMT+02:00 Luigi Ballabio <[hidden email]>:
>
>> Yes, use PiecewiseZeroSpreadedTermStructure instead.
>>
>> Luigi
>>
>>
>> On Wed, Jun 4, 2014 at 11:39 AM, Paolo Baroni <[hidden email]>
>> wrote:
>> > Hi!  Is there a way in the function 'ZeroSpreadedTermStructure' to pass
>> > it a
>> > z-spread as a vector (set of values for different maturities)?
>> >
>> > Thanks
>> >
>> > Paolo
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > Learn Graph Databases - Download FREE O'Reilly Book
>> > "Graph Databases" is the definitive new guide to graph databases and
>> > their
>> > applications. Written by three acclaimed leaders in the field,
>> > this first edition is now available. Download your free book today!
>> > http://p.sf.net/sfu/NeoTech
>> > _______________________________________________
>> > QuantLib-users mailing list
>> > [hidden email]
>> > https://lists.sourceforge.net/lists/listinfo/quantlib-users
>> >
>>
>>
>>
>> --
>> <https://implementingquantlib.blogspot.com>
>> <https://twitter.com/lballabio>
>
>



--
<https://implementingquantlib.blogspot.com>
<https://twitter.com/lballabio>

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: z-spread

paolo baroni
Well, in this case I'd like to price a fixed rate bond in two ways as follows:

First way, compute the discount curve from quoted bond (same issuer)
Second way, compute the discount curve from the benchmark curve and CDS spread 

What do you think?

Thanks

Paolo




2014-06-05 10:56 GMT+02:00 Luigi Ballabio <[hidden email]>:
It depends on what you want to do with CDS spreads. They can't be just
added to the interest rates (financially, I mean). There's some
conversion to z-spreads involved which depend on your pricing models.

Luigi


On Wed, Jun 4, 2014 at 10:03 PM, Paolo Baroni <[hidden email]> wrote:
> Luigi, can I use the same function to manage CDS spread? Or there is a
> different way?
>
> Thanks
>
> Paolo
>
>
> 2014-06-04 12:01 GMT+02:00 Luigi Ballabio <[hidden email]>:
>
>> Yes, use PiecewiseZeroSpreadedTermStructure instead.
>>
>> Luigi
>>
>>
>> On Wed, Jun 4, 2014 at 11:39 AM, Paolo Baroni <[hidden email]>
>> wrote:
>> > Hi!  Is there a way in the function 'ZeroSpreadedTermStructure' to pass
>> > it a
>> > z-spread as a vector (set of values for different maturities)?
>> >
>> > Thanks
>> >
>> > Paolo
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > Learn Graph Databases - Download FREE O'Reilly Book
>> > "Graph Databases" is the definitive new guide to graph databases and
>> > their
>> > applications. Written by three acclaimed leaders in the field,
>> > this first edition is now available. Download your free book today!
>> > http://p.sf.net/sfu/NeoTech
>> > _______________________________________________
>> > QuantLib-users mailing list
>> > [hidden email]
>> > https://lists.sourceforge.net/lists/listinfo/quantlib-users
>> >
>>
>>
>>
>> --
>> <https://implementingquantlib.blogspot.com>
>> <https://twitter.com/lballabio>
>
>



--
<https://implementingquantlib.blogspot.com>
<https://twitter.com/lballabio>


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: z-spread

japari
Hi again, apologies for the previous pm Paolo, I keep using the wrong shortcut.

For the second way, you can use <ql/experimental/credit/riskybond.hpp>

You can look for the sample sheet: QuantLibXL/Workbooks/Credit/RiskyBonds.xls
which is a toy worksheet on exactly this problem with a real (more or less) market data case.
thats in
https://github.com/japari/quantlib/compare/Credit_inQLXL
which modifies a bit the previous and other code.
Write again if something does not work there.
Best
Pepe


----- Original Message -----

>
>
> Well, in this case I'd like to price a fixed rate bond in two ways as
> follows:
>
>
> First way, compute the discount curve from quoted bond (same issuer)
> Second way, compute the discount curve from the benchmark curve and
> CDS spread
>
>
> What do you think?
>
>
> Thanks
>
>
> Paolo
>
>
>
>
>
>
>
> 2014-06-05 10:56 GMT+02:00 Luigi Ballabio < [hidden email]
> > :
>
>
> It depends on what you want to do with CDS spreads. They can't be
> just
> added to the interest rates (financially, I mean). There's some
> conversion to z-spreads involved which depend on your pricing models.
>
> Luigi
>
>
>
>
> On Wed, Jun 4, 2014 at 10:03 PM, Paolo Baroni < [hidden email]
> > wrote:
> > Luigi, can I use the same function to manage CDS spread? Or there
> > is a
> > different way?
> >
> > Thanks
> >
> > Paolo
> >
> >
> > 2014-06-04 12:01 GMT+02:00 Luigi Ballabio <
> > [hidden email] >:
> >
> >> Yes, use PiecewiseZeroSpreadedTermStructure instead.
> >>
> >> Luigi
> >>
> >>
> >> On Wed, Jun 4, 2014 at 11:39 AM, Paolo Baroni <
> >> [hidden email] >
> >> wrote:
> >> > Hi! Is there a way in the function 'ZeroSpreadedTermStructure'
> >> > to pass
> >> > it a
> >> > z-spread as a vector (set of values for different maturities)?
> >> >
> >> > Thanks
> >> >
> >> > Paolo
> >> >
> >> >
> >> > ------------------------------------------------------------------------------
> >> > Learn Graph Databases - Download FREE O'Reilly Book
> >> > "Graph Databases" is the definitive new guide to graph databases
> >> > and
> >> > their
> >> > applications. Written by three acclaimed leaders in the field,
> >> > this first edition is now available. Download your free book
> >> > today!
> >> > http://p.sf.net/sfu/NeoTech
> >> > _______________________________________________
> >> > QuantLib-users mailing list
> >> > [hidden email]
> >> > https://lists.sourceforge.net/lists/listinfo/quantlib-users
> >> >
> >>
> >>
> >>
> >> --
> >> < https://implementingquantlib.blogspot.com >
> >> < https://twitter.com/lballabio >
> >
> >
>
>
>
> --
> < https://implementingquantlib.blogspot.com >
> < https://twitter.com/lballabio >
>
>
> ------------------------------------------------------------------------------
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and
> their
> applications. Written by three acclaimed leaders in the field,
> this first edition is now available. Download your free book today!
> http://p.sf.net/sfu/NeoTech
> _______________________________________________
> QuantLib-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: z-spread

paolo baroni
Thanks a lot Pepe. 
I'll try and I'll give you a feedback.

Ciao

Paolo


2014-06-05 14:34 GMT+02:00 <[hidden email]>:
Hi again, apologies for the previous pm Paolo, I keep using the wrong shortcut.

For the second way, you can use <ql/experimental/credit/riskybond.hpp>

You can look for the sample sheet: QuantLibXL/Workbooks/Credit/RiskyBonds.xls
which is a toy worksheet on exactly this problem with a real (more or less) market data case.
thats in
https://github.com/japari/quantlib/compare/Credit_inQLXL
which modifies a bit the previous and other code.
Write again if something does not work there.
Best
Pepe


----- Original Message -----
>
>
> Well, in this case I'd like to price a fixed rate bond in two ways as
> follows:
>
>
> First way, compute the discount curve from quoted bond (same issuer)
> Second way, compute the discount curve from the benchmark curve and
> CDS spread
>
>
> What do you think?
>
>
> Thanks
>
>
> Paolo
>
>
>
>
>
>
>
> 2014-06-05 10:56 GMT+02:00 Luigi Ballabio < [hidden email]
> > :
>
>
> It depends on what you want to do with CDS spreads. They can't be
> just
> added to the interest rates (financially, I mean). There's some
> conversion to z-spreads involved which depend on your pricing models.
>
> Luigi
>
>
>
>
> On Wed, Jun 4, 2014 at 10:03 PM, Paolo Baroni < [hidden email]
> > wrote:
> > Luigi, can I use the same function to manage CDS spread? Or there
> > is a
> > different way?
> >
> > Thanks
> >
> > Paolo
> >
> >
> > 2014-06-04 12:01 GMT+02:00 Luigi Ballabio <
> > [hidden email] >:
> >
> >> Yes, use PiecewiseZeroSpreadedTermStructure instead.
> >>
> >> Luigi
> >>
> >>
> >> On Wed, Jun 4, 2014 at 11:39 AM, Paolo Baroni <
> >> [hidden email] >
> >> wrote:
> >> > Hi! Is there a way in the function 'ZeroSpreadedTermStructure'
> >> > to pass
> >> > it a
> >> > z-spread as a vector (set of values for different maturities)?
> >> >
> >> > Thanks
> >> >
> >> > Paolo
> >> >
> >> >
> >> > ------------------------------------------------------------------------------
> >> > Learn Graph Databases - Download FREE O'Reilly Book
> >> > "Graph Databases" is the definitive new guide to graph databases
> >> > and
> >> > their
> >> > applications. Written by three acclaimed leaders in the field,
> >> > this first edition is now available. Download your free book
> >> > today!
> >> > http://p.sf.net/sfu/NeoTech
> >> > _______________________________________________
> >> > QuantLib-users mailing list
> >> > [hidden email]
> >> > https://lists.sourceforge.net/lists/listinfo/quantlib-users
> >> >
> >>
> >>
> >>
> >> --
> >> < https://implementingquantlib.blogspot.com >
> >> < https://twitter.com/lballabio >
> >
> >
>
>
>
> --
> < https://implementingquantlib.blogspot.com >
> < https://twitter.com/lballabio >
>
>
> ------------------------------------------------------------------------------
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and
> their
> applications. Written by three acclaimed leaders in the field,
> this first edition is now available. Download your free book today!
> http://p.sf.net/sfu/NeoTech
> _______________________________________________
> QuantLib-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: z-spread

paolo baroni
Hi Pepe I'm on quantlibxl 1.2.0 and I can't find the function qlPiecewiseHazardRateCurve that you use in sheet 'credit market' cell M9. Is it possible?
I can find qlPiecewiseFlatHazardRateCurve but I'm not sure how to use it (and if I can use it instead of the first one I mentioned).

Thanks, ciao

Paolo


2014-06-05 14:36 GMT+02:00 Paolo Baroni <[hidden email]>:
Thanks a lot Pepe. 
I'll try and I'll give you a feedback.

Ciao

Paolo


2014-06-05 14:34 GMT+02:00 <[hidden email]>:

Hi again, apologies for the previous pm Paolo, I keep using the wrong shortcut.

For the second way, you can use <ql/experimental/credit/riskybond.hpp>

You can look for the sample sheet: QuantLibXL/Workbooks/Credit/RiskyBonds.xls
which is a toy worksheet on exactly this problem with a real (more or less) market data case.
thats in
https://github.com/japari/quantlib/compare/Credit_inQLXL
which modifies a bit the previous and other code.
Write again if something does not work there.
Best
Pepe


----- Original Message -----
>
>
> Well, in this case I'd like to price a fixed rate bond in two ways as
> follows:
>
>
> First way, compute the discount curve from quoted bond (same issuer)
> Second way, compute the discount curve from the benchmark curve and
> CDS spread
>
>
> What do you think?
>
>
> Thanks
>
>
> Paolo
>
>
>
>
>
>
>
> 2014-06-05 10:56 GMT+02:00 Luigi Ballabio < [hidden email]
> > :
>
>
> It depends on what you want to do with CDS spreads. They can't be
> just
> added to the interest rates (financially, I mean). There's some
> conversion to z-spreads involved which depend on your pricing models.
>
> Luigi
>
>
>
>
> On Wed, Jun 4, 2014 at 10:03 PM, Paolo Baroni < [hidden email]
> > wrote:
> > Luigi, can I use the same function to manage CDS spread? Or there
> > is a
> > different way?
> >
> > Thanks
> >
> > Paolo
> >
> >
> > 2014-06-04 12:01 GMT+02:00 Luigi Ballabio <
> > [hidden email] >:
> >
> >> Yes, use PiecewiseZeroSpreadedTermStructure instead.
> >>
> >> Luigi
> >>
> >>
> >> On Wed, Jun 4, 2014 at 11:39 AM, Paolo Baroni <
> >> [hidden email] >
> >> wrote:
> >> > Hi! Is there a way in the function 'ZeroSpreadedTermStructure'
> >> > to pass
> >> > it a
> >> > z-spread as a vector (set of values for different maturities)?
> >> >
> >> > Thanks
> >> >
> >> > Paolo
> >> >
> >> >
> >> > ------------------------------------------------------------------------------
> >> > Learn Graph Databases - Download FREE O'Reilly Book
> >> > "Graph Databases" is the definitive new guide to graph databases
> >> > and
> >> > their
> >> > applications. Written by three acclaimed leaders in the field,
> >> > this first edition is now available. Download your free book
> >> > today!
> >> > http://p.sf.net/sfu/NeoTech
> >> > _______________________________________________
> >> > QuantLib-users mailing list
> >> > [hidden email]
> >> > https://lists.sourceforge.net/lists/listinfo/quantlib-users
> >> >
> >>
> >>
> >>
> >> --
> >> < https://implementingquantlib.blogspot.com >
> >> < https://twitter.com/lballabio >
> >
> >
>
>
>
> --
> < https://implementingquantlib.blogspot.com >
> < https://twitter.com/lballabio >
>
>
> ------------------------------------------------------------------------------
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and
> their
> applications. Written by three acclaimed leaders in the field,
> this first edition is now available. Download your free book today!
> http://p.sf.net/sfu/NeoTech
> _______________________________________________
> QuantLib-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>



------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: z-spread

japari
Hi Paolo,
I did renamed the function, the reason is that now you can select the interpolation in the hazard rates of the bootstrapped curve. You need the extra code on top of 1.2.0, otherwise the excel sheet would not find the functions (that one and others).

The safest way to go is to use a separate set up in your computer and recompile everything (lib and addin), downloading the merged changes in:
https://github.com/japari/quantlib/archive/Credit_inQLXL.zip
So you can discard it when your done if you dont want to integrate it in your code. Only keep in mind I have only updated project files for Linux (for QL) and for VC9 so if your using another version of visual studio you need to update the project files yourself (sometimes if you open the VC9 with newer versions it upgrades itself fine).

Tell me if it doesnt work.
Best
Pepe



----- Original Message -----

>
> Hi Pepe I'm on quantlibxl 1.2.0 and I can't find the function
> qlPiecewiseHazardRateCurve that you use in sheet 'credit market'
> cell M9. Is it possible?
> I can find qlPiecewiseFlatHazardRateCurve but I'm not sure how to use
> it (and if I can use it instead of the first one I mentioned).
>
>
> Thanks, ciao
>
>
> Paolo
>
>
>
> 2014-06-05 14:36 GMT+02:00 Paolo Baroni < [hidden email] > :
>
>
>
> Thanks a lot Pepe.
> I'll try and I'll give you a feedback.
>
>
> Ciao
>
>
> Paolo
>
>
>
> 2014-06-05 14:34 GMT+02:00 < [hidden email] > :
>
>
>
>
> Hi again, apologies for the previous pm Paolo, I keep using the wrong
> shortcut.
>
> For the second way, you can use
> <ql/experimental/credit/riskybond.hpp>
>
> You can look for the sample sheet:
> QuantLibXL/Workbooks/Credit/RiskyBonds.xls
> which is a toy worksheet on exactly this problem with a real (more or
> less) market data case.
> thats in
> https://github.com/japari/quantlib/compare/Credit_inQLXL
> which modifies a bit the previous and other code.
> Write again if something does not work there.
> Best
> Pepe
>
>
>
>
> ----- Original Message -----
> >
> >
> > Well, in this case I'd like to price a fixed rate bond in two ways
> > as
> > follows:
> >
> >
> > First way, compute the discount curve from quoted bond (same
> > issuer)
> > Second way, compute the discount curve from the benchmark curve and
> > CDS spread
> >
> >
> > What do you think?
> >
> >
> > Thanks
> >
> >
> > Paolo
> >
> >
> >
> >
> >
> >
> >
> > 2014-06-05 10:56 GMT+02:00 Luigi Ballabio <
> > [hidden email]
> > > :
> >
> >
> > It depends on what you want to do with CDS spreads. They can't be
> > just
> > added to the interest rates (financially, I mean). There's some
> > conversion to z-spreads involved which depend on your pricing
> > models.
> >
> > Luigi
> >
> >
> >
> >
> > On Wed, Jun 4, 2014 at 10:03 PM, Paolo Baroni <
> > [hidden email]
> > > wrote:
> > > Luigi, can I use the same function to manage CDS spread? Or there
> > > is a
> > > different way?
> > >
> > > Thanks
> > >
> > > Paolo
> > >
> > >
> > > 2014-06-04 12:01 GMT+02:00 Luigi Ballabio <
> > > [hidden email] >:
> > >
> > >> Yes, use PiecewiseZeroSpreadedTermStructure instead.
> > >>
> > >> Luigi
> > >>
> > >>
> > >> On Wed, Jun 4, 2014 at 11:39 AM, Paolo Baroni <
> > >> [hidden email] >
> > >> wrote:
> > >> > Hi! Is there a way in the function 'ZeroSpreadedTermStructure'
> > >> > to pass
> > >> > it a
> > >> > z-spread as a vector (set of values for different maturities)?
> > >> >
> > >> > Thanks
> > >> >
> > >> > Paolo
> > >> >
> > >> >
> > >> > ------------------------------------------------------------------------------
> > >> > Learn Graph Databases - Download FREE O'Reilly Book
> > >> > "Graph Databases" is the definitive new guide to graph
> > >> > databases
> > >> > and
> > >> > their
> > >> > applications. Written by three acclaimed leaders in the field,
> > >> > this first edition is now available. Download your free book
> > >> > today!
> > >> > http://p.sf.net/sfu/NeoTech
> > >> > _______________________________________________
> > >> > QuantLib-users mailing list
> > >> > [hidden email]
> > >> > https://lists.sourceforge.net/lists/listinfo/quantlib-users
> > >> >
> > >>
> > >>
> > >>
> > >> --
> > >> < https://implementingquantlib.blogspot.com >
> > >> < https://twitter.com/lballabio >
> > >
> > >
> >
> >
> >
> > --
> > < https://implementingquantlib.blogspot.com >
> > < https://twitter.com/lballabio >
> >
> >
> > ------------------------------------------------------------------------------
> > Learn Graph Databases - Download FREE O'Reilly Book
> > "Graph Databases" is the definitive new guide to graph databases
> > and
> > their
> > applications. Written by three acclaimed leaders in the field,
> > this first edition is now available. Download your free book today!
> > http://p.sf.net/sfu/NeoTech
> > _______________________________________________
> > QuantLib-users mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/quantlib-users
> >
>
>
>

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: z-spread

paolo baroni
Thanks Pepe, I try!
Ciao
P


2014-06-06 16:44 GMT+02:00 <[hidden email]>:
Hi Paolo,
I did renamed the function, the reason is that now you can select the interpolation in the hazard rates of the bootstrapped curve. You need the extra code on top of 1.2.0, otherwise the excel sheet would not find the functions (that one and others).

The safest way to go is to use a separate set up in your computer and recompile everything (lib and addin), downloading the merged changes in:
https://github.com/japari/quantlib/archive/Credit_inQLXL.zip
So you can discard it when your done if you dont want to integrate it in your code. Only keep in mind I have only updated project files for Linux (for QL) and for VC9 so if your using another version of visual studio you need to update the project files yourself (sometimes if you open the VC9 with newer versions it upgrades itself fine).

Tell me if it doesnt work.
Best
Pepe



----- Original Message -----
>
> Hi Pepe I'm on quantlibxl 1.2.0 and I can't find the function
> qlPiecewiseHazardRateCurve that you use in sheet 'credit market'
> cell M9. Is it possible?
> I can find qlPiecewiseFlatHazardRateCurve but I'm not sure how to use
> it (and if I can use it instead of the first one I mentioned).
>
>
> Thanks, ciao
>
>
> Paolo
>
>
>
> 2014-06-05 14:36 GMT+02:00 Paolo Baroni < [hidden email] > :
>
>
>
> Thanks a lot Pepe.
> I'll try and I'll give you a feedback.
>
>
> Ciao
>
>
> Paolo
>
>
>
> 2014-06-05 14:34 GMT+02:00 < [hidden email] > :
>
>
>
>
> Hi again, apologies for the previous pm Paolo, I keep using the wrong
> shortcut.
>
> For the second way, you can use
> <ql/experimental/credit/riskybond.hpp>
>
> You can look for the sample sheet:
> QuantLibXL/Workbooks/Credit/RiskyBonds.xls
> which is a toy worksheet on exactly this problem with a real (more or
> less) market data case.
> thats in
> https://github.com/japari/quantlib/compare/Credit_inQLXL
> which modifies a bit the previous and other code.
> Write again if something does not work there.
> Best
> Pepe
>
>
>
>
> ----- Original Message -----
> >
> >
> > Well, in this case I'd like to price a fixed rate bond in two ways
> > as
> > follows:
> >
> >
> > First way, compute the discount curve from quoted bond (same
> > issuer)
> > Second way, compute the discount curve from the benchmark curve and
> > CDS spread
> >
> >
> > What do you think?
> >
> >
> > Thanks
> >
> >
> > Paolo
> >
> >
> >
> >
> >
> >
> >
> > 2014-06-05 10:56 GMT+02:00 Luigi Ballabio <
> > [hidden email]
> > > :
> >
> >
> > It depends on what you want to do with CDS spreads. They can't be
> > just
> > added to the interest rates (financially, I mean). There's some
> > conversion to z-spreads involved which depend on your pricing
> > models.
> >
> > Luigi
> >
> >
> >
> >
> > On Wed, Jun 4, 2014 at 10:03 PM, Paolo Baroni <
> > [hidden email]
> > > wrote:
> > > Luigi, can I use the same function to manage CDS spread? Or there
> > > is a
> > > different way?
> > >
> > > Thanks
> > >
> > > Paolo
> > >
> > >
> > > 2014-06-04 12:01 GMT+02:00 Luigi Ballabio <
> > > [hidden email] >:
> > >
> > >> Yes, use PiecewiseZeroSpreadedTermStructure instead.
> > >>
> > >> Luigi
> > >>
> > >>
> > >> On Wed, Jun 4, 2014 at 11:39 AM, Paolo Baroni <
> > >> [hidden email] >
> > >> wrote:
> > >> > Hi! Is there a way in the function 'ZeroSpreadedTermStructure'
> > >> > to pass
> > >> > it a
> > >> > z-spread as a vector (set of values for different maturities)?
> > >> >
> > >> > Thanks
> > >> >
> > >> > Paolo
> > >> >
> > >> >
> > >> > ------------------------------------------------------------------------------
> > >> > Learn Graph Databases - Download FREE O'Reilly Book
> > >> > "Graph Databases" is the definitive new guide to graph
> > >> > databases
> > >> > and
> > >> > their
> > >> > applications. Written by three acclaimed leaders in the field,
> > >> > this first edition is now available. Download your free book
> > >> > today!
> > >> > http://p.sf.net/sfu/NeoTech
> > >> > _______________________________________________
> > >> > QuantLib-users mailing list
> > >> > [hidden email]
> > >> > https://lists.sourceforge.net/lists/listinfo/quantlib-users
> > >> >
> > >>
> > >>
> > >>
> > >> --
> > >> < https://implementingquantlib.blogspot.com >
> > >> < https://twitter.com/lballabio >
> > >
> > >
> >
> >
> >
> > --
> > < https://implementingquantlib.blogspot.com >
> > < https://twitter.com/lballabio >
> >
> >
> > ------------------------------------------------------------------------------
> > Learn Graph Databases - Download FREE O'Reilly Book
> > "Graph Databases" is the definitive new guide to graph databases
> > and
> > their
> > applications. Written by three acclaimed leaders in the field,
> > this first edition is now available. Download your free book today!
> > http://p.sf.net/sfu/NeoTech
> > _______________________________________________
> > QuantLib-users mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/quantlib-users
> >
>
>
>


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: z-spread

paolo baroni
Hi Pepe, I'm trying to recompile your set up, in the meanwhile can you suggest me some reference (paper or book) that explains what you do in the spreadsheet?

Thanks

Paolo


2014-06-06 17:38 GMT+02:00 Paolo Baroni <[hidden email]>:
Thanks Pepe, I try!
Ciao
P


2014-06-06 16:44 GMT+02:00 <[hidden email]>:

Hi Paolo,
I did renamed the function, the reason is that now you can select the interpolation in the hazard rates of the bootstrapped curve. You need the extra code on top of 1.2.0, otherwise the excel sheet would not find the functions (that one and others).

The safest way to go is to use a separate set up in your computer and recompile everything (lib and addin), downloading the merged changes in:
https://github.com/japari/quantlib/archive/Credit_inQLXL.zip
So you can discard it when your done if you dont want to integrate it in your code. Only keep in mind I have only updated project files for Linux (for QL) and for VC9 so if your using another version of visual studio you need to update the project files yourself (sometimes if you open the VC9 with newer versions it upgrades itself fine).

Tell me if it doesnt work.
Best
Pepe



----- Original Message -----
>
> Hi Pepe I'm on quantlibxl 1.2.0 and I can't find the function
> qlPiecewiseHazardRateCurve that you use in sheet 'credit market'
> cell M9. Is it possible?
> I can find qlPiecewiseFlatHazardRateCurve but I'm not sure how to use
> it (and if I can use it instead of the first one I mentioned).
>
>
> Thanks, ciao
>
>
> Paolo
>
>
>
> 2014-06-05 14:36 GMT+02:00 Paolo Baroni < [hidden email] > :
>
>
>
> Thanks a lot Pepe.
> I'll try and I'll give you a feedback.
>
>
> Ciao
>
>
> Paolo
>
>
>
> 2014-06-05 14:34 GMT+02:00 < [hidden email] > :
>
>
>
>
> Hi again, apologies for the previous pm Paolo, I keep using the wrong
> shortcut.
>
> For the second way, you can use
> <ql/experimental/credit/riskybond.hpp>
>
> You can look for the sample sheet:
> QuantLibXL/Workbooks/Credit/RiskyBonds.xls
> which is a toy worksheet on exactly this problem with a real (more or
> less) market data case.
> thats in
> https://github.com/japari/quantlib/compare/Credit_inQLXL
> which modifies a bit the previous and other code.
> Write again if something does not work there.
> Best
> Pepe
>
>
>
>
> ----- Original Message -----
> >
> >
> > Well, in this case I'd like to price a fixed rate bond in two ways
> > as
> > follows:
> >
> >
> > First way, compute the discount curve from quoted bond (same
> > issuer)
> > Second way, compute the discount curve from the benchmark curve and
> > CDS spread
> >
> >
> > What do you think?
> >
> >
> > Thanks
> >
> >
> > Paolo
> >
> >
> >
> >
> >
> >
> >
> > 2014-06-05 10:56 GMT+02:00 Luigi Ballabio <
> > [hidden email]
> > > :
> >
> >
> > It depends on what you want to do with CDS spreads. They can't be
> > just
> > added to the interest rates (financially, I mean). There's some
> > conversion to z-spreads involved which depend on your pricing
> > models.
> >
> > Luigi
> >
> >
> >
> >
> > On Wed, Jun 4, 2014 at 10:03 PM, Paolo Baroni <
> > [hidden email]
> > > wrote:
> > > Luigi, can I use the same function to manage CDS spread? Or there
> > > is a
> > > different way?
> > >
> > > Thanks
> > >
> > > Paolo
> > >
> > >
> > > 2014-06-04 12:01 GMT+02:00 Luigi Ballabio <
> > > [hidden email] >:
> > >
> > >> Yes, use PiecewiseZeroSpreadedTermStructure instead.
> > >>
> > >> Luigi
> > >>
> > >>
> > >> On Wed, Jun 4, 2014 at 11:39 AM, Paolo Baroni <
> > >> [hidden email] >
> > >> wrote:
> > >> > Hi! Is there a way in the function 'ZeroSpreadedTermStructure'
> > >> > to pass
> > >> > it a
> > >> > z-spread as a vector (set of values for different maturities)?
> > >> >
> > >> > Thanks
> > >> >
> > >> > Paolo
> > >> >
> > >> >
> > >> > ------------------------------------------------------------------------------
> > >> > Learn Graph Databases - Download FREE O'Reilly Book
> > >> > "Graph Databases" is the definitive new guide to graph
> > >> > databases
> > >> > and
> > >> > their
> > >> > applications. Written by three acclaimed leaders in the field,
> > >> > this first edition is now available. Download your free book
> > >> > today!
> > >> > http://p.sf.net/sfu/NeoTech
> > >> > _______________________________________________
> > >> > QuantLib-users mailing list
> > >> > [hidden email]
> > >> > https://lists.sourceforge.net/lists/listinfo/quantlib-users
> > >> >
> > >>
> > >>
> > >>
> > >> --
> > >> < https://implementingquantlib.blogspot.com >
> > >> < https://twitter.com/lballabio >
> > >
> > >
> >
> >
> >
> > --
> > < https://implementingquantlib.blogspot.com >
> > < https://twitter.com/lballabio >
> >
> >
> > ------------------------------------------------------------------------------
> > Learn Graph Databases - Download FREE O'Reilly Book
> > "Graph Databases" is the definitive new guide to graph databases
> > and
> > their
> > applications. Written by three acclaimed leaders in the field,
> > this first edition is now available. Download your free book today!
> > http://p.sf.net/sfu/NeoTech
> > _______________________________________________
> > QuantLib-users mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/quantlib-users
> >
>
>
>



------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: z-spread

japari
Gee, you just reminded me I promised Eric I was going to merge this with the last QLXL1.4 and I have been busy with other things.
Anyways, should merge fine but you can always use the previous QLXL; with the changes things work better (recalc mostly); thanks Eric, Nando and any other involved by the way.

The worksheet is no big deal; It compares some bonds risky and non risky pricing to their market quotes:
-MoneyMarket Wsheet its just for the date and YTS
-CreditMarket Wsheet bootstraps two CDS on the reference name of the bonds for two different seniorities. It reconstruct the default probability curves and reprice-test a 5Y CDS. The grey recovery numbers let you speculate with the possibility of matching the default curves (if you believe there can only be one event for both senioirites).
-BondPricing Wsheet is where the action lies; it has two blocks; the first one contains the market quotes of the reference bonds; only the fixed rate ones in blue are used (can be done with some of the floaters too with the code in QL) The second block reprices the bonds with each of the previous CDS curves independently of wether the curves are matching the bonds seniority. One would expect the seniority matching price to be closer to the market quote (you can check that...). It also prices the bonds ignoring the default component (pink curve). These results are shown in price and Z-spread on the two graphs(bonds are sorted by maturity); the difference between the theoretical(CDS/credit based) Z-spread and the market one is one way to measure the so called credit-basis (see the paper I mention below).

On the data set: not all bond prices are on the same 'todays' date and the CDS quotes are agregates of quotes close to that date. You can see this as some room for discrepancies in the pricing. Also I couldnt find the subordination of issues numbered 2,4,5 if anyone can find the data please add it since this is one key point in the example (see bond codes). I dont have access to data systems anymore.
Take conventions used with a pinch of salt, I tend to be 'flexible' on those.


As for ther reading any credit textbook will start with this one, see
->Chapter 4 of Modelling single name and multi-name credit derivatives. Dominic O’Kane
->Section 3.4.1 of Credit Derivatives Pricing Models. P.J. Schonbucher
->Strongly recommend you this short/great paper with some ideas to extend the worksheet if you want:
"Bond spreads as a proxy for credit default swap spreads" Mark Davies, Dimitry Pugachevsky; Bear Stearns
->Chapter 2 of Bielecki and Rutkowski should deal with that too but not so close to the models here.

Best
pp

----- Original Message -----

>
> Hi Pepe, I'm trying to recompile your set up, in the meanwhile can
> you suggest me some reference (paper or book) that explains what you
> do in the spreadsheet?
>
>
> Thanks
>
>
> Paolo
>
>
>
> 2014-06-06 17:38 GMT+02:00 Paolo Baroni < [hidden email] > :
>
>
>
> Thanks Pepe, I try!
> Ciao
> P
>
>
>
> 2014-06-06 16:44 GMT+02:00 < [hidden email] > :
>
>
>
>
> Hi Paolo,
> I did renamed the function, the reason is that now you can select the
> interpolation in the hazard rates of the bootstrapped curve. You
> need the extra code on top of 1.2.0, otherwise the excel sheet would
> not find the functions (that one and others).
>
> The safest way to go is to use a separate set up in your computer and
> recompile everything (lib and addin), downloading the merged changes
> in:
> https://github.com/japari/quantlib/archive/Credit_inQLXL.zip
> So you can discard it when your done if you dont want to integrate it
> in your code. Only keep in mind I have only updated project files
> for Linux (for QL) and for VC9 so if your using another version of
> visual studio you need to update the project files yourself
> (sometimes if you open the VC9 with newer versions it upgrades
> itself fine).
>
> Tell me if it doesnt work.
>
>
> Best
> Pepe
>
>
>
> ----- Original Message -----
> >
> > Hi Pepe I'm on quantlibxl 1.2.0 and I can't find the function
> > qlPiecewiseHazardRateCurve that you use in sheet 'credit market'
> > cell M9. Is it possible?
> > I can find qlPiecewiseFlatHazardRateCurve but I'm not sure how to
> > use
> > it (and if I can use it instead of the first one I mentioned).
> >
> >
> > Thanks, ciao
> >
> >
> > Paolo
> >
> >
> >
> > 2014-06-05 14:36 GMT+02:00 Paolo Baroni < [hidden email] > :
> >
> >
> >
> > Thanks a lot Pepe.
> > I'll try and I'll give you a feedback.
> >
> >
> > Ciao
> >
> >
> > Paolo
> >
> >
> >
> > 2014-06-05 14:34 GMT+02:00 < [hidden email] > :
> >
> >
> >
> >
> > Hi again, apologies for the previous pm Paolo, I keep using the
> > wrong
> > shortcut.
> >
> > For the second way, you can use
> > <ql/experimental/credit/riskybond.hpp>
> >
> > You can look for the sample sheet:
> > QuantLibXL/Workbooks/Credit/RiskyBonds.xls
> > which is a toy worksheet on exactly this problem with a real (more
> > or
> > less) market data case.
> > thats in
> > https://github.com/japari/quantlib/compare/Credit_inQLXL
> > which modifies a bit the previous and other code.
> > Write again if something does not work there.
> > Best
> > Pepe
> >
> >
> >
> >
> > ----- Original Message -----
> > >
> > >
> > > Well, in this case I'd like to price a fixed rate bond in two
> > > ways
> > > as
> > > follows:
> > >
> > >
> > > First way, compute the discount curve from quoted bond (same
> > > issuer)
> > > Second way, compute the discount curve from the benchmark curve
> > > and
> > > CDS spread
> > >
> > >
> > > What do you think?
> > >
> > >
> > > Thanks
> > >
> > >
> > > Paolo
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > 2014-06-05 10:56 GMT+02:00 Luigi Ballabio <
> > > [hidden email]
> > > > :
> > >
> > >
> > > It depends on what you want to do with CDS spreads. They can't be
> > > just
> > > added to the interest rates (financially, I mean). There's some
> > > conversion to z-spreads involved which depend on your pricing
> > > models.
> > >
> > > Luigi
> > >
> > >
> > >
> > >
> > > On Wed, Jun 4, 2014 at 10:03 PM, Paolo Baroni <
> > > [hidden email]
> > > > wrote:
> > > > Luigi, can I use the same function to manage CDS spread? Or
> > > > there
> > > > is a
> > > > different way?
> > > >
> > > > Thanks
> > > >
> > > > Paolo
> > > >
> > > >
> > > > 2014-06-04 12:01 GMT+02:00 Luigi Ballabio <
> > > > [hidden email] >:
> > > >
> > > >> Yes, use PiecewiseZeroSpreadedTermStructure instead.
> > > >>
> > > >> Luigi
> > > >>
> > > >>
> > > >> On Wed, Jun 4, 2014 at 11:39 AM, Paolo Baroni <
> > > >> [hidden email] >
> > > >> wrote:
> > > >> > Hi! Is there a way in the function
> > > >> > 'ZeroSpreadedTermStructure'
> > > >> > to pass
> > > >> > it a
> > > >> > z-spread as a vector (set of values for different
> > > >> > maturities)?
> > > >> >
> > > >> > Thanks
> > > >> >
> > > >> > Paolo
> > > >> >
> > > >> >
> > > >> > ------------------------------------------------------------------------------
> > > >> > Learn Graph Databases - Download FREE O'Reilly Book
> > > >> > "Graph Databases" is the definitive new guide to graph
> > > >> > databases
> > > >> > and
> > > >> > their
> > > >> > applications. Written by three acclaimed leaders in the
> > > >> > field,
> > > >> > this first edition is now available. Download your free book
> > > >> > today!
> > > >> > http://p.sf.net/sfu/NeoTech
> > > >> > _______________________________________________
> > > >> > QuantLib-users mailing list
> > > >> > [hidden email]
> > > >> > https://lists.sourceforge.net/lists/listinfo/quantlib-users
> > > >> >
> > > >>
> > > >>
> > > >>
> > > >> --
> > > >> < https://implementingquantlib.blogspot.com >
> > > >> < https://twitter.com/lballabio >
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > > < https://implementingquantlib.blogspot.com >
> > > < https://twitter.com/lballabio >
> > >
> > >
> > > ------------------------------------------------------------------------------
> > > Learn Graph Databases - Download FREE O'Reilly Book
> > > "Graph Databases" is the definitive new guide to graph databases
> > > and
> > > their
> > > applications. Written by three acclaimed leaders in the field,
> > > this first edition is now available. Download your free book
> > > today!
> > > http://p.sf.net/sfu/NeoTech
> > > _______________________________________________
> > > QuantLib-users mailing list
> > > [hidden email]
> > > https://lists.sourceforge.net/lists/listinfo/quantlib-users
> > >
> >
> >
> >
>
>
>

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: z-spread

Kirill Shemyakin
Hi to all!

Sorry, probably, my question is off the topic of your discussion...
If I have a corporate eurobond (a corporate bond nominated in the foreign currency), then must I use a foreign currency g-curve (a foreign currency zero-coupon curve) or a domestic one for z-spread calculation?

Best regards,
Kirill



On 18 July 2014 12:52, <[hidden email]> wrote:
Gee, you just reminded me I promised Eric I was going to merge this with the last QLXL1.4 and I have been busy with other things.
Anyways, should merge fine but you can always use the previous QLXL; with the changes things work better (recalc mostly); thanks Eric, Nando and any other involved by the way.

The worksheet is no big deal; It compares some bonds risky and non risky pricing to their market quotes:
-MoneyMarket Wsheet its just for the date and YTS
-CreditMarket Wsheet bootstraps two CDS on the reference name of the bonds for two different seniorities. It reconstruct the default probability curves and reprice-test a 5Y CDS. The grey recovery numbers let you speculate with the possibility of matching the default curves (if you believe there can only be one event for both senioirites).
-BondPricing Wsheet is where the action lies; it has two blocks; the first one contains the market quotes of the reference bonds; only the fixed rate ones in blue are used (can be done with some of the floaters too with the code in QL) The second block reprices the bonds with each of the previous CDS curves independently of wether the curves are matching the bonds seniority. One would expect the seniority matching price to be closer to the market quote (you can check that...). It also prices the bonds ignoring the default component (pink curve). These results are shown in price and Z-spread on the two graphs(bonds are sorted by maturity); the difference between the theoretical(CDS/credit based) Z-spread and the market one is one way to measure the so called credit-basis (see the paper I mention below).

On the data set: not all bond prices are on the same 'todays' date and the CDS quotes are agregates of quotes close to that date. You can see this as some room for discrepancies in the pricing. Also I couldnt find the subordination of issues numbered 2,4,5 if anyone can find the data please add it since this is one key point in the example (see bond codes). I dont have access to data systems anymore.
Take conventions used with a pinch of salt, I tend to be 'flexible' on those.


As for ther reading any credit textbook will start with this one, see
->Chapter 4 of Modelling single name and multi-name credit derivatives. Dominic O’Kane
->Section 3.4.1 of Credit Derivatives Pricing Models. P.J. Schonbucher
->Strongly recommend you this short/great paper with some ideas to extend the worksheet if you want:
"Bond spreads as a proxy for credit default swap spreads" Mark Davies, Dimitry Pugachevsky; Bear Stearns
->Chapter 2 of Bielecki and Rutkowski should deal with that too but not so close to the models here.

Best
pp

----- Original Message -----
>
> Hi Pepe, I'm trying to recompile your set up, in the meanwhile can
> you suggest me some reference (paper or book) that explains what you
> do in the spreadsheet?
>
>
> Thanks
>
>
> Paolo
>
>
>
> 2014-06-06 17:38 GMT+02:00 Paolo Baroni < [hidden email] > :
>
>
>
> Thanks Pepe, I try!
> Ciao
> P
>
>
>
> 2014-06-06 16:44 GMT+02:00 < [hidden email] > :
>
>
>
>
> Hi Paolo,
> I did renamed the function, the reason is that now you can select the
> interpolation in the hazard rates of the bootstrapped curve. You
> need the extra code on top of 1.2.0, otherwise the excel sheet would
> not find the functions (that one and others).
>
> The safest way to go is to use a separate set up in your computer and
> recompile everything (lib and addin), downloading the merged changes
> in:
> https://github.com/japari/quantlib/archive/Credit_inQLXL.zip
> So you can discard it when your done if you dont want to integrate it
> in your code. Only keep in mind I have only updated project files
> for Linux (for QL) and for VC9 so if your using another version of
> visual studio you need to update the project files yourself
> (sometimes if you open the VC9 with newer versions it upgrades
> itself fine).
>
> Tell me if it doesnt work.
>
>
> Best
> Pepe
>
>
>
> ----- Original Message -----
> >
> > Hi Pepe I'm on quantlibxl 1.2.0 and I can't find the function
> > qlPiecewiseHazardRateCurve that you use in sheet 'credit market'
> > cell M9. Is it possible?
> > I can find qlPiecewiseFlatHazardRateCurve but I'm not sure how to
> > use
> > it (and if I can use it instead of the first one I mentioned).
> >
> >
> > Thanks, ciao
> >
> >
> > Paolo
> >
> >
> >
> > 2014-06-05 14:36 GMT+02:00 Paolo Baroni < [hidden email] > :
> >
> >
> >
> > Thanks a lot Pepe.
> > I'll try and I'll give you a feedback.
> >
> >
> > Ciao
> >
> >
> > Paolo
> >
> >
> >
> > 2014-06-05 14:34 GMT+02:00 < [hidden email] > :
> >
> >
> >
> >
> > Hi again, apologies for the previous pm Paolo, I keep using the
> > wrong
> > shortcut.
> >
> > For the second way, you can use
> > <ql/experimental/credit/riskybond.hpp>
> >
> > You can look for the sample sheet:
> > QuantLibXL/Workbooks/Credit/RiskyBonds.xls
> > which is a toy worksheet on exactly this problem with a real (more
> > or
> > less) market data case.
> > thats in
> > https://github.com/japari/quantlib/compare/Credit_inQLXL
> > which modifies a bit the previous and other code.
> > Write again if something does not work there.
> > Best
> > Pepe
> >
> >
> >
> >
> > ----- Original Message -----
> > >
> > >
> > > Well, in this case I'd like to price a fixed rate bond in two
> > > ways
> > > as
> > > follows:
> > >
> > >
> > > First way, compute the discount curve from quoted bond (same
> > > issuer)
> > > Second way, compute the discount curve from the benchmark curve
> > > and
> > > CDS spread
> > >
> > >
> > > What do you think?
> > >
> > >
> > > Thanks
> > >
> > >
> > > Paolo
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > 2014-06-05 10:56 GMT+02:00 Luigi Ballabio <
> > > [hidden email]
> > > > :
> > >
> > >
> > > It depends on what you want to do with CDS spreads. They can't be
> > > just
> > > added to the interest rates (financially, I mean). There's some
> > > conversion to z-spreads involved which depend on your pricing
> > > models.
> > >
> > > Luigi
> > >
> > >
> > >
> > >
> > > On Wed, Jun 4, 2014 at 10:03 PM, Paolo Baroni <
> > > [hidden email]
> > > > wrote:
> > > > Luigi, can I use the same function to manage CDS spread? Or
> > > > there
> > > > is a
> > > > different way?
> > > >
> > > > Thanks
> > > >
> > > > Paolo
> > > >
> > > >
> > > > 2014-06-04 12:01 GMT+02:00 Luigi Ballabio <
> > > > [hidden email] >:
> > > >
> > > >> Yes, use PiecewiseZeroSpreadedTermStructure instead.
> > > >>
> > > >> Luigi
> > > >>
> > > >>
> > > >> On Wed, Jun 4, 2014 at 11:39 AM, Paolo Baroni <
> > > >> [hidden email] >
> > > >> wrote:
> > > >> > Hi! Is there a way in the function
> > > >> > 'ZeroSpreadedTermStructure'
> > > >> > to pass
> > > >> > it a
> > > >> > z-spread as a vector (set of values for different
> > > >> > maturities)?
> > > >> >
> > > >> > Thanks
> > > >> >
> > > >> > Paolo
> > > >> >
> > > >> >
> > > >> > ------------------------------------------------------------------------------
> > > >> > Learn Graph Databases - Download FREE O'Reilly Book
> > > >> > "Graph Databases" is the definitive new guide to graph
> > > >> > databases
> > > >> > and
> > > >> > their
> > > >> > applications. Written by three acclaimed leaders in the
> > > >> > field,
> > > >> > this first edition is now available. Download your free book
> > > >> > today!
> > > >> > http://p.sf.net/sfu/NeoTech
> > > >> > _______________________________________________
> > > >> > QuantLib-users mailing list
> > > >> > [hidden email]
> > > >> > https://lists.sourceforge.net/lists/listinfo/quantlib-users
> > > >> >
> > > >>
> > > >>
> > > >>
> > > >> --
> > > >> < https://implementingquantlib.blogspot.com >
> > > >> < https://twitter.com/lballabio >
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > > < https://implementingquantlib.blogspot.com >
> > > < https://twitter.com/lballabio >
> > >
> > >
> > > ------------------------------------------------------------------------------
> > > Learn Graph Databases - Download FREE O'Reilly Book
> > > "Graph Databases" is the definitive new guide to graph databases
> > > and
> > > their
> > > applications. Written by three acclaimed leaders in the field,
> > > this first edition is now available. Download your free book
> > > today!
> > > http://p.sf.net/sfu/NeoTech
> > > _______________________________________________
> > > QuantLib-users mailing list
> > > [hidden email]
> > > https://lists.sourceforge.net/lists/listinfo/quantlib-users
> > >
> >
> >
> >
>
>
>

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users


------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: z-spread

paolo baroni
In reply to this post by japari
Thanks a lot Pepe!
P


2014-07-18 10:52 GMT+02:00 <[hidden email]>:
Gee, you just reminded me I promised Eric I was going to merge this with the last QLXL1.4 and I have been busy with other things.
Anyways, should merge fine but you can always use the previous QLXL; with the changes things work better (recalc mostly); thanks Eric, Nando and any other involved by the way.

The worksheet is no big deal; It compares some bonds risky and non risky pricing to their market quotes:
-MoneyMarket Wsheet its just for the date and YTS
-CreditMarket Wsheet bootstraps two CDS on the reference name of the bonds for two different seniorities. It reconstruct the default probability curves and reprice-test a 5Y CDS. The grey recovery numbers let you speculate with the possibility of matching the default curves (if you believe there can only be one event for both senioirites).
-BondPricing Wsheet is where the action lies; it has two blocks; the first one contains the market quotes of the reference bonds; only the fixed rate ones in blue are used (can be done with some of the floaters too with the code in QL) The second block reprices the bonds with each of the previous CDS curves independently of wether the curves are matching the bonds seniority. One would expect the seniority matching price to be closer to the market quote (you can check that...). It also prices the bonds ignoring the default component (pink curve). These results are shown in price and Z-spread on the two graphs(bonds are sorted by maturity); the difference between the theoretical(CDS/credit based) Z-spread and the market one is one way to measure the so called credit-basis (see the paper I mention below).

On the data set: not all bond prices are on the same 'todays' date and the CDS quotes are agregates of quotes close to that date. You can see this as some room for discrepancies in the pricing. Also I couldnt find the subordination of issues numbered 2,4,5 if anyone can find the data please add it since this is one key point in the example (see bond codes). I dont have access to data systems anymore.
Take conventions used with a pinch of salt, I tend to be 'flexible' on those.


As for ther reading any credit textbook will start with this one, see
->Chapter 4 of Modelling single name and multi-name credit derivatives. Dominic O’Kane
->Section 3.4.1 of Credit Derivatives Pricing Models. P.J. Schonbucher
->Strongly recommend you this short/great paper with some ideas to extend the worksheet if you want:
"Bond spreads as a proxy for credit default swap spreads" Mark Davies, Dimitry Pugachevsky; Bear Stearns
->Chapter 2 of Bielecki and Rutkowski should deal with that too but not so close to the models here.

Best
pp

----- Original Message -----
>
> Hi Pepe, I'm trying to recompile your set up, in the meanwhile can
> you suggest me some reference (paper or book) that explains what you
> do in the spreadsheet?
>
>
> Thanks
>
>
> Paolo
>
>
>
> 2014-06-06 17:38 GMT+02:00 Paolo Baroni < [hidden email] > :
>
>
>
> Thanks Pepe, I try!
> Ciao
> P
>
>
>
> 2014-06-06 16:44 GMT+02:00 < [hidden email] > :
>
>
>
>
> Hi Paolo,
> I did renamed the function, the reason is that now you can select the
> interpolation in the hazard rates of the bootstrapped curve. You
> need the extra code on top of 1.2.0, otherwise the excel sheet would
> not find the functions (that one and others).
>
> The safest way to go is to use a separate set up in your computer and
> recompile everything (lib and addin), downloading the merged changes
> in:
> https://github.com/japari/quantlib/archive/Credit_inQLXL.zip
> So you can discard it when your done if you dont want to integrate it
> in your code. Only keep in mind I have only updated project files
> for Linux (for QL) and for VC9 so if your using another version of
> visual studio you need to update the project files yourself
> (sometimes if you open the VC9 with newer versions it upgrades
> itself fine).
>
> Tell me if it doesnt work.
>
>
> Best
> Pepe
>
>
>
> ----- Original Message -----
> >
> > Hi Pepe I'm on quantlibxl 1.2.0 and I can't find the function
> > qlPiecewiseHazardRateCurve that you use in sheet 'credit market'
> > cell M9. Is it possible?
> > I can find qlPiecewiseFlatHazardRateCurve but I'm not sure how to
> > use
> > it (and if I can use it instead of the first one I mentioned).
> >
> >
> > Thanks, ciao
> >
> >
> > Paolo
> >
> >
> >
> > 2014-06-05 14:36 GMT+02:00 Paolo Baroni < [hidden email] > :
> >
> >
> >
> > Thanks a lot Pepe.
> > I'll try and I'll give you a feedback.
> >
> >
> > Ciao
> >
> >
> > Paolo
> >
> >
> >
> > 2014-06-05 14:34 GMT+02:00 < [hidden email] > :
> >
> >
> >
> >
> > Hi again, apologies for the previous pm Paolo, I keep using the
> > wrong
> > shortcut.
> >
> > For the second way, you can use
> > <ql/experimental/credit/riskybond.hpp>
> >
> > You can look for the sample sheet:
> > QuantLibXL/Workbooks/Credit/RiskyBonds.xls
> > which is a toy worksheet on exactly this problem with a real (more
> > or
> > less) market data case.
> > thats in
> > https://github.com/japari/quantlib/compare/Credit_inQLXL
> > which modifies a bit the previous and other code.
> > Write again if something does not work there.
> > Best
> > Pepe
> >
> >
> >
> >
> > ----- Original Message -----
> > >
> > >
> > > Well, in this case I'd like to price a fixed rate bond in two
> > > ways
> > > as
> > > follows:
> > >
> > >
> > > First way, compute the discount curve from quoted bond (same
> > > issuer)
> > > Second way, compute the discount curve from the benchmark curve
> > > and
> > > CDS spread
> > >
> > >
> > > What do you think?
> > >
> > >
> > > Thanks
> > >
> > >
> > > Paolo
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > 2014-06-05 10:56 GMT+02:00 Luigi Ballabio <
> > > [hidden email]
> > > > :
> > >
> > >
> > > It depends on what you want to do with CDS spreads. They can't be
> > > just
> > > added to the interest rates (financially, I mean). There's some
> > > conversion to z-spreads involved which depend on your pricing
> > > models.
> > >
> > > Luigi
> > >
> > >
> > >
> > >
> > > On Wed, Jun 4, 2014 at 10:03 PM, Paolo Baroni <
> > > [hidden email]
> > > > wrote:
> > > > Luigi, can I use the same function to manage CDS spread? Or
> > > > there
> > > > is a
> > > > different way?
> > > >
> > > > Thanks
> > > >
> > > > Paolo
> > > >
> > > >
> > > > 2014-06-04 12:01 GMT+02:00 Luigi Ballabio <
> > > > [hidden email] >:
> > > >
> > > >> Yes, use PiecewiseZeroSpreadedTermStructure instead.
> > > >>
> > > >> Luigi
> > > >>
> > > >>
> > > >> On Wed, Jun 4, 2014 at 11:39 AM, Paolo Baroni <
> > > >> [hidden email] >
> > > >> wrote:
> > > >> > Hi! Is there a way in the function
> > > >> > 'ZeroSpreadedTermStructure'
> > > >> > to pass
> > > >> > it a
> > > >> > z-spread as a vector (set of values for different
> > > >> > maturities)?
> > > >> >
> > > >> > Thanks
> > > >> >
> > > >> > Paolo
> > > >> >
> > > >> >
> > > >> > ------------------------------------------------------------------------------
> > > >> > Learn Graph Databases - Download FREE O'Reilly Book
> > > >> > "Graph Databases" is the definitive new guide to graph
> > > >> > databases
> > > >> > and
> > > >> > their
> > > >> > applications. Written by three acclaimed leaders in the
> > > >> > field,
> > > >> > this first edition is now available. Download your free book
> > > >> > today!
> > > >> > http://p.sf.net/sfu/NeoTech
> > > >> > _______________________________________________
> > > >> > QuantLib-users mailing list
> > > >> > [hidden email]
> > > >> > https://lists.sourceforge.net/lists/listinfo/quantlib-users
> > > >> >
> > > >>
> > > >>
> > > >>
> > > >> --
> > > >> < https://implementingquantlib.blogspot.com >
> > > >> < https://twitter.com/lballabio >
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > > < https://implementingquantlib.blogspot.com >
> > > < https://twitter.com/lballabio >
> > >
> > >
> > > ------------------------------------------------------------------------------
> > > Learn Graph Databases - Download FREE O'Reilly Book
> > > "Graph Databases" is the definitive new guide to graph databases
> > > and
> > > their
> > > applications. Written by three acclaimed leaders in the field,
> > > this first edition is now available. Download your free book
> > > today!
> > > http://p.sf.net/sfu/NeoTech
> > > _______________________________________________
> > > QuantLib-users mailing list
> > > [hidden email]
> > > https://lists.sourceforge.net/lists/listinfo/quantlib-users
> > >
> >
> >
> >
>
>
>


------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: z-spread

japari
In reply to this post by Kirill Shemyakin
Hello,

First to mention a reference for Paolo I didnt list before because my DRM key went boink and couldn't access my copy of:
Chapter 3 "A plethora of credit spreads" in 'Discounting LIBOR, CVA and Funding' by the well known to this email list C. Kenyon and R. Stamm

More knowledgeable people here correct me if I am missing an opportunity to shut up but I would compute the Z in the bonds denomination ccy. Knowing that Z-spread refers w.r.t the foreign yield curve.

Now, if your asking on the credit side of it, there is the question on whether it would make more sense ( for the default probabilities) to use a CDS on a foreign currency bond. Such a contract should include the probability of defaulting (on that eurobond) due to an adverse movement of the exchange rate (since you might be able to pay in your local currency but not in the foreign) -or viceversa but I doubt they will cancel out (kinda convexity)- But this might well be quant-sci-fiction , is there such a cds quote? how important is this effect?
This just to say it should reflect the extra risk/extra spread the issuer is subject to because of the FX component. My point is that if you use a 'local currency' CDS you will see a (most probably) lower probability and your credit basis might be distorted.
...and by now I am off-topic....

The need for the extra curves data and the meaning of a CDS spread are the reasons why I didnt include those bonds from the issuer in the example (ok, lazyness too).


best
pp




----- Original Message -----

>
> Hi to all!
>
>
> Sorry, probably, my question is off the topic of your discussion...
> If I have a corporate eurobond (a corporate bond nominated in the
> foreign currency), then must I use a foreign currency g-curve (a
> foreign currency zero-coupon curve) or a domestic one for z-spread
> calculation?
>
>
> Best regards,
> Kirill
>
>
>
>
>
> On 18 July 2014 12:52, < [hidden email] > wrote:
>
>
> Gee, you just reminded me I promised Eric I was going to merge this
> with the last QLXL1.4 and I have been busy with other things.
> Anyways, should merge fine but you can always use the previous QLXL;
> with the changes things work better (recalc mostly); thanks Eric,
> Nando and any other involved by the way.
>
> The worksheet is no big deal; It compares some bonds risky and non
> risky pricing to their market quotes:
> -MoneyMarket Wsheet its just for the date and YTS
> -CreditMarket Wsheet bootstraps two CDS on the reference name of the
> bonds for two different seniorities. It reconstruct the default
> probability curves and reprice-test a 5Y CDS. The grey recovery
> numbers let you speculate with the possibility of matching the
> default curves (if you believe there can only be one event for both
> senioirites).
> -BondPricing Wsheet is where the action lies; it has two blocks; the
> first one contains the market quotes of the reference bonds; only
> the fixed rate ones in blue are used (can be done with some of the
> floaters too with the code in QL) The second block reprices the
> bonds with each of the previous CDS curves independently of wether
> the curves are matching the bonds seniority. One would expect the
> seniority matching price to be closer to the market quote (you can
> check that...). It also prices the bonds ignoring the default
> component (pink curve). These results are shown in price and
> Z-spread on the two graphs(bonds are sorted by maturity); the
> difference between the theoretical(CDS/credit based) Z-spread and
> the market one is one way to measure the so called credit-basis (see
> the paper I mention below).
>
> On the data set: not all bond prices are on the same 'todays' date
> and the CDS quotes are agregates of quotes close to that date. You
> can see this as some room for discrepancies in the pricing. Also I
> couldnt find the subordination of issues numbered 2,4,5 if anyone
> can find the data please add it since this is one key point in the
> example (see bond codes). I dont have access to data systems
> anymore.
> Take conventions used with a pinch of salt, I tend to be 'flexible'
> on those.
>
>
> As for ther reading any credit textbook will start with this one, see
> ->Chapter 4 of Modelling single name and multi-name credit
> derivatives. Dominic O’Kane
> ->Section 3.4.1 of Credit Derivatives Pricing Models. P.J.
> Schonbucher
> ->Strongly recommend you this short/great paper with some ideas to
> extend the worksheet if you want:
> "Bond spreads as a proxy for credit default swap spreads" Mark
> Davies, Dimitry Pugachevsky; Bear Stearns
> ->Chapter 2 of Bielecki and Rutkowski should deal with that too but
> not so close to the models here.
>
> Best
> pp
>
>
>
> ----- Original Message -----
> >
> > Hi Pepe, I'm trying to recompile your set up, in the meanwhile can
> > you suggest me some reference (paper or book) that explains what
> > you
> > do in the spreadsheet?
> >
> >
> > Thanks
> >
> >
> > Paolo
> >
> >
> >
> > 2014-06-06 17:38 GMT+02:00 Paolo Baroni < [hidden email] > :
> >
> >
> >
> > Thanks Pepe, I try!
> > Ciao
> > P
> >
> >
> >
> > 2014-06-06 16:44 GMT+02:00 < [hidden email] > :
> >
> >
> >
> >
> > Hi Paolo,
> > I did renamed the function, the reason is that now you can select
> > the
> > interpolation in the hazard rates of the bootstrapped curve. You
> > need the extra code on top of 1.2.0, otherwise the excel sheet
> > would
> > not find the functions (that one and others).
> >
> > The safest way to go is to use a separate set up in your computer
> > and
> > recompile everything (lib and addin), downloading the merged
> > changes
> > in:
> > https://github.com/japari/quantlib/archive/Credit_inQLXL.zip
> > So you can discard it when your done if you dont want to integrate
> > it
> > in your code. Only keep in mind I have only updated project files
> > for Linux (for QL) and for VC9 so if your using another version of
> > visual studio you need to update the project files yourself
> > (sometimes if you open the VC9 with newer versions it upgrades
> > itself fine).
> >
> > Tell me if it doesnt work.
> >
> >
> > Best
> > Pepe
> >
> >
> >
> > ----- Original Message -----
> > >
> > > Hi Pepe I'm on quantlibxl 1.2.0 and I can't find the function
> > > qlPiecewiseHazardRateCurve that you use in sheet 'credit market'
> > > cell M9. Is it possible?
> > > I can find qlPiecewiseFlatHazardRateCurve but I'm not sure how to
> > > use
> > > it (and if I can use it instead of the first one I mentioned).
> > >
> > >
> > > Thanks, ciao
> > >
> > >
> > > Paolo
> > >
> > >
> > >
> > > 2014-06-05 14:36 GMT+02:00 Paolo Baroni < [hidden email] >
> > > :
> > >
> > >
> > >
> > > Thanks a lot Pepe.
> > > I'll try and I'll give you a feedback.
> > >
> > >
> > > Ciao
> > >
> > >
> > > Paolo
> > >
> > >
> > >
> > > 2014-06-05 14:34 GMT+02:00 < [hidden email] > :
> > >
> > >
> > >
> > >
> > > Hi again, apologies for the previous pm Paolo, I keep using the
> > > wrong
> > > shortcut.
> > >
> > > For the second way, you can use
> > > <ql/experimental/credit/riskybond.hpp>
> > >
> > > You can look for the sample sheet:
> > > QuantLibXL/Workbooks/Credit/RiskyBonds.xls
> > > which is a toy worksheet on exactly this problem with a real
> > > (more
> > > or
> > > less) market data case.
> > > thats in
> > > https://github.com/japari/quantlib/compare/Credit_inQLXL
> > > which modifies a bit the previous and other code.
> > > Write again if something does not work there.
> > > Best
> > > Pepe
> > >
> > >
> > >
> > >
> > > ----- Original Message -----
> > > >
> > > >
> > > > Well, in this case I'd like to price a fixed rate bond in two
> > > > ways
> > > > as
> > > > follows:
> > > >
> > > >
> > > > First way, compute the discount curve from quoted bond (same
> > > > issuer)
> > > > Second way, compute the discount curve from the benchmark curve
> > > > and
> > > > CDS spread
> > > >
> > > >
> > > > What do you think?
> > > >
> > > >
> > > > Thanks
> > > >
> > > >
> > > > Paolo
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > 2014-06-05 10:56 GMT+02:00 Luigi Ballabio <
> > > > [hidden email]
> > > > > :
> > > >
> > > >
> > > > It depends on what you want to do with CDS spreads. They can't
> > > > be
> > > > just
> > > > added to the interest rates (financially, I mean). There's some
> > > > conversion to z-spreads involved which depend on your pricing
> > > > models.
> > > >
> > > > Luigi
> > > >
> > > >
> > > >
> > > >
> > > > On Wed, Jun 4, 2014 at 10:03 PM, Paolo Baroni <
> > > > [hidden email]
> > > > > wrote:
> > > > > Luigi, can I use the same function to manage CDS spread? Or
> > > > > there
> > > > > is a
> > > > > different way?
> > > > >
> > > > > Thanks
> > > > >
> > > > > Paolo
> > > > >
> > > > >
> > > > > 2014-06-04 12:01 GMT+02:00 Luigi Ballabio <
> > > > > [hidden email] >:
> > > > >
> > > > >> Yes, use PiecewiseZeroSpreadedTermStructure instead.
> > > > >>
> > > > >> Luigi
> > > > >>
> > > > >>
> > > > >> On Wed, Jun 4, 2014 at 11:39 AM, Paolo Baroni <
> > > > >> [hidden email] >
> > > > >> wrote:
> > > > >> > Hi! Is there a way in the function
> > > > >> > 'ZeroSpreadedTermStructure'
> > > > >> > to pass
> > > > >> > it a
> > > > >> > z-spread as a vector (set of values for different
> > > > >> > maturities)?
> > > > >> >
> > > > >> > Thanks
> > > > >> >
> > > > >> > Paolo
> > > > >> >
> > > > >> >
> > > > >> > ------------------------------------------------------------------------------
> > > > >> > Learn Graph Databases - Download FREE O'Reilly Book
> > > > >> > "Graph Databases" is the definitive new guide to graph
> > > > >> > databases
> > > > >> > and
> > > > >> > their
> > > > >> > applications. Written by three acclaimed leaders in the
> > > > >> > field,
> > > > >> > this first edition is now available. Download your free
> > > > >> > book
> > > > >> > today!
> > > > >> > http://p.sf.net/sfu/NeoTech
> > > > >> > _______________________________________________
> > > > >> > QuantLib-users mailing list
> > > > >> > [hidden email]
> > > > >> > https://lists.sourceforge.net/lists/listinfo/quantlib-users
> > > > >> >
> > > > >>
> > > > >>
> > > > >>
> > > > >> --
> > > > >> < https://implementingquantlib.blogspot.com >
> > > > >> < https://twitter.com/lballabio >
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > < https://implementingquantlib.blogspot.com >
> > > > < https://twitter.com/lballabio >
> > > >
> > > >
> > > > ------------------------------------------------------------------------------
> > > > Learn Graph Databases - Download FREE O'Reilly Book
> > > > "Graph Databases" is the definitive new guide to graph
> > > > databases
> > > > and
> > > > their
> > > > applications. Written by three acclaimed leaders in the field,
> > > > this first edition is now available. Download your free book
> > > > today!
> > > > http://p.sf.net/sfu/NeoTech
> > > > _______________________________________________
> > > > QuantLib-users mailing list
> > > > [hidden email]
> > > > https://lists.sourceforge.net/lists/listinfo/quantlib-users
> > > >
> > >
> > >
> > >
> >
> >
> >
>
> ------------------------------------------------------------------------------
> Want fast and easy access to all the code in your enterprise? Index
> and
> search up to 200,000 lines of code with a free copy of Black Duck
> Code Sight - the same software that powers the world's largest code
> search on Ohloh, the Black Duck Open Hub! Try it now.
> http://p.sf.net/sfu/bds
>
>
> _______________________________________________
> QuantLib-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
>

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users