Calculating interest rate in bonds

1 次查看(过去 30 天)
Hi there is a formula for calculating bonds value: To calculate a bond’s price, we can use the basic present value (PV) formula:
C = coupon payment
i = interest rate, or required yield
M = value at maturity (par value)
n = number of payments
In my situation I have every information except 'i' how can i write a program to calculate 'i'? is there any program in matlab? thank you

采纳的回答

Torsten
Torsten 2018-3-1
C = ...;
M = ...;
n = ...;
Bond_price = ...;
fun=@(i)C*(1./(1+i)-1./(1+i).^(n+1))./(1-1./(1+i)) + M./(1+i).^n - Bond_price;
i0 = 0.2;
sol_i = fzero(fun,i0)
sol_i is equal to the i in your equation if you give meaningful values to C, M, n and Bond_Price.
Hint for a derivation: Geometric series.
Best wishes
Torsten.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by