Making SpreadCdsHelper available in QuantLibXL

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

Making SpreadCdsHelper available in QuantLibXL

Donald Stewart-2
Hi there,
I'm wanting to use the QuantLib functions in Excel to bootstrap Survival or Default Probabilities from market observed CDS spreads.
As best I can tell I need to call in Excel something like qlSreadCdsHelper() but such a function doesn't appear to have been migrated through to the QuantLibXL layer.
I've compiled the QuantLibXL(0.9.7)/QuantLib(1.0.0) stack under Visual C++ 2008 (Express Edition). I can see in the QuantLib  layer QuantLib::SpreadCdsHelper and related classes and have seen these used in the QuantLib C++ example CDS.cpp.
I've tried to migrate QuantLib::SpreadCdsHelper through to the QuantLibAddin layer following the approached used by DepositRateHelper but I'm getting compilation errors so am clearly doing something wrong.
 
Does anybody on the mailing list have examples/documentation on how to make functionality in the QuantLib layer available in QuantLibXl ?
 
I'd much appreciate some help in resolving this.
 
Thanks
 
Regards Don Stewart
 
 

 

 

This communication and any attachments contains information which is confidential and may be subject to legal privilege. It is for intended recipients only. If you are not the intended recipient you must not copy, distribute, publish, rely on or otherwise use it without our consent. Some of our communications may contain confidential information which it could be a criminal offence for you to disclose or use without authority. If you have received this email in error please notify [hidden email] immediately and delete the email from your computer.

The FSA reserves the right to monitor all email communications for compliance with legal, regulatory and professional standards.

This email is not intended to nor should it be taken to create any legal relations or contractual relationships. This email has originated from

The Financial Services Authority (FSA)

25 The North Colonnade,

Canary Wharf,

London

E14 5HS

United Kingdom

Registered as a Limited Company in England and Wales No.1920623.

Registered Office as above

Switchboard: 020 7066 1000

Web Site: http://www.fsa.gov.uk

*****************************************************************

 


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

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

Re: Making SpreadCdsHelper available in QuantLibXL

Kim Kuen Tang
Donald Stewart schrieb:

> Hi there,
> I'm wanting to use the QuantLib functions in Excel to bootstrap
> Survival or Default Probabilities from market observed CDS spreads.
> As best I can tell I need to call in Excel something
> like qlSreadCdsHelper() but such a function doesn't appear to
> have been migrated through to the QuantLibXL layer.
> I've compiled the QuantLibXL(0.9.7)/QuantLib(1.0.0) stack under Visual
> C++ 2008 (Express Edition). I can see in the QuantLib  layer
> QuantLib::SpreadCdsHelper and related classes and have seen these used
> in the QuantLib C++ example CDS.cpp.
> I've tried to migrate QuantLib::SpreadCdsHelper through to the
> QuantLibAddin layer following the approached used by DepositRateHelper
> but I'm getting compilation errors so am clearly doing something wrong.
>  
> Does anybody on the mailing list have examples/documentation on how to
> make functionality in the QuantLib layer available in QuantLibXl ?
>  
> I'd much appreciate some help in resolving this.
Following the link you will find an example how to expose additional
functions to qlxl.

http://quantlib.org/quantlibaddin/extend_tutorial.html

HTH

Regards
Kim

>  
> Thanks
>  
> Regards Don Stewart
> [hidden email]
>  
>  
>
>  
>
>  
>
> This communication and any attachments contains information which is
> confidential and may be subject to legal privilege. It is for intended
> recipients only. If you are not the intended recipient you must not
> copy, distribute, publish, rely on or otherwise use it without our
> consent. Some of our communications may contain confidential
> information which it could be a criminal offence for you to disclose
> or use without authority. If you have received this email in error
> please notify [hidden email] immediately and delete the email
> from your computer.
>
> The FSA reserves the right to monitor all email communications for
> compliance with legal, regulatory and professional standards.
>
> This email is not intended to nor should it be taken to create any
> legal relations or contractual relationships. This email has
> originated from
>
> The Financial Services Authority (FSA)
>
> 25 The North Colonnade,
>
> Canary Wharf,
>
> London
>
> E14 5HS
>
> United Kingdom
>
> Registered as a Limited Company in England and Wales No.1920623.
>
> Registered Office as above
>
> Switchboard: 020 7066 1000
>
> Web Site: http://www..fsa.gov.uk
>
> *****************************************************************
>
>  
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
>  
> ------------------------------------------------------------------------
>
> _______________________________________________
> QuantLib-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>  


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

Re: Making SpreadCdsHelper available in QuantLibXL

Bhavna J
In reply to this post by Donald Stewart-2
Hi,

Did you find a workaround for below issue? I am facing same problem and I did build quantlibaddin from source code.
I do see the files in the locations as specified here: http://quantlib.org/quantlibaddin/extend_tutorial.html

But, still when I use the add-in I do not see the qlSpreadCdsHelper function in excel.
I am using QL1.1 and VS2008.

Any help will be appreciated!!

Thanks,
Bhavna

Donald Stewart-2 wrote
Hi there,
I'm wanting to use the QuantLib functions in Excel to bootstrap Survival
or Default Probabilities from market observed CDS spreads.
As best I can tell I need to call in Excel something like
qlSreadCdsHelper() but such a function doesn't appear to have been
migrated through to the QuantLibXL layer.
I've compiled the QuantLibXL(0.9.7)/QuantLib(1.0.0) stack under Visual
C++ 2008 (Express Edition). I can see in the QuantLib  layer
QuantLib::SpreadCdsHelper and related classes and have seen these used
in the QuantLib C++ example CDS.cpp.
I've tried to migrate QuantLib::SpreadCdsHelper through to the
QuantLibAddin layer following the approached used by DepositRateHelper
but I'm getting compilation errors so am clearly doing something wrong.
 
Does anybody on the mailing list have examples/documentation on how to
make functionality in the QuantLib layer available in QuantLibXl ?
 
I'd much appreciate some help in resolving this.
 
Thanks
 
Regards Don Stewart
don.stewart@fsa.gov.uk
 
 



This communication and any attachments contains information which is confidential and may be subject to legal privilege. It is for intended recipients only. If you are not the intended recipient you must not copy, distribute, publish, rely on or otherwise use it without our consent. Some of our communications may contain confidential information which it could be a criminal offence for you to disclose or use without authority. If you have received this email in error please notify postmaster@fsa.gov.uk immediately and delete the email from your computer.
The FSA reserves the right to monitor all email communications for compliance with legal, regulatory and professional standards.
This email is not intended to nor should it be taken to create any legal relations or contractual relationships. This email has originated from
The Financial Services Authority (FSA)
25 The North Colonnade,
Canary Wharf,
London
E14 5HS
United Kingdom
Registered as a Limited Company in England and Wales No.1920623.
Registered Office as above
Switchboard: 020 7066 1000
Web Site: http://www.fsa.gov.uk
*****************************************************************


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

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

Re: Making SpreadCdsHelper available in QuantLibXL

japari
In reply to this post by Donald Stewart-2
Hi,
Nando fixed this recently. See rev. 17927

http://quantlib.svn.sourceforge.net/viewvc/quantlib/trunk/QuantLibXL/qlxl/?view=log

Best
pp

----- "Bhavna J" <[hidden email]> a écrit :

> Hi,
>
> Did you find a workaround for below issue? I am facing same problem
> and I
> did build quantlibaddin from source code.
> I do see the files in the locations as specified here:
> http://quantlib.org/quantlibaddin/extend_tutorial.html
>
> But, still when I use the add-in I do not see the qlSpreadCdsHelper
> function
> in excel.
> I am using QL1.1 and VS2008.
>
> Any help will be appreciated!!
>
> Thanks,
> Bhavna
>
>
> Donald Stewart-2 wrote:
> >
> > Hi there,
> > I'm wanting to use the QuantLib functions in Excel to bootstrap
> Survival
> > or Default Probabilities from market observed CDS spreads.
> > As best I can tell I need to call in Excel something like
> > qlSreadCdsHelper() but such a function doesn't appear to have been
> > migrated through to the QuantLibXL layer.
> > I've compiled the QuantLibXL(0.9.7)/QuantLib(1.0.0) stack under
> Visual
> > C++ 2008 (Express Edition). I can see in the QuantLib  layer
> > QuantLib::SpreadCdsHelper and related classes and have seen these
> used
> > in the QuantLib C++ example CDS.cpp.
> > I've tried to migrate QuantLib::SpreadCdsHelper through to the
> > QuantLibAddin layer following the approached used by
> DepositRateHelper
> > but I'm getting compilation errors so am clearly doing something
> wrong.
> >  
> > Does anybody on the mailing list have examples/documentation on how
> to
> > make functionality in the QuantLib layer available in QuantLibXl ?
> >  
> > I'd much appreciate some help in resolving this.
> >  
> > Thanks
> >  
> > Regards Don Stewart
> > [hidden email]
> >  
> >  
> >
> >
> >
> > This communication and any attachments contains information which
> is
> > confidential and may be subject to legal privilege. It is for
> intended
> > recipients only. If you are not the intended recipient you must not
> copy,
> > distribute, publish, rely on or otherwise use it without our
> consent. Some
> > of our communications may contain confidential information which it
> could
> > be a criminal offence for you to disclose or use without authority.
> If you
> > have received this email in error please notify
> [hidden email]
> > immediately and delete the email from your computer.
> > The FSA reserves the right to monitor all email communications for
> > compliance with legal, regulatory and professional standards.
> > This email is not intended to nor should it be taken to create any
> legal
> > relations or contractual relationships. This email has originated
> from
> > The Financial Services Authority (FSA)
> > 25 The North Colonnade,
> > Canary Wharf,
> > London
> > E14 5HS
> > United Kingdom
> > Registered as a Limited Company in England and Wales No.1920623.
> > Registered Office as above
> > Switchboard: 020 7066 1000
> > Web Site: http://www.fsa.gov.uk
> > *****************************************************************
> >
> >
> >
> ------------------------------------------------------------------------------
> >
> > _______________________________________________
> > QuantLib-users mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/quantlib-users
> >
> >
>
> --
> View this message in context:
> http://old.nabble.com/Making-SpreadCdsHelper-available-in-QuantLibXL-tp28386117p32386085.html
> Sent from the quantlib-users mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Special Offer -- Download ArcSight Logger for FREE!
> Finally, a world-class log management solution at an even better
> price-free! And you'll get a free "Love Thy Logs" t-shirt when you
> download Logger. Secure your free ArcSight Logger TODAY!
> http://p.sf.net/sfu/arcsisghtdev2dev
> _______________________________________________
> QuantLib-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-users

------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Making SpreadCdsHelper available in QuantLibXL

