www.gusucode.com > fininst 案例源码程序 matlab代码 > fininst/PriceaVanillaBondExample.m
%% Price a Vanilla Bond % Price a 4% bond using a zero curve. % Copyright 2015 The MathWorks, Inc. %% % Load |deriv.mat|, which provides |ZeroRateSpec|, the interest-rate term % structure, needed to price the bond. load deriv.mat; CouponRate = 0.04; Settle = '01-Jan-2000'; Maturity = '01-Jan-2004'; Price = bondbyzero(ZeroRateSpec, CouponRate, Settle, Maturity)