Login  Register

Re: Extending SWIG support for InterpolatedZeroCurve

Posted by grantathon on Nov 03, 2016; 11:09am
URL: http://quantlib.414.s1.nabble.com/Extending-SWIG-support-for-InterpolatedZeroCurve-tp17827p17852.html

I ran swig.cmd via the command line and realized I wasn't referencing swig.exe properly.  After editing swig.cmd to source swig.exe, I was able to generate LogLinearZeroCurve, CubicZeroCurve, ForwardFlatZeroCurve, BackwardFlatZeroCurve, and MonotonicCubicZeroCurve by adding

export_zero_curve(LogLinearZeroCurve,LogLinear);
export_zero_curve(CubicZeroCurve,Cubic);
export_zero_curve(ForwardFlatZeroCurve,ForwardFlat);
export_zero_curve(BackwardFlatZeroCurve,BackwardFlat);
export_zero_curve(MonotonicCubicZeroCurve,MonotonicCubic);

to zerocurve.i.  I can also use them in my C# applications now!

Unfortunately, I was not successful in generating LogCubicZeroCurve using

export_zero_curve(LogCubicZeroCurve,QuantLib::LogCubic);

nor

export_zero_curve(LogCubicZeroCurve,LogCubic);

due to some build errors in NQuantLibc.  The build errors and output are





Looks like they indicate that there are some private resource (requiredPoints and interpolate) within the LogCubic class.  However, when looking at the QuantLib code, both of those resources are made public (see LogCubic in loginterpolation.hpp).

Any ideas on how to resolve this issue?