japari
In reply to this post by Donald Stewart-2
Easy, you already have everything but the member itself.
Declare the metacode in gensrc\metadata\functions\credit.xml :
------------------------------------------
    <Member name='qlDefaultProbability' type='QuantLib::DefaultProbabilityTermStructure' superType='libraryTermStructure'>
      <description>Returns the default probability from the curve reference date to a future date.</description>
      <libraryFunction>defaultProbability</libraryFunction>
      <SupportedPlatforms>
        <SupportedPlatform name='Excel'/>
      </SupportedPlatforms>
      <ParameterList>
        <Parameters>
          <Parameter name='ProbDate' default='QuantLib::Date()'>
            <type>QuantLib::Date</type>
            <tensorRank>scalar</tensorRank>
            <description>future date of the desired probability.</description>
          </Parameter>
          <Parameter name='Extrapolate' default='true'>
            <type>bool</type>
            <tensorRank>scalar</tensorRank>
            <description>FALSE to disable extrapolation beyond the largest date.</description>
          </Parameter>
        </Parameters>
      </ParameterList>
      <ReturnValue>
        <type>QuantLib::Real</type>
        <tensorRank>scalar</tensorRank>
      </ReturnValue>
    </Member>

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

-Invoke Python magic.
-Recompile.

You'll need to create the objects (helpers and Default TS curve) the whole chain needs.

Best regards
Pepe


----- "Bhavna Jhunjhunwala" <[hidden email]> a écrit :

> Hi,
>
> Also, would you know what would I need to do in order to expose the CDS.cpp example to quantlibXL? I was trying to get the survival probability given cds spread, but do not find any function for that in excel.
>
> Thanks,
> Bhavna
>
>
> On Mon, Sep 5, 2011 at 1:13 PM, <[hidden email]> wrote:
>
Hi,
> Nando fixed this recently. See rev. 17927
>
> http://quantlib.svn.sourceforge.net/viewvc/quantlib/trunk/QuantLibXL/qlxl/?view=log
>
> Best
> pp
>
> ----- "Bhavna J" <[hidden email]> a écrit :
>
> > Hi,
> >
> > Did you find a workaround for below issue? I am facing same problem
> > and I
> > did build quantlibaddin from source code.
> > I do see the files in the locations as specified here:
> > http://quantlib.org/quantlibaddin/extend_tutorial.html
> >
> > But, still when I use the add-in I do not see the qlSpreadCdsHelper
> > function
> > in excel.
> > I am using QL1.1 and VS2008.
> >
> > Any help will be appreciated!!
> >
> > Thanks,
> > Bhavna
> >
> >
> > Donald Stewart-2 wrote:
> > >
> > > Hi there,
> > > I'm wanting to use the QuantLib functions in Excel to bootstrap
> > Survival
> > > or Default Probabilities from market observed CDS spreads.
> > > As best I can tell I need to call in Excel something like
> > > qlSreadCdsHelper() but such a function doesn't appear to have been
> > > migrated through to the QuantLibXL layer.
> > > I've compiled the QuantLibXL(0.9.7)/QuantLib(1.0.0) stack under
> > Visual
> > > C++ 2008 (Express Edition). I can see in the QuantLib  layer
> > > QuantLib::SpreadCdsHelper and related classes and have seen these
> > used
> > > in the QuantLib C++ example CDS.cpp.
> > > I've tried to migrate QuantLib::SpreadCdsHelper through to the
> > > QuantLibAddin layer following the approached used by
> > DepositRateHelper
> > > but I'm getting compilation errors so am clearly doing something
> > wrong.
> > >
> > > Does anybody on the mailing list have examples/documentation on how
> > to
> > > make functionality in the QuantLib layer available in QuantLibXl ?
> > >
> > > I'd much appreciate some help in resolving this.
> > >
> > > Thanks
> > >
> > > Regards Don Stewart
> > > [hidden email]
> > >
> > >
> > >
> > >
> > >
> > > This communication and any attachments contains information which
> > is
> > > confidential and may be subject to legal privilege. It is for
> > intended
> > > recipients only. If you are not the intended recipient you must not
> > copy,
> > > distribute, publish, rely on or otherwise use it without our
> > consent. Some
> > > of our communications may contain confidential information which it
> > could
> > > be a criminal offence for you to disclose or use without authority.
> > If you
> > > have received this email in error please notify
> > [hidden email]
> > > immediately and delete the email from your computer.
> > > The FSA reserves the right to monitor all email communications for
> > > compliance with legal, regulatory and professional standards.
> > > This email is not intended to nor should it be taken to create any
> > legal
> > > relations or contractual relationships. This email has originated
> > from
> > > The Financial Services Authority (FSA)
> > > 25 The North Colonnade,
> > > Canary Wharf,
> > > London
> > > E14 5HS
> > > United Kingdom
> > > Registered as a Limited Company in England and Wales No.1920623.
> > > Registered Office as above
> > > Switchboard: 020 7066 1000
> > > Web Site: http://www.fsa.gov.uk
> > > *****************************************************************
> > >
> > >
> > >
> > ------------------------------------------------------------------------------
> > >
> > > _______________________________________________
> > > QuantLib-users mailing list
> > > [hidden email]
> > > https://lists.sourceforge.net/lists/listinfo/quantlib-users
> > >
> > >
> >
> > --
> > View this message in context:
> > http://old.nabble.com/Making-SpreadCdsHelper-available-in-QuantLibXL-tp28386117p32386085.html
> > Sent from the quantlib-users mailing list archive at Nabble.com.
> >
> >
> > ------------------------------------------------------------------------------
> > Special Offer -- Download ArcSight Logger for FREE!
> > Finally, a world-class log management solution at an even better
> > price-free! And you'll get a free "Love Thy Logs" t-shirt when you
> > download Logger. Secure your free ArcSight Logger TODAY!
> > http://p.sf.net/sfu/arcsisghtdev2dev
> > _______________________________________________
> > QuantLib-users mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/quantlib-users
>

