Re: z-spread

Posted by japari on
URL: http://quantlib.414.s1.nabble.com/z-spread-tp15361p15410.html

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