|
From: Luigi B. <lui...@gm...> - 2014-02-01 15:37:53
|
Those are valid interpolations, but PiecewiseYieldCurve needs the corresponding traits class (i.e., the one that defines an interpolate() method that returns an Interpolation instance). For the various cubic interpolations, that would be the Cubic class. It maps to the various kinds of cubic depending on the parameters you use to create it. If you use, say, PiecewiseYieldCurve<Discount,Cubic> and just build it with the curve information (helpers etc), it will use the default parameters (which, I think, give you a Kruger cubic). If you create an instance of Cubic explicitly and pass it to the constructor of PiecewiseYieldCurve<Discount,Cubic> as the last, optional parameter, you'll get the corresponding cubic. You can see the parameters to use for each interpolation by looking at its constructor and checking what parameters it passes to the base CubicInterpolation class. Luigi On Wed, Jan 29, 2014 at 6:31 PM, jlee <jon...@gm...> wrote: > Got it to work your with suggestion. But have a related question. Is there a > list of available interpolation classes? I was able to get working: > > Discount, BackwardFlat > Discount, ForwardFlat > Discount, Linear > Discount, LogLinear > > but when i tried: > > CubicNaturalSpline > LogCubicNaturalSpline > MonotonicCubicNaturalSpline > KrugerCubic > FritschButlandCubic > Parabolic > LogParabolic > MonotonicParabolic > MonotonicLogParabolic > Abcd > Bilinear > Bicubic > > I get compile a error saying no default constructor. Are these valid methods > as these seems to be ones I've search around in the code. > > Thanks, > Jon > > > > -- > View this message in context: http://quantlib.10058.n7.nabble.com/PiecewiseYieldCurve-question-tp14918p14923.html > Sent from the quantlib-dev mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > WatchGuard Dimension instantly turns raw network data into actionable > security intelligence. It gives you real-time visual feedback on key > security issues and trends. Skip the complicated setup - simply import > a virtual appliance and go from zero to informed in seconds. > http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk > _______________________________________________ > QuantLib-dev mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-dev -- <https://implementingquantlib.blogspot.com> <https://twitter.com/lballabio> |