%% Price a Convertible Bond Using an ITT Tree and Incorporate Default Risk Using DefaultProbability and RecoveryRate
% Price a convertible bond using the following data for an ITTTree from deriv.mat.

load deriv.mat

%
% Use cbondbyitt to price a convertible bond using an ITT trinomial tree with the optional DefaultProbability and RecoveryRate arguments.

CouponRate = 0.05;
Settle = 'Jan-1-2006';
Maturity = 'Jan-1-2008';
Period = 1;
CallStrike = 65;
CallExDates = 'Jan-1-2007';
ConvRatio = 1;
DefaultProbability = .30;
RecoveryRate = .82;

[Price,PriceTree,EqtTre,DbtTree] = cbondbyitt(ITTTree,CouponRate,Settle,Maturity,ConvRatio,...
'Period',Period,'CallExDates',CallExDates,'CallStrike',CallStrike,'AmericanCall',1,...
'DefaultProbability',DefaultProbability,'RecoveryRate',RecoveryRate)

% Copyright 2012 The MathWorks, Inc.