Calculating interest rate in bonds

1 visualizzazione (ultimi 30 giorni)
amir khalighi
amir khalighi il 1 Mar 2018
Risposto: Torsten il 1 Mar 2018
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

Risposta accettata

Torsten
Torsten il 1 Mar 2018
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.

Più risposte (0)

Categorie

Scopri di più su MATLAB in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by