This question is meant as a sanity check whether i got the workflow right for pricing callable bonds. If anyone finds a mistake, or has a suggestion, please answer.
The workflow is:
- For every call date calculate:
- The probability that the bond is called
- The plain vanilla price of the bond as if it had a maturity to the call date
- Calculate the weighted average price of the bond with the following code
`
# Assume a callable with call dates t = 1...T-1 and normal maturity T
# CallProps - Vec of Probabilities that the bond is called at times t
# FullPrices - Vec of prices of a bond if it had maturity at t, T.
NoCallProps = 1-CallProps
CumNoCallProps = c(1,cumprod(NoCallProps))
WeightedPrice = 0
for(i in 1:length(FullPrices))
{
WeightedPrice = WeightedPrice + CumNoCallProps[i] * (CallProps[i] * FullPrices[i])
}
`
The call propabilities are calculated by Monte Carlo:
- take the current yield and simulate rate development between now and the call date with a CIR process (taken from the MATLAB library and adapted to R)
- compare the yield at the call date with the coupon of the bond, and call, if the yield is lower than the coupon
- Calculate the average of the calls for the number of replications.