Code to expose default probability functionality in QuantLibXL

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

Code to expose default probability functionality in QuantLibXL

Don Stewart-3
Hi there,
Using the tutorial
http://quantlib.org/quantlibaddin/extend_tutorial.html and some trial
and error I've been able to expose QuantLib's default probability
functionality to QuantLibXL. The attached zip file contains the source
code changes made to QuantLibAddin-1.0.0b3 (which as far as I'm aware is
the latest published version of QuantLibAddin).

I've compiled this code using Microsoft Visual C++ 2008 to both Debug
(runtime static) and Release (runtime static) .xll files. I've used
these in Excel 2003 to back out probability of default from CDS spreads
which validate against data I have from JP Morgan and against a separate
model built in Matlab by a colleague.

I'd like to publish this code to the QuantLib source code base and would
appreciate it if someone could enlighten me how to do this.

I'd also appreciate any comments on whether my code exposes this
functionality in an optimal manner. For instance, is it necessary to
manually add source code to
QuantLibAddin\qlo\enumerations\constructors\enumeratedpairs.xpp or
manually create
QuantLibAddin\qlo\enumerations\factories\defaulttermstructuresfactory.hp
p rather than auto generate them via python from qlgensrc project.
 
In case anyone wants to compile this code then the installation process
is:-
Download and install the QuantLib source code stack. The parent
directory I used looks like
  gensrc
  log4cxx
  ObjectHandler
  QuantLib
  QuantLibAddin
  QuantLibXL
Unzip the attached zip file QuantLibAddinWithDefautlProability.zip to
this parent directory. The contents should overwrite some files in the
QuantLibAddin sub-directory.
Invoke Visual C++ 2008 and open the QuantLibXL\QuantLibXL_full_vc9.sln.
Select either Debug (runtime static) or Release (runtime static)
solution configuration.
Press F7 to build the solution.
After successful compilation, the QuantLibXL\xll sub-directory should
contain a .xll add in that can be loaded in Excel.
 
 
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
*****************************************************************


------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev

QuantLibAddinWithDefaultProbability.zip (51K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Code to expose default probability functionality in QuantLibXL

Eric Ehlers-2
Hi Don,

Quoting Don Stewart <[hidden email]>:

> Hi there,
> Using the tutorial
> http://quantlib.org/quantlibaddin/extend_tutorial.html and some trial
> and error I've been able to expose QuantLib's default probability
> functionality to QuantLibXL. The attached zip file contains the source
> code changes made to QuantLibAddin-1.0.0b3 (which as far as I'm aware is
> the latest published version of QuantLibAddin).
>
> I've compiled this code using Microsoft Visual C++ 2008 to both Debug
> (runtime static) and Release (runtime static) .xll files. I've used
> these in Excel 2003 to back out probability of default from CDS spreads
> which validate against data I have from JP Morgan and against a separate
> model built in Matlab by a colleague.
>
> I'd like to publish this code to the QuantLib source code base and would
> appreciate it if someone could enlighten me how to do this.

I took a stab at applying this patch to the trunk but it turns out  
that someone else has already implemented a change which partially  
overlaps yours.  Sincere apologies for not responding to your message  
sooner as this would have saved some duplication of effort.

I hate to ask but would you mind recreating your patch against the  
trunk?  I would apply it as soon as possible.

> I'd also appreciate any comments on whether my code exposes this
> functionality in an optimal manner. For instance, is it necessary to
> manually add source code to
> QuantLibAddin\qlo\enumerations\constructors\enumeratedpairs.xpp or
> manually create
> QuantLibAddin\qlo\enumerations\factories\defaulttermstructuresfactory.hp
> p rather than auto generate them via python from qlgensrc project.

At a very first glance it all looks good to me.  The existing code in  
the directories you mention above is handwritten so you're OK to  
follow that.

Regards,
Eric


------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev