quoted.price <- 99
coupon <- 6
xtContractValue(quoted.price, coupon)
xtTickValue(quoted.price, coupon)
## convexity
quoted.price <- seq(90, 100, by = 0.1)
plot(100 - quoted.price,
xtContractValue(quoted.price, coupon),
xlab = "Yield", ylab = "Contract value")
Run the code above in your browser using DataLab