>
------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Making SpreadCdsHelper available in QuantLibXL

Bhavna J
Hi All,

Is there a way to view the CDS cashflows in quantlib? For example when pricing a 2 year CDS with semiannual payment frequency, if I want to view the cashflows and hazard rates etc every 6 months, is there any function available for that currently?

Thanks,
Bhavna

Jose Aparicio-Navarro wrote
Easy, you already have everything but the member itself.
Declare the metacode in gensrc\metadata\functions\credit.xml :
------------------------------------------
<Member name='qlDefaultProbability' type='QuantLib::DefaultProbabilityTermStructure' superType='libraryTermStructure'> 
<description>Returns the default probability from the curve reference date to a future date.</description> 
<libraryFunction>defaultProbability</libraryFunction> 
<SupportedPlatforms> 
<SupportedPlatform name='Excel'/> 
</SupportedPlatforms> 
<ParameterList> 
<Parameters> 
<Parameter name='ProbDate' default='QuantLib::Date()'> 
<type>QuantLib::Date</type> 
<tensorRank>scalar</tensorRank> 
<description>future date of the desired probability.</description> 
</Parameter> 
<Parameter name='Extrapolate' default='true'> 
<type>bool</type> 
<tensorRank>scalar</tensorRank> 
<description>FALSE to disable extrapolation beyond the largest date.</description> 
</Parameter> 
</Parameters> 
</ParameterList> 
<ReturnValue> 
<type>QuantLib::Real</type> 
<tensorRank>scalar</tensorRank> 
</ReturnValue> 
</Member> 

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

-Invoke Python magic.
-Recompile.

You'll need to create the objects (helpers and Default TS curve) the whole chain needs.

Best regards
Pepe


----- "Bhavna Jhunjhunwala" <bhavnarpj@gmail.com> a écrit :
> Hi,
>
> Also, would you know what would I need to do in order to expose the CDS.cpp example to quantlibXL? I was trying to get the survival probability given cds spread, but do not find any function for that in excel.
>
> Thanks,
> Bhavna
>
>
> On Mon, Sep 5, 2011 at 1:13 PM, < japari@free.fr > wrote:
>

Hi,
> Nando fixed this recently. See rev. 17927
>
> http://quantlib.svn.sourceforge.net/viewvc/quantlib/trunk/QuantLibXL/qlxl/?view=log 
>
> Best
> pp
>
> ----- "Bhavna J" < bhavnarpj@gmail.com > a écrit :
>
> > Hi,
> >
> > Did you find a workaround for below issue? I am facing same problem
> > and I
> > did build quantlibaddin from source code.
> > I do see the files in the locations as specified here:
> > http://quantlib.org/quantlibaddin/extend_tutorial.html 
> >
> > But, still when I use the add-in I do not see the qlSpreadCdsHelper
> > function
> > in excel.
> > I am using QL1.1 and VS2008.
> >
> > Any help will be appreciated!!
> >
> > Thanks,
> > Bhavna
> >
> >
> > Donald Stewart-2 wrote:
> > >
> > > Hi there,
> > > I'm wanting to use the QuantLib functions in Excel to bootstrap
> > Survival
> > > or Default Probabilities from market observed CDS spreads.
> > > As best I can tell I need to call in Excel something like
> > > qlSreadCdsHelper() but such a function doesn't appear to have been
> > > migrated through to the QuantLibXL layer.
> > > I've compiled the QuantLibXL(0.9.7)/QuantLib(1.0.0) stack under
> > Visual
> > > C++ 2008 (Express Edition). I can see in the QuantLib layer
> > > QuantLib::SpreadCdsHelper and related classes and have seen these
> > used
> > > in the QuantLib C++ example CDS.cpp.
> > > I've tried to migrate QuantLib::SpreadCdsHelper through to the
> > > QuantLibAddin layer following the approached used by
> > DepositRateHelper
> > > but I'm getting compilation errors so am clearly doing something
> > wrong.
> > >
> > > Does anybody on the mailing list have examples/documentation on how
> > to
> > > make functionality in the QuantLib layer available in QuantLibXl ?
> > >
> > > I'd much appreciate some help in resolving this.
> > >
> > > Thanks
> > >
> > > Regards Don Stewart
> > > don.stewart@fsa.gov.uk
> > >
> > >
> > >
> > >
> > >
> > > This communication and any attachments contains information which
> > is
> > > confidential and may be subject to legal privilege. It is for
> > intended
> > > recipients only. If you are not the intended recipient you must not
> > copy,
> > > distribute, publish, rely on or otherwise use it without our
> > consent. Some
> > > of our communications may contain confidential information which it
> > could
> > > be a criminal offence for you to disclose or use without authority.
> > If you
> > > have received this email in error please notify
> > postmaster@fsa.gov.uk
> > > immediately and delete the email from your computer.
> > > The FSA reserves the right to monitor all email communications for
> > > compliance with legal, regulatory and professional standards.
> > > This email is not intended to nor should it be taken to create any
> > legal
> > > relations or contractual relationships. This email has originated
> > from
> > > The Financial Services Authority (FSA)
> > > 25 The North Colonnade,
> > > Canary Wharf,
> > > London
> > > E14 5HS
> > > United Kingdom
> > > Registered as a Limited Company in England and Wales No.1920623.
> > > Registered Office as above
> > > Switchboard: 020 7066 1000
> > > Web Site: http://www.fsa.gov.uk 
> > > *****************************************************************
> > >
> > >
> > >
> > ------------------------------------------------------------------------------
> > >
> > > _______________________________________________
> > > QuantLib-users mailing list
> > > QuantLib-users@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/quantlib-users 
> > >
> > >
> >
> > --
> > View this message in context:
> > http://old.nabble.com/Making-SpreadCdsHelper-available-in-QuantLibXL-tp28386117p32386085.html 
> > Sent from the quantlib-users mailing list archive at Nabble.com.
> >
> >
> > ------------------------------------------------------------------------------
> > Special Offer -- Download ArcSight Logger for FREE!
> > Finally, a world-class log management solution at an even better
> > price-free! And you'll get a free "Love Thy Logs" t-shirt when you
> > download Logger. Secure your free ArcSight Logger TODAY!
> > http://p.sf.net/sfu/arcsisghtdev2dev 
> > _______________________________________________
> > QuantLib-users mailing list
> > QuantLib-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/quantlib-users 
>
>
------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
QuantLib-users mailing list
QuantLib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Making SpreadCdsHelper available in QuantLibXL

