Posted by
Eric Ehlers-2 on
URL: http://quantlib.414.s1.nabble.com/Implement-Bermudan-swaption-in-QuantLibXL-tp291p303.html
Hi Hyung,
On 2012-07-26 03:07, Hyung-Seok Hahm wrote:
> 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 &?
There isn't one, because the cases where we need a non-const reference
are so rare that we didn't get around to defining the relevant
supertype.
Instead we use supertype underlyingClass, then implement a little
override as I described in my previous message:
> 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'/>
This works already for QuantLib::SequenceStatistics and you could refer
to that example.
I implemented the fix for your code and it seems to work. Attached are
the files that I changed as explained in my previous message. To try
this out, please:
- Do a clean install of 1.1 (full build) as explained here:
http://quantlib.org/quantlibaddin/build_qlxl.html- Detach the attached file to C:/build_ql_1_1_0/patch.zip and
uncompress it there.
- Build C:/build_ql_1_1_0/QuantLibXL/QuantLibXL_full_vc9.sln
That should do it, any problems please let me know.
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