Get the weekly average 30-Year Fixed Rate Mortgage from FRED (Freddie Mac’s Primary Mortgage Market Survey).

The 30-year fixed mortgage rate is the primary interest rate US households actually borrow at for home purchases, and is one of the clearest single transmission points from Federal Reserve policy to the real economy: it moves with (but is not identical to) the 10-year Treasury yield plus a credit/prepayment spread, and directly drives housing affordability and demand. It is the natural interest-rate complement to Housing Starts (see get_housing_starts) - rate moves here lead construction activity, since higher borrowing costs price marginal buyers out of the market before builders scale back new projects.

The rate is weekly (week ending Thursday), returned as a decimal fraction per annum (0.0648 for 6.48%) and not seasonally adjusted. FRED publishes it in percentage points; it is rescaled here so that every rate the Finance Toolkit returns is a decimal fraction.

No API key is needed: without a FRED API key the data comes from Freddie Mac’s Primary Mortgage Market Survey directly, which gives the same figures. When a FRED API key is set (see the fred_api_key parameter of the Economics class), it comes from FRED.

See definition: https://fred.stlouisfed.org/series/MORTGAGE30US

Also known as: 30-year mortgage rate, Freddie Mac PMMS rate.

30-Year Mortgage Rate in Python or via the MCP

Install the Finance Toolkit with:

pip install financetoolkit -U

Then call get_mortgage_rate_30_year as shown below.

from financetoolkit import Economics

economics = Economics(start_date='2020-01-01', end_date="2025-12-31")

economics.get_mortgage_rate_30_year()

Or, after setting up the Finance Toolkit MCP, ask:

What was the average 30-year fixed US mortgage rate in each week of December 2025?

Which returns:

Date United States
2025-12-04 0.0619
2025-12-11 0.0622
2025-12-18 0.0621
2025-12-24 0.0618
2025-12-31 0.0615

Parameters

get_mortgage_rate_30_year accepts the following parameters.

ParameterTypeDescriptionExample
rollingintThe rolling window size to use for smoothing the data (simple moving average). Defaults to None.4
trailingintThe trailing window size to use for summing the data over trailing periods. Defaults to None.4
growthboolWhether to return the growth data or the actual data. Defaults to False.True
lagintThe number of periods to lag the data by. Defaults to 1.4
standardizeboolWhether to standardize (Z-Score) the result. When combined with growth=True, standardizes the growth values instead of the raw values. Defaults to False.True
roundingint | NoneThe number of decimals to round the results to. Defaults to None.2
Share