Code covered by the BSD License
function [newParams] = getNewNelsonsiegelParams(oldParams, t) %getNewNelsonsiegelParams Helper function that returns new NelsonSeigel %parameters % -------------------------------------------------------------------------- % Author: Sri Krishnamurthy,CFA % Contact: skrishna@mathworks.com % Copyright 1984-2013 The MathWorks, Inc. mu = 0; sigma = 1; rho = 0.03; sigmai = [.02 .025 0.02]; covMatrix = [sigma^2,rho*sigma*sigma;rho*sigma*sigma,sigma^2]; X = [randn mvnrnd([0,0],covMatrix)]; newParams = [oldParams(1:end-1)*t + sigmai.*X oldParams(end)]; end
Contact us