Hello everybody,
I am new to QuantlibXL and honestly have not too much idea about C++ programming. I got an assignment to build an Excel Tool, based on functions in QuantlibXL to create and evaluate a Variance Surface. I succeeded
to create an object of a class BlackVarianceSurface, but I don't know, how to move on. I read all of the documentation to QLXL and found no function, which uses such an object for input. I suspect this is because the functionality of QLXL is limited and the
functions using this objects are not yet implemented. If I am wrong, could you maybe give me some advice, how to evaluate the BlackVarianceSurface object. If I am right, does that mean, that I need to write a C++ function using functionality of QuantLib and
add it to the source of QLXL and build it? I appreciate any help.
Thanks in advance
Timofej
------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
On Tue, 2010-01-05 at 13:24 +0100, Kasakow, Timofej wrote:
> I am new to QuantlibXL and honestly have not too much idea about C++ > programming. I got an assignment to build an Excel Tool, based on > functions in QuantlibXL to create and evaluate a Variance Surface. I > succeeded to create an object of a class BlackVarianceSurface, but I > don't know, how to move on. I read all of the documentation to QLXL > and found no function, which uses such an object for input. I suspect > this is because the functionality of QLXL is limited and the functions > using this objects are not yet implemented. Yes, I think so. You'd have to export the blackVol method of BlackVarianceSurface to inspect the structure you created. Maybe some QuantLibXL expert can step in and describe shortly the steps to export it? Thanks, Luigi -- What is written without effort is, in general, read without pleasure. -- Samuel Johnson ------------------------------------------------------------------------------ Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
In reply to this post by Kasakow, Timofej
On Tue, Jan 5, 2010 at 1:24 PM, Kasakow, Timofej <[hidden email]> wrote:
> I got an assignment to build an Excel Tool, based on functions > in QuantlibXL to create and evaluate a Variance Surface. I succeeded > to create an object of a class BlackVarianceSurface, but I don't know, how > to move on. I read all of the documentation to QLXL and found no function, > which uses such an object for input. I suspect this is because the > functionality of QLXL is limited and the functions using this objects are > not yet implemented. You're right, that class constructor has been exported to Excel, but not its base class interface. So it's never been used or documented... I cleaned up some improper QuantLibAddin inheritance for TermStructure derived classes in http://quantlib.svn.sourceforge.net/viewvc/quantlib?view=rev&revision=17027, and then in http://quantlib.svn.sourceforge.net/viewvc/quantlib?view=rev&revision=17028 I exported BlackVolTermStructure interface and added an example workbook. The example workbook uses BlackConstantVol, but this is not an issue: BlackVarianceSurface is a sister class (they both derive from BlackVolTermStructure) and you have been already able to create a BlackVarianceSurface object > I am new to QuantlibXL and honestly have not too much idea about C++ > programming. [...] could you maybe give me some advice, how > to evaluate the BlackVarianceSurface object. If I am right, does that mean, > that I need to write a C++ function using functionality of QuantLib and add > it to the source of QLXL and build it? I appreciate any help. not exactly. Since the class is already exported (using C++ glue code) its interface can be exported just declaring it in an xml file, e.g.: <Member name='qlBlackVolTermStructureBlackVariance' type='QuantLib::BlackVolTermStructure' superType='libraryClass'> <description>Returns the black spot variance at a given option date and strike.</description> <libraryFunction>blackVariance</libraryFunction> <SupportedPlatforms> <SupportedPlatform name='Excel'/> </SupportedPlatforms> <ParameterList> <Parameters> <Parameter name='OptionDate' exampleValue = '1Y'> <type>QuantLib::Date</type> <tensorRank>scalar</tensorRank> <description>The date at which the variance is evaluated.</description> </Parameter> <Parameter name='Strike' exampleValue = '5%'> <type>QuantLib::Real</type> <tensorRank>scalar</tensorRank> <description>The strike at which the variance is evaluated.</description> </Parameter> <Parameter name='AllowExtrapolation' const='False' default='false'> <type>bool</type> <tensorRank>scalar</tensorRank> <description>Extrapolation Flag (TRUE allows extrapolation).</description> </Parameter> </Parameters> </ParameterList> <ReturnValue> <type>QuantLib::Real</type> <tensorRank>scalar</tensorRank> </ReturnValue> </Member> ciao -- Nando
------------------------------------------------------------------------------ Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Hey guys,
thanks a lot for your time.
@nando
>not exactly. Since the class is already exported (using C++ glue code) its interface can be exported just declaring it in >an xml file
Does that mean I will have to build the source using the new interface definitions in the .xml file? I tried to understand the compilation instructions on the QuantLib AddIn homepage, but there is only a note about
the possibility of customizing the build with xml metadata by re-running gensrc, but there is nothing about how.
Thanks in advance
Timofej
Von: [hidden email] [[hidden email]] im Auftrag von Ferdinando Ametrano [[hidden email]] Gesendet: Freitag, 22. Januar 2010 18:20 An: Kasakow, Timofej Cc: [hidden email] Betreff: Re: [Quantlib-users] QuantlibXL Variance Surface On Tue, Jan 5, 2010 at 1:24 PM, Kasakow, Timofej <[hidden email]> wrote:
> I got an assignment to build an Excel Tool, based on functions > in QuantlibXL to create and evaluate a Variance Surface. I succeeded > to create an object of a class BlackVarianceSurface, but I don't know, how > to move on. I read all of the documentation to QLXL and found no function, > which uses such an object for input. I suspect this is because the > functionality of QLXL is limited and the functions using this objects are > not yet implemented. You're right, that class constructor has been exported to Excel, but not its base class interface. So it's never been used or documented... I cleaned up some improper QuantLibAddin inheritance for TermStructure derived classes in http://quantlib.svn.sourceforge.net/viewvc/quantlib?view=rev&revision=17027, and then in http://quantlib.svn.sourceforge.net/viewvc/quantlib?view=rev&revision=17028 I exported BlackVolTermStructure interface and added an example workbook. The example workbook uses BlackConstantVol, but this is not an issue: BlackVarianceSurface is a sister class (they both derive from BlackVolTermStructure) and you have been already able to create a BlackVarianceSurface object > I am new to QuantlibXL and honestly have not too much idea about C++ > programming. [...] could you maybe give me some advice, how > to evaluate the BlackVarianceSurface object. If I am right, does that mean, > that I need to write a C++ function using functionality of QuantLib and add > it to the source of QLXL and build it? I appreciate any help. not exactly. Since the class is already exported (using C++ glue code) its interface can be exported just declaring it in an xml file, e.g.: <Member name='qlBlackVolTermStructureBlackVariance' type='QuantLib::BlackVolTermStructure' superType='libraryClass'>
<description>Returns the black spot variance at a given option date and strike.</description> <libraryFunction>blackVariance</libraryFunction> <SupportedPlatforms> <SupportedPlatform name='Excel'/> </SupportedPlatforms> <ParameterList> <Parameters> <Parameter name='OptionDate' exampleValue = '1Y'> <type>QuantLib::Date</type> <tensorRank>scalar</tensorRank> <description>The date at which the variance is evaluated.</description> </Parameter> <Parameter name='Strike' exampleValue = '5%'> <type>QuantLib::Real</type> <tensorRank>scalar</tensorRank> <description>The strike at which the variance is evaluated.</description> </Parameter> <Parameter name='AllowExtrapolation' const='False' default='false'> <type>bool</type> <tensorRank>scalar</tensorRank> <description>Extrapolation Flag (TRUE allows extrapolation).</description> </Parameter> </Parameters> </ParameterList> <ReturnValue> <type>QuantLib::Real</type> <tensorRank>scalar</tensorRank> </ReturnValue> </Member> ciao -- Nando
------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Free forum by Nabble | Edit this page |