coupon bond pricing using cfprice() financial toolbox's function

1 view (last 30 days)
I want to calculate the price of a bond that gives a cash flow of 100$ the next year. The yield to maturity is 12.25%.
I haven't understood why these two calculation methods give different results. I guess I haven't understood how cfprice works
Settle = datenum('1-Jan-2000');
CFAmounts = 100;
CFDates = datenum('31-Dec-2000');
yield = 0.05;
price = cfprice(CFAmounts,CFDates,yield,Settle)
price2 = CFAmounts(1)/((1+yield)^1)
This is the output
>> cfpricetest
price =
95.1944
price2 =
95.2381
I expected the two prices to be equal
(The text of this exercise is adapted from "Financial markets and institutions" by Mishkin, page 43, 7th edition)

Answers (0)

Community Treasure Hunt

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

Start Hunting!