Displaying 1 result from an estimated 1 matches for "no_comp".
Did you mean:
lo_comp
2010 Feb 02
2
Yield to Maturity using R
...he answer as 9.601.
## _____________________________________________________________
I was just trying to generalize this solution to any equation and accordingly written a code as given below.
The following input I will be reading using csv file and thus my equation will change if tenure or no_comp etc. changes. So taking into account the variable nature of the input, I am trying to write a generalized code.
## Input
price = 101 # Price of bond
tenure = 3
no_comp = 1 # no of times coupon paid in a year.
coupon_rate = 0.10 # i.e. 10%
face_value = 100
# Computations...