http://quantlib.414.s1.nabble.com/Exposing-GeneralizedHullWhite-in-QuantLibXL-tp14826.html
Dear all,
I am working on exposing GeneralizedHullWhite in QuantLibXL.
It was not terribly challenging until this step. Here is the .xml part. The problem is in the red.
<Constructor name='qlGeneralizedHullWhite'>
<libraryFunction>GeneralizedHullWhite</libraryFunction>
<SupportedPlatforms>
<!--SupportedPlatform name='Excel' calcInWizard='false'/-->
<SupportedPlatform name='Excel'/>
<SupportedPlatform name='Cpp'/>
</SupportedPlatforms>
<ParameterList>
<Parameters>
<Parameter name='YieldCurve' exampleValue ='EURYC'>
<type>QuantLib::YieldTermStructure</type>
<superType>libToHandle</superType>
<tensorRank>scalar</tensorRank>
<description>YieldTermStructure object ID.</description>
</Parameter>
<Parameter name='SpeedStructure' const='False' default='QuantLib::Date()'>
<type>QuantLib::Date</type>
<tensorRank>vector</tensorRank>
<description>Speed Structure</description>
</Parameter>
<Parameter name='VolStructure' const='False' default='QuantLib::Date()'>
<type>QuantLib::Date</type>
<tensorRank>vector</tensorRank>
<description>Vol Structure</description>
</Parameter>
<Parameter name='Speed' default='""'>
<type>QuantLib::Real</type>
<tensorRank>vector</tensorRank>
<description>Speed</description>
</Parameter>
<Parameter name='Vol' default='""'>
<type>QuantLib::Real</type>
<tensorRank>vector</tensorRank>
<description>Vol</description>
</Parameter>
</Parameters>
</ParameterList>
</Constructor>
The corresponding part of GeneralizedHullWhite.hpp in QuantLib is
boost::function<Real (Time)> speed() const;
boost::function<Real (Time)> vol() const;
As a result, when compiling, the following error message pops up.
error C2440: 'initializing' : cannot convert from 'boost::function<Signature>' to 'std::vector<_Ty>'
At this point, what has caused the error looks obvious. In .xml, the type is defined wrong.
<type>QuantLib::Real</type>
Then my question is what is the type definition in QuantLibXL that corresponds to boost::function<Signature> in QuantLib?
If anyone has a clue, please enlighten me. It would be tremendous help!
Thanks!
Hyungseok
Get a Quote or Start a Free Trial Today.