www.gusucode.com > fininst 案例源码程序 matlab代码 > fininst/PricePer100NotionalValueOfswapExample.m
%% Compute the Price Per $100 Notional Value of a Swap Given the Swap Rate % This example shows that a swap paying the par swap rate has a value of 0. %% % load the input data [EDFutData, textdata] = xlsread('EDdata.xls'); Settle = datenum('15-Oct-2002'); Tenor = 2; % compute the fixed rate from the Eurodollar data FixedSpec = liborfloat2fixed(EDFutData(:,1:3), Settle, Tenor) % compute the price of a par swap Price = liborprice(EDFutData(:,1:3), Settle, Tenor, FixedSpec.Coupon) %% % |Price| is effectively equal to 0.