@@ -194,6 +194,12 @@ YieldCurve::InterpolationMethod parseYieldCurveInterpolationMethod(const string&
194194 return YieldCurve::InterpolationMethod::Quadratic;
195195 else if (s == " LogQuadratic" )
196196 return YieldCurve::InterpolationMethod::LogQuadratic;
197+ else if (s == " LogNaturalCubic" )
198+ return YieldCurve::InterpolationMethod::LogNaturalCubic;
199+ else if (s == " LogFinancialCubic" )
200+ return YieldCurve::InterpolationMethod::LogFinancialCubic;
201+ else if (s == " LogCubicSpline" )
202+ return YieldCurve::InterpolationMethod::LogCubicSpline;
197203 else if (s == " Hermite" )
198204 return YieldCurve::InterpolationMethod::Hermite;
199205 else if (s == " CubicSpline" )
@@ -242,6 +248,12 @@ std::ostream& operator<<(std::ostream& out, const YieldCurve::InterpolationMetho
242248 return out << " Quadratic" ;
243249 else if (m == YieldCurve::InterpolationMethod::LogQuadratic)
244250 return out << " LogQuadratic" ;
251+ else if (m == YieldCurve::InterpolationMethod::LogNaturalCubic)
252+ return out << " LogNaturalCubic" ;
253+ else if (m == YieldCurve::InterpolationMethod::LogFinancialCubic)
254+ return out << " LogFinancialCubic" ;
255+ else if (m == YieldCurve::InterpolationMethod::LogCubicSpline)
256+ return out << " LogCubicSpline" ;
245257 else if (m == YieldCurve::InterpolationMethod::Hermite)
246258 return out << " Hermite" ;
247259 else if (m == YieldCurve::InterpolationMethod::CubicSpline)
@@ -442,9 +454,10 @@ YieldCurve::piecewisecurve(vector<QuantLib::ext::shared_ptr<RateHelper>> instrum
442454 typedef PiecewiseYieldCurve<ZeroYield, Cubic, QuantExt::IterativeBootstrap> my_curve;
443455 yieldts = QuantLib::ext::make_shared<my_curve>(
444456 asofDate_, instruments, zeroDayCounter_,
445- Cubic (CubicInterpolation::Spline, false , CubicInterpolation::SecondDerivative, 0.0 , CubicInterpolation::SecondDerivative, 0.0 ),
446- my_curve::bootstrap_type (accuracy, globalAccuracy, dontThrow, maxAttempts, maxFactor,
447- minFactor, dontThrowSteps));
457+ Cubic (CubicInterpolation::Spline, false , CubicInterpolation::SecondDerivative, 0.0 ,
458+ CubicInterpolation::SecondDerivative, 0.0 ),
459+ my_curve::bootstrap_type (accuracy, globalAccuracy, dontThrow, maxAttempts, maxFactor, minFactor,
460+ dontThrowSteps));
448461 } break ;
449462 case InterpolationMethod::Quadratic: {
450463 typedef PiecewiseYieldCurve<ZeroYield, QuantExt::Quadratic, QuantExt::IterativeBootstrap> my_curve;
@@ -461,6 +474,31 @@ YieldCurve::piecewisecurve(vector<QuantLib::ext::shared_ptr<RateHelper>> instrum
461474 my_curve::bootstrap_type (accuracy, globalAccuracy, dontThrow, maxAttempts, maxFactor,
462475 minFactor, dontThrowSteps));
463476 } break ;
477+ case InterpolationMethod::LogNaturalCubic: {
478+ typedef PiecewiseYieldCurve<ZeroYield, LogCubic, QuantExt::IterativeBootstrap> my_curve;
479+ yieldts = QuantLib::ext::make_shared<my_curve>(
480+ asofDate_, instruments, zeroDayCounter_, LogCubic (CubicInterpolation::Kruger, true ),
481+ my_curve::bootstrap_type (accuracy, globalAccuracy, dontThrow, maxAttempts, maxFactor,
482+ minFactor, dontThrowSteps));
483+ } break ;
484+ case InterpolationMethod::LogFinancialCubic: {
485+ typedef PiecewiseYieldCurve<ZeroYield, LogCubic, QuantExt::IterativeBootstrap> my_curve;
486+ yieldts = QuantLib::ext::make_shared<my_curve>(
487+ asofDate_, instruments, zeroDayCounter_,
488+ LogCubic (CubicInterpolation::Kruger, true , CubicInterpolation::SecondDerivative, 0.0 ,
489+ CubicInterpolation::FirstDerivative),
490+ my_curve::bootstrap_type (accuracy, globalAccuracy, dontThrow, maxAttempts, maxFactor, minFactor,
491+ dontThrowSteps));
492+ } break ;
493+ case InterpolationMethod::LogCubicSpline: {
494+ typedef PiecewiseYieldCurve<ZeroYield, LogCubic, QuantExt::IterativeBootstrap> my_curve;
495+ yieldts = QuantLib::ext::make_shared<my_curve>(
496+ asofDate_, instruments, zeroDayCounter_,
497+ LogCubic (CubicInterpolation::Spline, false , CubicInterpolation::SecondDerivative, 0.0 ,
498+ CubicInterpolation::SecondDerivative, 0.0 ),
499+ my_curve::bootstrap_type (accuracy, globalAccuracy, dontThrow, maxAttempts, maxFactor, minFactor,
500+ dontThrowSteps));
501+ } break ;
464502 case InterpolationMethod::DefaultLogMixedLinearCubic: {
465503 typedef PiecewiseYieldCurve<ZeroYield, DefaultLogMixedLinearCubic, QuantExt::IterativeBootstrap> my_curve;
466504 yieldts = QuantLib::ext::make_shared<my_curve>(
@@ -565,6 +603,31 @@ YieldCurve::piecewisecurve(vector<QuantLib::ext::shared_ptr<RateHelper>> instrum
565603 my_curve::bootstrap_type (accuracy, globalAccuracy, dontThrow, maxAttempts, maxFactor,
566604 minFactor, dontThrowSteps));
567605 } break ;
606+ case InterpolationMethod::LogNaturalCubic: {
607+ typedef PiecewiseYieldCurve<Discount, LogCubic, QuantExt::IterativeBootstrap> my_curve;
608+ yieldts = QuantLib::ext::make_shared<my_curve>(
609+ asofDate_, instruments, zeroDayCounter_, LogCubic (CubicInterpolation::Kruger, true ),
610+ my_curve::bootstrap_type (accuracy, globalAccuracy, dontThrow, maxAttempts, maxFactor,
611+ minFactor, dontThrowSteps));
612+ } break ;
613+ case InterpolationMethod::LogFinancialCubic: {
614+ typedef PiecewiseYieldCurve<Discount, LogCubic, QuantExt::IterativeBootstrap> my_curve;
615+ yieldts = QuantLib::ext::make_shared<my_curve>(
616+ asofDate_, instruments, zeroDayCounter_,
617+ QuantLib::LogCubic (CubicInterpolation::Kruger, true , CubicInterpolation::SecondDerivative, 0.0 ,
618+ CubicInterpolation::FirstDerivative),
619+ my_curve::bootstrap_type (accuracy, globalAccuracy, dontThrow, maxAttempts, maxFactor, minFactor,
620+ dontThrowSteps));
621+ } break ;
622+ case InterpolationMethod::LogCubicSpline: {
623+ typedef PiecewiseYieldCurve<Discount,LogCubic, QuantExt::IterativeBootstrap> my_curve;
624+ yieldts = QuantLib::ext::make_shared<my_curve>(
625+ asofDate_, instruments, zeroDayCounter_,
626+ LogCubic (CubicInterpolation::Spline, false , CubicInterpolation::SecondDerivative, 0.0 ,
627+ CubicInterpolation::SecondDerivative, 0.0 ),
628+ my_curve::bootstrap_type (accuracy, globalAccuracy, dontThrow, maxAttempts, maxFactor, minFactor,
629+ dontThrowSteps));
630+ } break ;
568631 case InterpolationMethod::DefaultLogMixedLinearCubic: {
569632 typedef PiecewiseYieldCurve<Discount, DefaultLogMixedLinearCubic, QuantExt::IterativeBootstrap> my_curve;
570633 yieldts = QuantLib::ext::make_shared<my_curve>(
@@ -669,6 +732,31 @@ YieldCurve::piecewisecurve(vector<QuantLib::ext::shared_ptr<RateHelper>> instrum
669732 my_curve::bootstrap_type (accuracy, globalAccuracy, dontThrow, maxAttempts, maxFactor,
670733 minFactor, dontThrowSteps));
671734 } break ;
735+ case InterpolationMethod::LogNaturalCubic: {
736+ typedef PiecewiseYieldCurve<ForwardRate, LogCubic, QuantExt::IterativeBootstrap> my_curve;
737+ yieldts = QuantLib::ext::make_shared<my_curve>(
738+ asofDate_, instruments, zeroDayCounter_, LogCubic (CubicInterpolation::Kruger, true ),
739+ my_curve::bootstrap_type (accuracy, globalAccuracy, dontThrow, maxAttempts, maxFactor, minFactor,
740+ dontThrowSteps));
741+ } break ;
742+ case InterpolationMethod::LogFinancialCubic: {
743+ typedef PiecewiseYieldCurve<ForwardRate, LogCubic, QuantExt::IterativeBootstrap> my_curve;
744+ yieldts = QuantLib::ext::make_shared<my_curve>(
745+ asofDate_, instruments, zeroDayCounter_,
746+ LogCubic (CubicInterpolation::Kruger, true , CubicInterpolation::SecondDerivative, 0.0 ,
747+ CubicInterpolation::FirstDerivative),
748+ my_curve::bootstrap_type (accuracy, globalAccuracy, dontThrow, maxAttempts, maxFactor, minFactor,
749+ dontThrowSteps));
750+ } break ;
751+ case InterpolationMethod::LogCubicSpline: {
752+ typedef PiecewiseYieldCurve<ForwardRate, LogCubic, QuantExt::IterativeBootstrap> my_curve;
753+ yieldts = QuantLib::ext::make_shared<my_curve>(
754+ asofDate_, instruments, zeroDayCounter_,
755+ LogCubic (CubicInterpolation::Spline, false , CubicInterpolation::SecondDerivative, 0.0 ,
756+ CubicInterpolation::SecondDerivative, 0.0 ),
757+ my_curve::bootstrap_type (accuracy, globalAccuracy, dontThrow, maxAttempts, maxFactor, minFactor,
758+ dontThrowSteps));
759+ } break ;
672760 case InterpolationMethod::DefaultLogMixedLinearCubic: {
673761 typedef PiecewiseYieldCurve<ForwardRate, DefaultLogMixedLinearCubic, QuantExt::IterativeBootstrap> my_curve;
674762 yieldts = QuantLib::ext::make_shared<my_curve>(
0 commit comments