How can I price an existing bond using the FLOATBYZERO function in the Financial Derivatives Toolbox?

4 次查看(过去 30 天)
I would like to price the following bond using the FLOATBYZERO function:
The spread of the bond is 50bp. It is an existing floating bond which was issued two years ago. The last reset is 12/31/2004 and it will mature 12/31/2010. I would like to find the price of this bond on 4/5/2005.

采纳的回答

MathWorks Support Team
The following code uses the FLOATBYZERO function to meet the bond specification:
Spread = 50;
Maturity = '12-31-2010';
Settle = '04-05-2005';
RateData = [datenum('12/31/2004') datenum('6/30/2005') 2.78
datenum( '4/5/2005') datenum('10/5/2005') 3.38
datenum( '4/5/2005') datenum( '4/5/2006') 3.79
datenum( '4/5/2005') datenum( '4/5/2007') 4.16
datenum( '4/5/2005') datenum( '4/5/2008') 4.36
datenum( '4/5/2005') datenum( '4/5/2010') 4.59
datenum( '4/5/2005') datenum( '4/5/2012') 4.76
datenum( '4/5/2005') datenum( '4/5/2015') 4.94];
StartDates = RateData(:,1);
EndDates = RateData(:,2);
Rates = RateData(:,3) / 100;
RateSpec = intenvset('ValuationDate', '12-31-2004', 'StartDates',StartDates, 'EndDates', EndDates, 'Rates', Rates)
Price = floatbyzero(RateSpec, Spread, Settle, Maturity, 2)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Point Cloud Processing 的更多信息

产品


版本

R14SP2

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by