write a method belonging to the termstructure


Write a method (belonging to the TermStructure class) that takes a pointer to an array of bonds and an integer, representing the number of bonds in the array as arguments, and estimates the Nelson-Siegel yield curve, using nonlinear least square estimation.

In order to do the minimization, you will need to construct an object of type NLS, passing in a FitCalculator object, the number of parameters to solve for and the number of data points (bonds in our case) to the constructor. You?ll then need to create an array of initial parameter values (reasonable starting points for and pass those into the SOLVE() method of the NLS object.  If you created your TermStructure class as suggested above, SOLVE will exit with the parameters tuned to the term structure with the minimum error.

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: write a method belonging to the termstructure
Reference No:- TGS0266005

Expected delivery within 24 Hours