JavaScript Bond Calculator

The purpose of this calculator is to provide calculations and details for bond valuation problems.
It is assumed that all bonds pay interest semi-annually.
Future versions of this calculator will allow for different interest frequency.

Instructions: Fill in the spaces that correspond to the number of years, maturity, coupon rate, and yield-to-maturity,
followed by clicking on the "Compute" button.
The calculator will provide the rest.
The coupon rate and yield-to-maturity can be entered as whole numbers or in decimals.

Bond Inputs
Number of years to maturity
Coupon rate
Face value
Yield to maturity
BOND VALUE
Calculator Details
Number of cash flows N
Amount of cash flow PMT
Yield per six months i
Future value FV
Solve for PV There are five variables in a bond valuation problem.
Using a financial calculator requires that you type in the four known elements
(N, PMT, I, and FV)
and solve for the one unknown, the present value (PV).
Computational Details
Present value of interest
Periodic cash flow
Present value annuity factor
Present value of face value
Face value
Discount factor
The value a bond today is the sum of the present value of the interest payments (valued as an ordinary annuity)
and the present value of the face value (discounted as a lump-sum):
PV = [ S CFt/(1 + i)t] + [FV / (1 + i)t]

Conclusion

Further business analysis samples of Interest Rates and Bond Prices

Future Value of Annuity

FV = C + C( 1 + r ) + C ( 1 + r )2 + ... + C( 1 + r )n - 1 = C [((1+r)n-1)/r]
where C is the cashflow
and n is the number of cashflows.

Net Present Value of Annuity

NPV = C / (1 + r) + C / (1 + r)2 + ... + C / (1 + r)n = C { 1 - [1/(1+r)n] / r }
where C is the cashflow
and n is the number of cashflows.

Continuous Compounding

From compounding m times per year to continuous compounding:
rc = m * ln( 1 + rm / m )
From continuous compounding to compounding m times per year:
rm = m( erc / m - 1 )

Example

Interest Rate8% per annuum
CompoundingQuarterly(4)
rc = 4 * ln ( 1 + 0.08 / 4 ) = 0.0792 = 7.92%

Next, consider an interest rate that is quoted 12% per annum with continuous compounding.
The equivalent rate with annual compounding is
r1 = 1 (e0.12/1 - 1 ) 0.1275 = 12.75%

Compounding Frequency

From compounding m times per year to annual compounding:
r = (1 + rm / m) m - 1
From annual compounding to compounding m times per annum:
rm = m * [ (1 + r)(1/m) - 1 ]

Example

Interest Rate8% per annuum
CompoundingQuarterly(4)
The equivalent rate with annual compounding is
r = ( 1 + 0.08 / 4 )4 - 1 = 0.0824 = 8.24%

From m to n compoundings per annum:
The formula below can ber used to transform a rate rn with n compoundings per year
to a rate rm with m compoundings per year
rn = n * [ ( 1 + rm / m )m/n - 1 ]

Example

Consider a rate with compounding frequency four times per year.
If the rate is 7% then the equivalent rate with semiannual compounding:
r2 = 2 * [ ( 1 + 0.07 / 4 )4/2 - 1 ] = 0.0706
The equivalent rate with semiannual compounding is 7.06%

Wilmott Online Technical Forum For Derivative Experts