%% Create a Bond With an Embedded Option
% This example shows how to create a bond with an embedded option using the following data.

Settle = 'jan-1-2007';
Maturity   = 'jan-1-2010'; 
CouponRate = 0.07;
OptSpec = 'call'; 
Strike= 100;  
ExerciseDates= {'jan-1-2008' '01-Jan-2010'}; 
AmericanOpt=1;
Period = 1;

InstSet = instoptembnd(CouponRate, ...
Settle, Maturity, OptSpec, Strike,  ExerciseDates,'AmericanOpt', AmericanOpt, ...
'Period', Period);

% display the instrument
 instdisp(InstSet)

% Copyright 2015 The MathWorks, Inc.