How do lenders set your mortgage rate? Well, actually they don't. While mortgage lenders control who gets approved for a loan and on what terms, the mortgage interest rates themselves are largely determined on the secondary market, where mortgages are bought and sold.
Fannie Mae and Freddie Mac, two large and influential mortgage investors, were founded by the government decades ago to help bring efficiency to the lending process. They and other mortgage investors buy loans that lenders make and either hold them in portfolio or bundle them with other loans into mortgage-backed securities. These are sold to Wall Street, mutual funds, and other financial investors, who trade them much the same as Treasury securities and bonds.
It is these financial investors in the secondary market, not mortgage lenders and brokers, who collectively determine the interest rate of your mortgage loan.
As with the stock market, interest rates in the secondary market tend to fluctuate. When the economy is on an upswing, investors demand higher yields, forcing lenders to raise mortgage rates. In a market downturn, rates tend to drop for consumers due to increased investor demand. Conventional wisdom is that interest rates move in cycles; after a prolonged increase, a slow drop usually occurs. Some use 10-year Treasury bonds as a barometer; when bonds go up, interest rates go down, and visa versa.
To obtain the best possible mortgage rate, track as many financial trends as possible for as long as possible and time the purchase of your home accordingly.