Re: Implement Bermudan swaption in QuantLibXL

Posted by Hyung-Seok Hahm on
URL: http://quantlib.414.s1.nabble.com/Implement-Bermudan-swaption-in-QuantLibXL-tp291p302.html

Eric,

I'm still getting  "error C2664: Can't convert QuantLib::CalibrateModel::calibrate : 'const QuantLib::OptimizationMethod' to 'QuantLib::OptimizationMethod &'".

It kinda makes sense in that the superType of QuantLib::OptimizationMethod is set to underlyingClass in model.xml and according to supertypes.xml, 

    <!-- from ObjectHandler::Object to const QuantLib::xx & -->
    <SuperType name='underlyingClass' nativeType='string' conversionSuffix='LibObj' memberAccess='.'/>

underlyingClass is supposed to convert to the type of const QuantLib::xx &. If I'm right, can you suggest any other superType that converts to QuantLib::xx &

If not, please let me know what I'm missing.

Thanks for your help!

- Hyung

On Wed, Jul 25, 2012 at 7:56 PM, Eric Ehlers <[hidden email]> wrote:
P.S. Also in model.xml you need to change the return type of the
function to void.

On 2012-07-25 12:52, Eric Ehlers wrote:
> Hi Hyung,
>
> Thanks for your understanding :)
>
> Here is the fix:
>
> 1) model.xml
>
> For the three parameters OptimizationMethod, EndCriteria, and
> Constraint -
>
> Replace this:
>
>      <supertype> underlyingClass </supertype>
>
> With this:
>
>      <superType>underlyingClass</superType>
>
> And delete this:  default='""'
>
> Which should give you:
>
>            <Parameter name='OptimizationMethod'>
>              <type>QuantLib::OptimizationMethod</type>
>              <superType>underlyingClass</superType>
>              <tensorRank>scalar</tensorRank>
>              <description>OptimizationMethod object ID.</description>
>            </Parameter>
>            <Parameter name='EndCriteria'>
>              <type>QuantLib::EndCriteria</type>
>              <superType>underlyingClass</superType>
>              <tensorRank>scalar</tensorRank>
>              <description>EndCriteria object ID.</description>
>            </Parameter>
>            <Parameter name='Constraint'>
>              <type>QuantLib::Constraint</type>
>              <superType>underlyingClass</superType>
>              <tensorRank>scalar</tensorRank>
>              <description>Leave it blank.</description>
>            </Parameter>
>
> 2) QuantLibAddin\gensrc\metadata\rules\excel.xml
>
> In the RuleGroup called referenceConversions, add this line:
>
>      <Rule tensorRank='scalar' superType='underlyingClass'
> type='QuantLib::OptimizationMethod' codeID='code49'/>
>
> That should do the trick, it compiles for me.  Please let me know how
> it goes.
>
> Kind Regards,
> Eric
>
> ===================================================
> Eric Ehlers
> nazcatech sprl | Brussels | http://www.nazcatech.be
> * Distributed computing for pricing analytics
> * Use Microsoft Excel as a client to the Grid
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond.
> Discussions
> will include endpoint security, mobile security and the latest in
> malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> QuantLib-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-users

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users