Enum convention in QuantlibAddin

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

Enum convention in QuantlibAddin

igitur
Hi,

I want to implement some more classes in the add-in. What is the convention for specifying enum parameters? I see some conflicting examples.

In termstructures.xml , for qlInterpolatedYieldCurve, the InterpolatorID is defined as a string and there is a complicated parsing algorithm to convert that to an enum. But according to http://quantlib.org/quantlibaddin/extend_enum_tutorial.html the parameters can be declared as enums directly in the XML.

There is also a commented out qlPiecewiseYieldCurveImprovements section in piecewiseyieldcurve.xml. I assume this is work in progress. This part also uses the enum way.

How should I proceed?

thanks
Francois Botha

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: Enum convention in QuantlibAddin

Eric Ehlers-2
Hello,

> In termstructures.xml , for qlInterpolatedYieldCurve, the InterpolatorID is
> defined as a string and there is a complicated parsing algorithm to convert
> that to an enum.

That is a special case where enumerations in the addin are converted  
into templates in C++.

> But according to
> http://quantlib.org/quantlibaddin/extend_enum_tutorial.html the parameters
> can be declared as enums directly in the XML.

That would be the usual way to do it.

> How should I proceed?

I guess it depends on your requirements.  I would start by attempting  
the approach explained in the documentation, if that doesn't do what  
you want then you might need to customize it.

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


------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev