|
Hello, i am a newbie at Matlab, i am searching for a function to cover my needs.
It is about bond yield, its maturity, face value and price.
A function that, y =yield(price, cr, maturity, cf, fv) that takes bond price, coupon rate, coupon frequency, maturity and face value, and returns the yield to maturity of the corresponding bond.
I could do something like
c./((1+y).^t)
(-t(m,:)./(1+y(m,:)))./((1+y(m,:)).^t(m,:))
but i couldn't solve the whole problem.
Is there any script that can be useful for y =yield(price, cr, maturity, cf, fv)? Thanks in advance.
|
"Ersen Selvi" <ersen.se...@yahoo.com>
3/10/2010 12:59:06 PM
|