% % Written by: % -- % John L. Weatherwax 2006-12-31 % % email: wax@alum.mit.edu % % Please send comments and especially bug reports to the % above email address. % %----- clc; close all; alpha = .05; beta = .1; vol = 0.25; expry = 1.0; % a year from now period = 0.25; % quarterly fixedrate = 0.05; NRS = 15; NTS = 30; NRS = 15; NTS = 225; % should be O(NRS^2) for convergence [H,r,t] = IAR3D(alpha,beta,vol,expry,fixedrate,period,NRS,NTS); mesh( t, r, H ); xlabel('time'); ylabel('spot rate (r)'); zlabel('IARS'); title('The function H(r,t) for an index amortizing rate swap'); saveas(gcf,'../../WriteUp/Graphics/Chapter38/dup_H_r_t.eps', 'epsc');