Question
I am having difficulty transitioning a bond value function into a coupon rate function. I believe it should be based around modifying the bond value
I am having difficulty transitioning a bond value function into a coupon rate function. I believe it should be based around modifying the bond value function, but I am not seeing the process. Any help would be appreciated. After writing the correct coupon rate function, I will have to verify it works with some known inputs.
The code I am using for this calculation are below:
t <- seq(1, 4, 1)
pv_factor <- 1 / (1 + 0.05)^t
bond_value <- 1157.449
c_rate <- (1157.449 - 1200 / (1+0.05)^4) / (1200*sum(pv_factor))
c_rate
[1] 0.0400001
but struggling on how to fit them all together, but here is what I have so far
c_rate <- function(bond_value, par, ttm, y) {
- t <- seq(1, ttm, 1)
- cf$t <- data.frame(t)
- cf$pv_factor <- data.frame(par / (1 + y)^t)
- cf$pv <- bond_value - cf$pv_factor
- cf$calc <- 1 - (sum(cf$pv / cf$pv_factor))
- }
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started