After falling for five weeks, mortgage rates rose this week. According to data from Freddie Mac released on Thursday, the 30-year fixed-rate mortgage averaged 6.39% in the week ending April 20, up from 6.27% the previous week.

A year ago, the 30-year fixed-rate was 5.11%. Freddie Mac’s chief economist, Sam Khater, noted that shifting market expectations contributed to the rise. He added that while home prices have somewhat stabilized, affordable housing remains a serious issue due to supply constraints and rates above 6%.

Mortgage rates have been above 5% for all but one week over the past year, and since reaching 7.08% in November, have been trending down since early March. The average mortgage rate is based on applications from thousands of lenders and includes only borrowers with excellent credit who put 20% down.

This week, mortgage rates increased as a result of 10-year Treasury yields going up. The larger economic environment, including factors such as inflation, employment data, banking stability, and the actions of the Federal Reserve, influence mortgage rates. Recent economic data shows a still-resilient, but cooling economy, leading many to believe the Fed will raise the target rate at next month’s meeting.

Although the Fed does not directly set interest rates for mortgages, its actions affect them, as mortgage rates tend to track the yield on 10-year US Treasury bonds. Homebuyers are very sensitive to weekly changes in mortgage rates, which led to a decrease in mortgage applications last week. The lack of housing inventory is also keeping many prospective buyers on the sidelines.

The CEO of the Mortgage Bankers Association expects mortgage rates to fall to around 5.5% by the end of this year, but more housing supply is needed to improve affordability and meet demand. The rise in mortgage rates, inflation, and home prices last year led many buyers to retreat from the housing market. Nevertheless, buyer demand shows signs of improvement with each gain in affordability. Despite this, many buyers are still waiting on the sidelines until the cost of purchasing a home becomes more doable.