When you take out a home loan, you may assume that your lender is looking to make money off the mortgage interest you'll be paying for years to come. The fact is, very few mortgage lenders work that way.

What most of them do is turn around and sell your mortgage to investors via the secondary market. Those investors are the ones who are looking to get paid regularly by the interest charged on the mortgage loans they hold. The lenders typically make their money through the fees they charge for originating the loan.

This arrangement provides several benefits. For one, by selling the mortgage loans they originate, the lenders obtain a fresh infusion of cash that they can use to make more mortgages. They couldn't write nearly as many mortgages if they had to keep those loans on their books and wait for the mortgage payments to come trickling in.

Second, the mortgages are typically sold to investors through entities like Fannie Mae, Freddie Mac or the FHA. They not only require that the loans they handle meet certain standards, but also provide certain guarantees on them as well – which makes them safer and more attractive to investors.

Third, because these guarantees make mortgages a more reliable investment, the investors are willing to accept lower returns as a result – which means lower mortgage rates for borrowers. The efficiencies of scale provided by this arrangement also helps produce lower home loan interest rates.

Here's a look at the process in more detail:

What happens to your mortgage after you sign?

The mortgage lender that funds your loan is called the originator. A loan originator may be a bank, a credit union, or other type of financial institution.

Once the mortgage is issued, the originator has the option of keeping that loan in its portfolio or selling it on the secondary market. If the originator keeps the loan, it makes money by way of the interest you pay each month. If the loan is sold, the originator replenishes its funds, and can make more loans to other homebuyers and earn money off the origination fees.

Basically, the secondary market investors keep funds circulating so that loan originators don't run out of money for new mortgages.

What do Fannie Mae and Freddie Mac do?

Today's secondary market investors include government-chartered companies like Fannie Mae and Freddie Mac, plus insurance companies, pension funds, and securities dealers. Although Fannie Mae and Freddie Mac are different organizations, they participate in similar activities.

Fannie and Freddie can buy mortgages, and can bundle mortgages together for resale in what's called mortgage-backed securities (MBS). These are highly liquid investments, meaning that they can be readily bought and sold.

Investors want to earn the best return possible. The level of return is determined by the current and anticipated condition of the economy. When the economy is on an upswing, future yields are expected to be better than current yields. Investors, therefore, will hold off buying until higher yields materialize. This drives home mortgage interest rates up, because lenders cannot sell their loans at lower yields.

Conversely, when the economy is in a downturn, investors buy up what's available to avoid being stuck with lower yields later. This pushes mortgage rates down, as investors are clamoring to buy before yields get too low.

Keeping your eye on mortgage rates

There are many factors that influence mortgage loan rates, including unemployment and inflation levels, trends in the stock and bond markets, and the federal funds rate. None of these alone will give you surefire insight into the future of rates, but by keeping your eye on all of them, you can have some sense where they are headed.

As mentioned earlier, the secondary mortgage market provides liquidity for the mortgage industry, by allowing investors to buy the aforementioned mortgage-backed securities, which pay a competitive yield relative to the risk involved.

Treasury bonds are backed by the U.S. government and used as a benchmark, and are considered the safest debt securities available. The yields on mortgage-backed securities, therefore, need to be higher than intermediate-term Treasury bonds in order to make them desirable to investors, who are assuming a higher risk. Therefore, changes in Treasury bond yields can foreshadow changes in mortgage rates before they actually occur.

The Fed's role in mortgage rates

Another metric to keep your eye on is the Federal funds rate, which is the rate that banks charge when they make an overnight sale to other banks of the money that they keep deposited at the Federal Reserve (the Fed).

The Fed funds rate is set during meetings of its Federal Open Market Committee (FOMC), which regulates the buying and selling of U.S. Treasuries and federal agency securities. The FOMC holds eight meetings each year, where they review economic and financial conditions, and decide the best course of action to take to set monetary policy and keep the economy stable.

A decrease in the rate will stimulate growth, and an increase will slow growth. Therefore, in periods of high inflation, the FOMC may raise interest rates, and in a period where they need to stimulate the economy, they will lower them. At each meeting, they will either lower, raise, or maintain the Fed funds rate. Their decision will impact mortgage rates.

The Fed funds rate is intermeshed with the stock market, because stock market trends influence – and are influenced by – the Fed funds rate. If the market is struggling and in a downward trend, the FOMC may opt to reduce the fed funds rate and free up the supply of money. Conversely, if the market is on a tear, the Fed may increase the rate in order to keep the economy from overheating.