Yield to maturity and realized compound yield calculation