The money that you borrow for your house comes from many sources, including deposits at banks but most of it comes from investors wanting to make safe but profitable investments.
In order to attract investors, the people who find investors to fund the money you need to buy your house, must compete with other investment opportunities to get their money. The advantage of investing in mortgages is a fixed rate of interest for about 10 years (usually how long it takes for you to sell or refinance your house) reasonably guaranteed by the market value of your house.
Mortgage interest rates have to satisfy two competing clients: investors (who supply the money), who want the highest possible return, and homebuyers (who demand the money), who want the lowest possible interest rate. So simultaneously rates need to be high enough to attract investors but low enough to attract borrowers away from competing investment opportunities.
The 10 Year US Treasury Bond is a strong competitor against mortgages since it is 100% guaranteed by the "full faith and credit" of the United States. Consequently mortgages, that carry a bit more risk, have to offer a higher interest rate to the investor to compensate for that risk.
These days there is very little interest in risky investments and a huge interest in safer ones such as Treasuries. As a result the Treasuries have been able to offer a near zero interest rate while still enjoying a lot of demand for their investment. This has enabled mortgages to drop their rates just as long as they are a little bit higher than what the Treasuries are offering to compensate for the added risk.
Another factor is the quantity of demand for money for houses that will be needed. Recently, when interest rates dropped suddenly it caused so many people to seek refinancing that there wasn’t enough investment money to supply the need; so consequently interest rates had to rise to attract more investors; which also had the adverse effect of lessening the demand for refinancing.
Inflation is another factor affecting mortgage interest rates. If an investor wants 4% return on his money but inflation is at 2%, then he will want 6% to compensate for the inflation. Since mortgages are at least 10 year investments, investors need to “guess” what the inflation rate will be. Their educated guesses affect the interest rates of mortgages.
Also, a nation’s overall economic conditions affect interest rates. If it seems that unemployment will be an issue, then the fear of mortgage defaults, missed payments, and foreclosures will have to be compensated to attract investors.
Contrary to popular belief, the Federal Reserve doesn't control mortgage rates. All they can do is influence the rate charged overnight by banks between banks to have just enough money to cover the federally required percentage of their deposits. But if banks are having to pay less for their loans then sometimes they lend money out to us for a bit less too.
Sometimes though, when the Federal Reserve cuts its rates dramatically, mortgage rates go up. That’s because people are guessing that the government thinks the banks are in trouble, and if the banks are in trouble then things can’t be good for the rest of us… or so the thinking goes..