Financial Toolbox: Nelson Siegel & Svensson Fit Issue
Show older comments
I am currently having issues fitting the Svenson model to sovereign bonds at longer maturities (see image below). Short maturities match fairly well, but longer maturities tend to overestimate the current yields by a magnitude of 5-10 bps (this grows in tenor). Any help in understanding the MATLAB algorithm at work is greatly appreciated, or potentially helpful information on correcting this overestimation.

Attached code framework is shown below:
% modifying optimization engine for determining optimal fits
optOptions_ = optimset('TolFun', 1e-6, 'TolX', 1e-6, 'MaxFunEvals', 1e5, 'MaxIter', 1e5, 'Display', 'final');
b_0 = [ 6.00 -5.00 0.40 -0.50 3.50 1.50 ];
lb_ = [ -1.00 -inf -inf -inf 0.00 0.00 ];
ub_ = [ 25.0 inf inf inf inf inf ];
fitOptions_ss = IRFitOptions(b_0, 'FitType', 'price', 'LowerBound', lb_, ...
'UpperBound', ub_, 'OptOptions', optOptions_ );
% nominal bond data from Bloomberg, rows indicate dates, columns include active + non-active bonds
s = repmat(datenum(settle_date), [N 1]); % settlement date
m = datenum(Maturity{row, :}); % maturity date
p = price_data{row, :}'; % bond price
c = Coupon{row, :}'; % coupon rate
a = AccruedInterest{row, :}'; % accrued interest
i = datenum(IssueDate{row, :}); % issue date
bonds = [s, m, p-a, c, i];
% fit Svensson Model on more liquid nominal bonds
NSSModel = IRFunctionCurve.fitSvensson('Zero', settle_date, bonds(:, 1:4), 'IRFitOptions', fitOptions_ss);
Answers (0)
Categories
Find more on Yield Curves in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!