# QuantLib_CubicBSplinesFitting man page

CubicBSplinesFitting — CubicSpline B-splines fitting method.

## Synopsis

`#include <ql/termstructures/yield/nonlinearfittingmethods.hpp>`

Inherits FittedBondDiscountCurve::FittingMethod.

### Public Member Functions

CubicBSplinesFitting (const std::vector< Time > &knotVector, bool constrainAtZero=true, const Array &weights=Array(), boost::shared_ptr< OptimizationMethod > optimizationMethod=boost::shared_ptr< OptimizationMethod >(), const Array &l2=Array())
CubicBSplinesFitting (const std::vector< Time > &knotVector, bool constrainAtZero, const Array &weights, const Array &l2)
Real basisFunction (Integer i, Time t) const
cubic B-spline basis functions
std::auto_ptr< FittedBondDiscountCurve::FittingMethod > clone () const
clone of the current object

## Detailed Description

CubicSpline B-splines fitting method.

Fits a discount function to a set of cubic B-splines \$ N_{i,3}(t) \$, i.e., [ d(t) = sum_{i=0}^{n} c_i * N_{i,3}(t) ]

See: McCulloch, J. 1971, 'Measuring the Term Structure of Interest Rates.' Journal of Business, 44: 19-31

McCulloch, J. 1975, 'The tax adjusted yield curve.' Journal of Finance, XXX811-30

Warning

"The results are extremely sensitive to the number and location of the knot points, and there is no optimal way of selecting them.' James, J. and
N. Webber, 'Interest Rate Modelling" John Wiley, 2000, pp. 440.

Examples: FittedBondCurve.cpp.

## Author

Generated automatically by Doxygen for QuantLib from the source code.

## Referenced By

The man pages basisFunction(3) and CubicBSplinesFitting(3) are aliases of QuantLib_CubicBSplinesFitting(3).

Mon Apr 30 2018 Version 1.12.1 QuantLib