Luigi Ballabio
On Thu, 2011-09-15 at 02:26 -0700, Bhavna J wrote:
> Is there a way to view the CDS cashflows in quantlib? For example when
> pricing a 2 year CDS with semiannual payment frequency, if I want to view
> the cashflows and hazard rates etc every 6 months, is there any function
> available for that currently?

In C++, you can use the CreditDefaultSwap::coupons() method to extract
the cashflows as a vector of CashFlow objects; you can then ask each of
them for its date and amount.  Once you have the dates, you can retrieve
the hazard rates from the default-probability curve you used to price
the CDS.

If we're talking about QuantLibXL instead, I'm not sure that the methods
above are all exposed.  You might have to do it before you can use them.

Luigi


--

The doctrine of human equality reposes on this: that there is no man
really clever who has not found that he is stupid.
-- Gilbert K. Chesterson



------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
http://p.sf.net/sfu/rim-devcon-copy2
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Making SpreadCdsHelper available in QuantLibXL

Bhavna J
Thanks for the quick response, but how do I expose CreditDefaultSwap::coupons() method to quantlibXL?
I tried adding below code to qlo\credit.cpp similar to bond cashflows, but did not work...what am I doing wrong here?

vector<vector<ObjectHandler::property_t> > CreditDefaultSwap::flowAnalysis()
    {
        shared_ptr<QuantLib::CreditDefaultSwap> temp;
        getLibraryObject(temp);
        const QuantLib::Leg& coupon = temp->coupons();

        return QuantLibAddin::flowAnalysis(coupon);
    }

1>.\qlo\credit.cpp(43) : error C2143: syntax error : missing ';' before '<'
1>.\qlo\credit.cpp(43) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>.\qlo\credit.cpp(43) : error C2143: syntax error : missing ';' before '{'
1>.\qlo\credit.cpp(43) : error C2447: '{' : missing function header (old-style formal list?)


Thanks,
Bhavna

Luigi Ballabio wrote
On Thu, 2011-09-15 at 02:26 -0700, Bhavna J wrote:
> Is there a way to view the CDS cashflows in quantlib? For example when
> pricing a 2 year CDS with semiannual payment frequency, if I want to view
> the cashflows and hazard rates etc every 6 months, is there any function
> available for that currently?

In C++, you can use the CreditDefaultSwap::coupons() method to extract
the cashflows as a vector of CashFlow objects; you can then ask each of
them for its date and amount.  Once you have the dates, you can retrieve
the hazard rates from the default-probability curve you used to price
the CDS.

If we're talking about QuantLibXL instead, I'm not sure that the methods
above are all exposed.  You might have to do it before you can use them.

Luigi


--

The doctrine of human equality reposes on this: that there is no man
really clever who has not found that he is stupid.
-- Gilbert K. Chesterson



------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
http://p.sf.net/sfu/rim-devcon-copy2
_______________________________________________
QuantLib-users mailing list
QuantLib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Making SpreadCdsHelper available in QuantLibXL

Bhavna J
Hi Everyone,

I was able to get below function to qlXL. Can someone provide me with an example for displaying QL errors using vba?
I am writing to logfile using below:
Application.Run("ohLogSetFile", FilePath)
Application.Run("ohRepositoryLogAllObjects")

But every time the log file grows in size, i tried using the FileSystemObject function from VBA to delete file and recreate new one, but it does not seem to work. When ql writes to file it cannot be deleted another time giving permission denied error.

    Dim fso As Scripting.FileSystemObject
    Set fso = New Scripting.FileSystemObject
    Dim FilePath As String
    Dim filetxt As TextStream

    FilePath = "C:\Desktop\QL Log2.txt"
    If fso.FileExists(FilePath) Then
        fso.DeleteFile FilePath
    End If

    Set filetxt = fso.CreateTextFile(FilePath, True)
    'filetxt.Write (" ")
    filetxt.Close


Anyone come across this before?

Thanks,
Bhavna

Bhavna J wrote
Thanks for the quick response, but how do I expose CreditDefaultSwap::coupons() method to quantlibXL?
I tried adding below code to qlo\credit.cpp similar to bond cashflows, but did not work...what am I doing wrong here?

vector<vector<ObjectHandler::property_t> > CreditDefaultSwap::flowAnalysis()
    {
        shared_ptr<QuantLib::CreditDefaultSwap> temp;
        getLibraryObject(temp);
        const QuantLib::Leg& coupon = temp->coupons();

        return QuantLibAddin::flowAnalysis(coupon);
    }

1>.\qlo\credit.cpp(43) : error C2143: syntax error : missing ';' before '<'
1>.\qlo\credit.cpp(43) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>.\qlo\credit.cpp(43) : error C2143: syntax error : missing ';' before '{'
1>.\qlo\credit.cpp(43) : error C2447: '{' : missing function header (old-style formal list?)


