On Monday, we looked at some basic terms used to describe bonds. At the end of the post, we saw the idea of accrued interest. Simply, when you buy a bond in the secondary market (after it has been issued), you pay accrued interest to the buyer  the interest earned since the last interest payment. The Treasury bond example we were considering paid interest on August 15 and February 15 (every 6 months) at a rate of 2.125%.
Assume we buy this bond today, approximately 30 days since the last interest payment. How much in accrued interest would we have to pay? It would be 10,000*.02125*(30/365) = $17.50. If you don't feel like pulling out your calculator, use the online calculator provided by
FINRA:

Source: FINRA Financial Industry Regulatory Authority 

   

CLICK ON IMAGE TO ENLARGE
If we buy this bond today and sell this bond next week (wow! we're big time bond traders!), we will get the accrued interest we paid back plus an additional 5 or 6 days, whatever the case may be.
Bond Yields and Prices
The yield on a bond and its price vary in opposite directions. This is a very simple concept that fools a lot of investors. The yield that is under consideration is the yieldtomaturity. This is important to grasp because there are a number of different yields pertaining to bonds: the coupon yield, the current yield, the yield at cost, etc.
The yieldtomaturity (YTM) is the most important for investors. People sometimes treat it as the return on the bond because it accounts for interest payments as well as the capital gain or loss at maturity. In strict terms, it isn't the return for the simple reason that interest payments will be received and return depends on the rate of interest at which those payments are invested. We, of course, don't know what those rates will be in the future. For example, the bond considered above pays interest of $112.50 every six months over the next 10 years. The return on the bond will depend on the rate at which those payments are reinvested.
To understand why bond prices and YTM move in opposite directions, we'll use two approaches. First, consider you giving me an amount now and me giving you $100 one year from now. If you give me $90 today, then the yield to you is 100/90 = 11.11%. If, instead, you give me $80, the yield would be 100/80 = 25%. If you gave me $95, the yield would be 100/95 = 5.26%. Putting these in a table, we get:
Price Yield
$80 25%
$90 11.11%
$95 5.26%
So, this is it. As the price goes up, the yield goes down  it's this simple. The more you have to pay for the $100 in the future, the lower the YTM. The more you pay for any bond, which is just a series of future payments, the lower its YTM.
Let's make this slightly more realistic by looking at how price is determined on a 3year bond. For this purpose, let's assume interest payments are made once a year. Assume the coupon interest is 4% and the principal amount is $100. Then the following payments will be made: $4 each year, including at maturity, along with the $100 principal at maturity. A key factor is that money to be received in the future has to be discounted back to the present to determine worth today:
$100 = 4/(1+YTM) + 4/(1+YTM)^2 + 4/(YTM)^3 + 100/(YTM)^3
Here I have assumed that the bond is at par  i.e., it probably was just issued. Notice that the discount rate is the YTM! In other words, the YTM is just a by product of the bond pricing formula. If the bond price was higher  $110.50, say  the YTM would automatically be lower and vice versa. Once you get this, the whole mystery about bonds goes out the window.
Just for kicks, let's think a moment about holding the bond to maturity. Assume we've bought the bond and that we are going to hold it for 3 years until it matures. Do we want (from a total return perspective) yields to rise or fall? The answer is rise because we want to be able to reinvest the interest payments at higher rates. While this is going on, the bond will fall in price as it is "markedtomarket" on our portfolio. Keep in mind, however, that the price of the bond will be par at maturity  this is what makes bonds different from stocks. Buy any stock, and 3 years from now we don't know what its price will be!
Corporate Bonds
I'm not a fan of retail investors buying individual bonds, as I will discuss later. Still I understand that some doityourselfers like to buy individual bonds. In the "do as I say not as I do" category, let me introduce a bond I bought some time ago before I started using funds:
CLICK ON IMAGE TO ENLARGE
At this point, you should be able to understand a lot about the Merck bond shown. You should be able to figure when interest payments are made (12/1 and 6/1 each year), how much they will be ($892.50), the maturity date (12/01/2028), the principal amount ($30,000), etc. You should even be able to tell what has happened to yields since the bond was issued.
Next time we go further into the world of bonds.