Approximate yield to maturity formula. The following formula assumes semi-annual coupon payments.