Thanks,
Bhavna

Luigi Ballabio wrote
On Thu, 2011-09-15 at 02:26 -0700, Bhavna J wrote:
> Is there a way to view the CDS cashflows in quantlib? For example when
> pricing a 2 year CDS with semiannual payment frequency, if I want to view
> the cashflows and hazard rates etc every 6 months, is there any function
> available for that currently?

In C++, you can use the CreditDefaultSwap::coupons() method to extract
the cashflows as a vector of CashFlow objects; you can then ask each of
them for its date and amount.  Once you have the dates, you can retrieve
the hazard rates from the default-probability curve you used to price
the CDS.

If we're talking about QuantLibXL instead, I'm not sure that the methods
above are all exposed.  You might have to do it before you can use them.

Luigi


--

The doctrine of human equality reposes on this: that there is no man
really clever who has not found that he is stupid.
-- Gilbert K. Chesterson



------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
http://p.sf.net/sfu/rim-devcon-copy2
_______________________________________________
QuantLib-users mailing list
QuantLib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Making SpreadCdsHelper available in QuantLibXL

Bhavna J
In reply to this post by japari
Hello All,

For the CDS mark to market value, can we use the function qlInstrumentNPV? For some reason my function returns a value of 0.
Also, the functions qlImpliedHazardRate() and qlCdsFairSpread() return 0 value.
Can someone advice in what cases this occurs? I do not see any errors on object creation.

Thanks,
Bhavna

On Mon, Sep 5, 2011 at 1:13 PM, <[hidden email]> wrote:
Hi,
Nando fixed this recently. See rev. 17927

http://quantlib.svn.sourceforge.net/viewvc/quantlib/trunk/QuantLibXL/qlxl/?view=log

Best
pp

----- "Bhavna J" <[hidden email]> a écrit :

> Hi,
>
> Did you find a workaround for below issue? I am facing same problem
> and I
> did build quantlibaddin from source code.
> I do see the files in the locations as specified here:
> http://quantlib.org/quantlibaddin/extend_tutorial.html
>
> But, still when I use the add-in I do not see the qlSpreadCdsHelper
> function
> in excel.
> I am using QL1.1 and VS2008.
>
> Any help will be appreciated!!
>
> Thanks,
> Bhavna
>
>
> Donald Stewart-2 wrote:
> >
> > Hi there,
> > I'm wanting to use the QuantLib functions in Excel to bootstrap
> Survival
> > or Default Probabilities from market observed CDS spreads.
> > As best I can tell I need to call in Excel something like
> > qlSreadCdsHelper() but such a function doesn't appear to have been
> > migrated through to the QuantLibXL layer.
> > I've compiled the QuantLibXL(0.9.7)/QuantLib(1.0.0) stack under
> Visual
> > C++ 2008 (Express Edition). I can see in the QuantLib  layer
> > QuantLib::SpreadCdsHelper and related classes and have seen these
> used
> > in the QuantLib C++ example CDS.cpp.
> > I've tried to migrate QuantLib::SpreadCdsHelper through to the
> > QuantLibAddin layer following the approached used by
> DepositRateHelper
> > but I'm getting compilation errors so am clearly doing something
> wrong.
> >
> > Does anybody on the mailing list have examples/documentation on how
> to
> > make functionality in the QuantLib layer available in QuantLibXl ?
> >
> > I'd much appreciate some help in resolving this.
> >
> > Thanks
> >
> > Regards Don Stewart
> > [hidden email]
> >
> >
> >
> >
> >
> > This communication and any attachments contains information which
> is
> > confidential and may be subject to legal privilege. It is for
> intended
> > recipients only. If you are not the intended recipient you must not
> copy,
> > distribute, publish, rely on or otherwise use it without our
> consent. Some
> > of our communications may contain confidential information which it
> could
> > be a criminal offence for you to disclose or use without authority.
> If you
> > have received this email in error please notify
> [hidden email]
> > immediately and delete the email from your computer.
> > The FSA reserves the right to monitor all email communications for
> > compliance with legal, regulatory and professional standards.
> > This email is not intended to nor should it be taken to create any
> legal
> > relations or contractual relationships. This email has originated
> from
> > The Financial Services Authority (FSA)
> > 25 The North Colonnade,
> > Canary Wharf,
> > London
> > E14 5HS
> > United Kingdom
> > Registered as a Limited Company in England and Wales No.1920623.
> > Registered Office as above
> > Switchboard: 020 7066 1000
> > Web Site: http://www.fsa.gov.uk
> > *****************************************************************
> >
> >
> >
> ------------------------------------------------------------------------------
> >
> > _______________________________________________
> > QuantLib-users mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/quantlib-users
> >
> >
>
> --
> View this message in context:
> http://old.nabble.com/Making-SpreadCdsHelper-available-in-QuantLibXL-tp28386117p32386085.html
> Sent from the quantlib-users mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Special Offer -- Download ArcSight Logger for FREE!
> Finally, a world-class log management solution at an even better
> price-free! And you'll get a free "Love Thy Logs" t-shirt when you
> download Logger. Secure your free ArcSight Logger TODAY!
> http://p.sf.net/sfu/arcsisghtdev2dev
> _______________________________________________
> QuantLib-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-users


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Making SpreadCdsHelper available in QuantLibXL

Luigi Ballabio
On Thu, 2011-11-17 at 18:19 +0530, Bhavna Jhunjhunwala wrote:
> For the CDS mark to market value, can we use the function
> qlInstrumentNPV? For some reason my function returns a value of 0.
> Also, the functions qlImpliedHazardRate() and qlCdsFairSpread() return
> 0 value.
> Can someone advice in what cases this occurs? I do not see any errors
> on object creation.
>
An expired instrument? Are you setting the evaluation date correctly?

