%% Create a Vanilla Swap Instrument
% Create a vanilla swap using market data.
% Use the following market data to create a swap instrument.

LegRate = [0.065, 0]
Settle = 'jan-1-2007';    
Maturity = 'jan-1-2012';
LegReset = [1, 1];
Basis = 0
Principal = 100    
LegType = [1, 0]   

InstSet = instswap(LegRate, Settle, Maturity, LegReset, Basis, Principal, LegType)

%
% View the swap instrument using instdisp.

instdisp(InstSet)

% Copyright 2015 The MathWorks, Inc.