MATLAB: What solution method does the ZERO2PYLD function use in the Financial Toolbox

Financial Toolboxnielsonnielson-siegalsiegalyieldzero2pyld

What solution method does the ZERO2PYLD function use in the Financial Toolbox?

Best Answer

The method used for calculating the yield in ZERO2PYLD uses a method similar to the Nielson-Siegel method. The function use the idea of a nonlinear fitting method. It performs a nonlinear fit using the FSOLVE function. The equation that we try to fit the curve to is:
CashPrice = Sum_i { (Coupon_i/2) * (1+ZeroRate_i/2)^TimeFactor_i }
FSOLVE solves a system of nonlinear equations using an interior-reflective Newton method.