Luigi


--

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



------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Making SpreadCdsHelper available in QuantLibXL

Bhavna J
Yes, the evaluation date is 12/10/2007 with
start date: 5/15/2007
end date: 5/15/2009
I do get reasonable values in qlCouponLegNPV and qlDefaultLegNPV.

Thanks,
Bhavna

On Thu, Nov 17, 2011 at 3:10 PM, Luigi Ballabio <[hidden email]> wrote:
On Thu, 2011-11-17 at 18:19 +0530, Bhavna Jhunjhunwala wrote:
> For the CDS mark to market value, can we use the function
> qlInstrumentNPV? For some reason my function returns a value of 0.
> Also, the functions qlImpliedHazardRate() and qlCdsFairSpread() return
> 0 value.
> Can someone advice in what cases this occurs? I do not see any errors
> on object creation.
>
An expired instrument? Are you setting the evaluation date correctly?

Luigi


--

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




------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Making SpreadCdsHelper available in QuantLibXL

Luigi Ballabio
On Thu, 2011-11-17 at 15:14 +0000, Bhavna Jhunjhunwala wrote:
> Yes, the evaluation date is 12/10/2007 with
> start date: 5/15/2007
> end date: 5/15/2009
> I do get reasonable values in qlCouponLegNPV and qlDefaultLegNPV.
>
Can you post some code that reproduces the issue?

Luigi
>        
>        
>

--

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



------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Making SpreadCdsHelper available in QuantLibXL

japari
In reply to this post by Donald Stewart-2
Hola!,
I cant see these functions so I assume you have added them to credit.xml Can you send the xml code pls?
qlInstrumentNPV works ok here, but I only have your dates. Can you also send a spreadsheet or the data with
the minimum to test, pls?
Best

----- "Bhavna Jhunjhunwala" <[hidden email]> a écrit :

> Yes, the evaluation date is 12/10/2007 with
> start date: 5/15/2007
> end date: 5/15/2009
> I do get reasonable values in qlCouponLegNPV and qlDefaultLegNPV.
>
> Thanks,
> Bhavna
>
>
> On Thu, Nov 17, 2011 at 3:10 PM, Luigi Ballabio <[hidden email]> wrote:
>
> On Thu, 2011-11-17 at 18:19 +0530, Bhavna Jhunjhunwala wrote:
> > For the CDS mark to market value, can we use the function
> > qlInstrumentNPV? For some reason my function returns a value of 0.
> > Also, the functions qlImpliedHazardRate() and qlCdsFairSpread() return
> > 0 value.
> > Can someone advice in what cases this occurs? I do not see any errors
> > on object creation.
> >
>
An expired instrument? Are you setting the evaluation date correctly?
>
> Luigi
>
>
> --
>
> The shortest way to do many things is to do only one thing at once.
> -- Samuel Smiles
>
>
>

>
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Making SpreadCdsHelper available in QuantLibXL

Bhavna J
Here you go...

Thanks,
Bhavna

On Thu, Nov 17, 2011 at 11:50 PM, <[hidden email]> wrote:
Hola!,
I cant see these functions so I assume you have added them to credit.xml Can you send the xml code pls?
qlInstrumentNPV works ok here, but I only have your dates. Can you also send a spreadsheet or the data with
the minimum to test, pls?
Best


----- "Bhavna Jhunjhunwala" <[hidden email]> a écrit :
> Yes, the evaluation date is 12/10/2007 with
> start date: 5/15/2007
> end date: 5/15/2009
> I do get reasonable values in qlCouponLegNPV and qlDefaultLegNPV.
>
> Thanks,
> Bhavna
>
>
> On Thu, Nov 17, 2011 at 3:10 PM, Luigi Ballabio <[hidden email]> wrote:
>
> On Thu, 2011-11-17 at 18:19 +0530, Bhavna Jhunjhunwala wrote:

> > For the CDS mark to market value, can we use the function
> > qlInstrumentNPV? For some reason my function returns a value of 0.
> > Also, the functions qlImpliedHazardRate() and qlCdsFairSpread() return
> > 0 value.
> > Can someone advice in what cases this occurs? I do not see any errors
> > on object creation.
> >
>
An expired instrument? Are you setting the evaluation date correctly?
>
> Luigi
>
>
> --
>
> The shortest way to do many things is to do only one thing at once.
> -- Samuel Smiles
>
>
>

>

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users

CDS calculator.xls (119K) Download Attachment
credit.xml (34K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Making SpreadCdsHelper available in QuantLibXL

Bhavna J
Another thing I noticed is that the qlInstrumentNPV returns 0 even for option price using the sample xls in quantlib. So I guess, something got corrupted in the build. Is there a way to debug this? Or will I have to redo everything again?

Thanks,
Bhavna

On Fri, Nov 18, 2011 at 8:37 AM, Bhavna Jhunjhunwala <[hidden email]> wrote:
Here you go...

Thanks,
Bhavna


On Thu, Nov 17, 2011 at 11:50 PM, <[hidden email]> wrote:
Hola!,
I cant see these functions so I assume you have added them to credit.xml Can you send the xml code pls?
qlInstrumentNPV works ok here, but I only have your dates. Can you also send a spreadsheet or the data with
the minimum to test, pls?
Best


----- "Bhavna Jhunjhunwala" <[hidden email]> a écrit :
> Yes, the evaluation date is 12/10/2007 with
> start date: 5/15/2007
> end date: 5/15/2009
> I do get reasonable values in qlCouponLegNPV and qlDefaultLegNPV.
>
> Thanks,
> Bhavna
>
>
> On Thu, Nov 17, 2011 at 3:10 PM, Luigi Ballabio <[hidden email]> wrote:
>
> On Thu, 2011-11-17 at 18:19 +0530, Bhavna Jhunjhunwala wrote:

> > For the CDS mark to market value, can we use the function
> > qlInstrumentNPV? For some reason my function returns a value of 0.
> > Also, the functions qlImpliedHazardRate() and qlCdsFairSpread() return
> > 0 value.
> > Can someone advice in what cases this occurs? I do not see any errors
> > on object creation.
> >
>
An expired instrument? Are you setting the evaluation date correctly?
>
> Luigi
>
>
> --
>
> The shortest way to do many things is to do only one thing at once.
> -- Samuel Smiles
>
>
>

>


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Making SpreadCdsHelper available in QuantLibXL

Bhavna J
I also installed quantlibXL 1.0.1 from website but the qlInstrumentNPV still returns 0 NPV for option price in Option.xls file. Any clues what could go wrong?

Thanks,
Bhavna

On Fri, Nov 18, 2011 at 9:18 AM, Bhavna Jhunjhunwala <[hidden email]> wrote:
Another thing I noticed is that the qlInstrumentNPV returns 0 even for option price using the sample xls in quantlib. So I guess, something got corrupted in the build. Is there a way to debug this? Or will I have to redo everything again?

Thanks,
Bhavna

On Fri, Nov 18, 2011 at 8:37 AM, Bhavna Jhunjhunwala <[hidden email]> wrote:
Here you go...

Thanks,
Bhavna


On Thu, Nov 17, 2011 at 11:50 PM, <[hidden email]> wrote:
Hola!,
I cant see these functions so I assume you have added them to credit.xml Can you send the xml code pls?
qlInstrumentNPV works ok here, but I only have your dates. Can you also send a spreadsheet or the data with
the minimum to test, pls?
Best


----- "Bhavna Jhunjhunwala" <[hidden email]> a écrit :
> Yes, the evaluation date is 12/10/2007 with
> start date: 5/15/2007
> end date: 5/15/2009
> I do get reasonable values in qlCouponLegNPV and qlDefaultLegNPV.
>
> Thanks,
> Bhavna
>
>
> On Thu, Nov 17, 2011 at 3:10 PM, Luigi Ballabio <[hidden email]> wrote:
>
> On Thu, 2011-11-17 at 18:19 +0530, Bhavna Jhunjhunwala wrote:

> > For the CDS mark to market value, can we use the function
> > qlInstrumentNPV? For some reason my function returns a value of 0.
> > Also, the functions qlImpliedHazardRate() and qlCdsFairSpread() return
> > 0 value.
> > Can someone advice in what cases this occurs? I do not see any errors
> > on object creation.
> >
>
An expired instrument? Are you setting the evaluation date correctly?
>
> Luigi
>
>
> --
>
> The shortest way to do many things is to do only one thing at once.
> -- Samuel Smiles
>
>
>

>



------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Making SpreadCdsHelper available in QuantLibXL

japari
Cheers,
I'lll have a look
Regards

----- "Bhavna Jhunjhunwala" <[hidden email]> a écrit :

> I also installed quantlibXL 1.0.1 from website but the qlInstrumentNPV still returns 0 NPV for option price in Option.xls file. Any clues what could go wrong?
>
> Thanks,
> Bhavna
>
>
> On Fri, Nov 18, 2011 at 9:18 AM, Bhavna Jhunjhunwala <[hidden email]> wrote:
>
Another thing I noticed is that the qlInstrumentNPV returns 0 even for option price using the sample xls in quantlib. So I guess, something got corrupted in the build. Is there a way to debug this? Or will I have to redo everything again?
>
> Thanks,
> Bhavna
>
>
>
>
> On Fri, Nov 18, 2011 at 8:37 AM, Bhavna Jhunjhunwala <[hidden email]> wrote:
>
Here you go...
>
> Thanks,
> Bhavna

>
>
> On Thu, Nov 17, 2011 at 11:50 PM, <[hidden email]> wrote:
>
> Hola!,
> I cant see these functions so I assume you have added them to credit.xml Can you send the xml code pls?
> qlInstrumentNPV works ok here, but I only have your dates. Can you also send a spreadsheet or the data with
> the minimum to test, pls?
> Best

>
> ----- "Bhavna Jhunjhunwala" <[hidden email]> a écrit :
>
> Yes, the evaluation date is 12/10/2007 with
> > start date: 5/15/2007
> > end date: 5/15/2009
> > I do get reasonable values in qlCouponLegNPV and qlDefaultLegNPV.
> >
>
> Thanks,
> > Bhavna
> >
> >
> > On Thu, Nov 17, 2011 at 3:10 PM, Luigi Ballabio <[hidden email]> wrote:
> >
> On Thu, 2011-11-17 at 18:19 +0530, Bhavna Jhunjhunwala wrote:
> > > For the CDS mark to market value, can we use the function
> > > qlInstrumentNPV? For some reason my function returns a value of 0.
> > > Also, the functions qlImpliedHazardRate() and qlCdsFairSpread() return
> > > 0 value.
> > > Can someone advice in what cases this occurs? I do not see any errors
> > > on object creation.
> > >
> >
An expired instrument? Are you setting the evaluation date correctly?
> >
> > Luigi
> >
> >
> > --
> >
> > The shortest way to do many things is to do only one thing at once.
> > -- Samuel Smiles
> >
> >
> >

> >

>

>

>
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users