{"id":4181,"date":"2023-05-01T15:56:31","date_gmt":"2023-05-01T22:56:31","guid":{"rendered":"https:\/\/jeremywhittaker.com\/?p=4181"},"modified":"2023-05-01T20:09:22","modified_gmt":"2023-05-02T03:09:22","slug":"analysis-of-house-prices-and-interest-rates-the-path-to-equilibrium-using-python-and-fred","status":"publish","type":"post","link":"https:\/\/new.jeremywhittaker.com\/index.php\/2023\/05\/01\/analysis-of-house-prices-and-interest-rates-the-path-to-equilibrium-using-python-and-fred\/","title":{"rendered":"Analysis of House Prices and Interest Rates: The Path to Equilibrium Using Python and FRED"},"content":{"rendered":"\n<p>There is always discussion surrounding the trajectory of house prices. At the core of these debates lies the principle of consumer affordability, which is heavily influenced by monthly mortgage payments. I developed a Python program that models the interaction between house prices and mortgage interest rates, utilizing historical data from the FRED (Federal Reserve Economic Data) API.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/new.jeremywhittaker.com\/wp-content\/uploads\/2023\/05\/image-1.png\"><img decoding=\"async\" width=\"1024\" height=\"614\" data-src=\"https:\/\/new.jeremywhittaker.com\/wp-content\/uploads\/2023\/05\/image-1-1024x614.png\" alt=\"\" class=\"wp-image-4192 lazyload\" data-srcset=\"https:\/\/new.jeremywhittaker.com\/wp-content\/uploads\/2023\/05\/image-1-1024x614.png 1024w, https:\/\/new.jeremywhittaker.com\/wp-content\/uploads\/2023\/05\/image-1-300x180.png 300w, https:\/\/new.jeremywhittaker.com\/wp-content\/uploads\/2023\/05\/image-1-768x461.png 768w, https:\/\/new.jeremywhittaker.com\/wp-content\/uploads\/2023\/05\/image-1-1536x922.png 1536w, https:\/\/new.jeremywhittaker.com\/wp-content\/uploads\/2023\/05\/image-1-500x300.png 500w, https:\/\/new.jeremywhittaker.com\/wp-content\/uploads\/2023\/05\/image-1.png 1675w\" data-sizes=\"(max-width: 1024px) 100vw, 1024px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1024px; --smush-placeholder-aspect-ratio: 1024\/614;\" \/><\/a><\/figure>\n\n\n\n<p>The program employs several functions to extract mortgage rates and average house price data from FRED, calculate monthly mortgage payments, and adjust house values based on interest rates. The final output is a chart illustrating the adjusted house values in relation to mortgage rates and median sales prices over time.<\/p>\n\n\n\n<p>The Python code and the corresponding chart offer an in-depth tool for analyzing the impact of mortgage rates on house values and evaluating the sustainability of current market conditions. Based on the models the current median sales price is overvalued by ~38.4%<\/p>\n\n\n\n<p>Code Overview:<\/p>\n\n\n\n<p>The code is organized into several functions that fetch data from the FRED (Federal Reserve Economic Data) API, calculate monthly mortgage payments, and plot the adjusted house values. Here&#8217;s a brief overview of the main functions:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><code>get_historical_mortgage_rates()<\/code>: Fetches historical mortgage rates data from FRED.<\/li>\n\n\n\n<li><code>calculate_monthly_mortgage()<\/code>: Calculates the monthly mortgage payment for a given price, year, and month.<\/li>\n\n\n\n<li><code>adjusted_house_value()<\/code>: Calculates the house value for other dates based on the mortgage payment amount and interest rates.<\/li>\n\n\n\n<li><code>get_average_house_prices()<\/code>: Fetches average house prices data from FRED.<\/li>\n\n\n\n<li><code>adjusted_house_value_median_sales_price()<\/code>: Combines the adjusted house value calculations with the median sales price data and plots the results.<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>import datetime\nimport pandas as pd\nfrom fredapi import Fred\nfrom config import api_key\nimport datetime\nimport numpy as np\nfrom dateutil.relativedelta import relativedelta\nimport plotly.graph_objs as go\nimport plotly.io as pio\nimport plotly.subplots as sp\nimport plotly.offline as pyo\n\n\n\ndef get_historical_mortgage_rates(api_key, series_id, start_date=None, end_date=None):\n    fred = Fred(api_key=api_key)\n    mortgage_rates = fred.get_series(series_id, start_date, end_date)\n    mortgage_rates = pd.DataFrame(mortgage_rates).reset_index()\n    mortgage_rates.columns = &#91;\"date\", \"rate\"]\n    mortgage_rates&#91;\"year_month\"] = mortgage_rates&#91;\"date\"].apply(lambda x: x.strftime(\"%Y-%m\"))\n    mortgage_rates_dict = mortgage_rates.set_index(\"year_month\")&#91;\"rate\"].to_dict()\n    return mortgage_rates_dict\n\n\ndef calculate_monthly_mortgage(price, year, month, mortgage_rate_data):\n    # Create year-month string\n    year_month = f\"{year}-{month:02d}\"\n\n    # Find the corresponding mortgage rate for the given year and month\n    if year_month in mortgage_rate_data:\n        mortgage_rate = mortgage_rate_data&#91;year_month]\n    else:\n        raise ValueError(f\"No mortgage rate data found for {year}-{month}\")\n\n    # Calculate the monthly interest rate\n    monthly_interest_rate = (mortgage_rate \/ 100) \/ 12\n\n    # Calculate the number of payments for a 30-year mortgage\n    num_payments = 30 * 12\n\n    # Calculate the monthly mortgage payment using the formula\n    # M = P &#91;r(1 + r)^n] \/ &#91;(1 + r)^n \u2013 1]\n    monthly_payment = price * (monthly_interest_rate * (1 + monthly_interest_rate) ** num_payments) \/ (\n                (1 + monthly_interest_rate) ** num_payments - 1)\n\n    return monthly_payment\ndef adjusted_house_value(price, index_date, mortgage_rate_data):\n    # Calculate the mortgage payment for the given index date\n    index_year = index_date.yearY\n    index_payment = calculate_monthly_mortgage(price, index_year, index_month, mortgage_rate_data)\n\n    # Calculate the house value for other dates based on the mortgage payment amount and the interest rates\n    house_values = {}\n    for year_month, rate in mortgage_rate_data.items():\n        year, month = map(int, year_month.split('-'))\n        date = datetime.date(year, month, 1)\n        house_value = index_payment * ((1 + monthly_interest_rate)**num_payments - 1) \/ (monthly_interest_rate * (1 + monthly_interest_rate)**num_payments)\n        house_values&#91;date] = house_value\n\n    # Plot the house values\n    dates = sorted(house_values.keys())\n    values = &#91;house_values&#91;date] for date in dates]\n\n    # Create the plot using Plotly\n    fig = go.Figure()\n\n    fig.add_trace(go.Scatter(x=dates, y=values, mode=\"lines\", name=\"Adjusted House Value\"))\n\n    # Mark the index date and value with a vertical dot\n    index_value = house_values&#91;index_date]\n    fig.add_trace(go.Scatter(x=&#91;index_date], y=&#91;index_value], mode=\"markers\", marker=dict(color=\"red\", size=8), name=f\"Index Value (${index_value:.2f})\"))\n\n    fig.update_layout(title=\"Adjusted House Value Based on Mortgage Payment\", xaxis_title=\"Date\", yaxis_title=\"House Value ($)\")\n\n    # Show the plot\n    pio.show(fig)\n    pyo.plot(fig, filename=\"output.html\", auto_open=False)\n\n\ndef get_average_house_prices(api_key, series_id, start_date=None, end_date=None):\n    fred = Fred(api_key=api_key)\n    average_house_prices = fred.get_series(series_id, start_date, end_date)\n    average_house_prices = pd.DataFrame(average_house_prices).reset_index()\n    average_house_prices.columns = &#91;\"date\", \"price\"]\n    average_house_prices&#91;\"year_month\"] = average_house_prices&#91;\"date\"].apply(lambda x: x.strftime(\"%Y-%m\"))\n    average_house_prices_dict = average_house_prices.set_index(\"year_month\")&#91;\"price\"].to_dict()\n    return average_house_prices_dict\n\ndef adjusted_house_value_median_sales_price(index_date, mortgage_rate_data, average_house_prices):\n    index_year = index_date.year\n    index_month = index_date.month\n    index_price = average_house_prices.get(f\"{index_year}-{index_month:02d}\", None)\n    if index_price is None:\n        previous_date = None\n        for year_month in sorted(average_house_prices.keys()):\n            year, month = map(int, year_month.split(\"-\"))\n            if datetime.date(year, month, 1) &gt; index_date:\n                break\n            previous_date = year_month\n        if previous_date is None:\n            raise ValueError(\"No median sales price data found for the specified date or any prior date.\")\n        index_price = average_house_prices&#91;previous_date]\n\n    if index_price == 0:\n        raise ValueError(f\"No median sales price data found for {index_year}-{index_month:02d}\")\n    index_payment = calculate_monthly_mortgage(index_price, index_year, index_month, mortgage_rate_data)\n\n    house_values = {}\n    for year_month, rate in mortgage_rate_data.items():\n        year, month = map(int, year_month.split('-'))\n        date = datetime.date(year, month, 1)\n\n        monthly_interest_rate = (rate \/ 100) \/ 12\n        num_payments = 30 * 12\n        house_value = index_payment * ((1 + monthly_interest_rate)**num_payments - 1) \/ (monthly_interest_rate * (1 + monthly_interest_rate)**num_payments)\n        house_values&#91;date] = house_value\n\n    dates = sorted(house_values.keys())\n    adjusted_values = &#91;house_values&#91;date] for date in dates]\n    average_prices = &#91;average_house_prices.get(date.strftime(\"%Y-%m\"), None) for date in dates]\n\n    # Replace missing values with the previous non-missing value\n    previous_value = None\n    for i in range(len(average_prices)):\n        if average_prices&#91;i] is not None:\n            previous_value = average_prices&#91;i]\n        else:\n            average_prices&#91;i] = previous_value\n\n    fig = sp.make_subplots(rows=2, cols=1, shared_xaxes=True, vertical_spacing=0.1,\n                           subplot_titles=(\"Adjusted House Value Based on Mortgage Payment and Median Sales Price\",\n                                           \"30-Year Fixed Rate Mortgage Average in the United States \/ Effective Federal Funds Rate\",\n                                           ),\n                           specs=&#91;&#91;{\"secondary_y\": True}], &#91;{\"secondary_y\": True}]])\n\n    # Add the main plot trace to the subplots figure\n    fig.add_trace(go.Scatter(x=dates, y=adjusted_values, mode=\"lines\", name=\"Adjusted House Value\"), row=1, col=1)\n    fig.add_trace(go.Scatter(x=dates, y=average_prices, mode=\"lines\", name=\"Median Sales Price\"), row=1, col=1, secondary_y=True)\n    fig.add_trace(go.Scatter(x=&#91;index_date], y=&#91;index_price], mode=\"markers\", marker=dict(color=\"red\", size=8),\n                             name=f\"Index Value (${index_price:.2f})\"), row=1, col=1, secondary_y=True)\n\n    # Add traces for mortgage rates and federal funds rates\n    fig.add_trace(go.Scatter(x=dates, y=mortgage_rates, mode=\"lines\", name=\"Mortgage Rates\"), row=2, col=1)\n    fig.add_trace(go.Scatter(x=dates, y=federal_funds_rates, mode=\"lines\", name=\"Federal Funds Rates\"), row=2, col=1, secondary_y=True)\n\n    # Update the layout for the subplots figure\n    fig.update_layout(title=\"Adjusted House Value Based on Mortgage Payment and Median Sales Price\",\n                      xaxis_title=\"Date\", yaxis_title=\"Adjusted House Value ($)\")\n\n    fig.update_yaxes(title_text=\"Median Sales Price ($)\", secondary_y=True, row=1, col=1)\n    fig.update_yaxes(title_text=\"Mortgage Rates (%)\", row=2, col=1)\n    fig.update_yaxes(title_text=\"Federal Funds Rates (%)\", secondary_y=True, row=2, col=1)\n\n    pio.show(fig)\n    pyo.plot(fig, filename=\"output.html\", auto_open=False)\n\n\nif __name__ == '__main__':\n    start_date = datetime.date(1972, 1, 1)\n    end_date = datetime.date(2023, 5, 1)\n    price = 449300\n    # index_date = datetime.date(2022, 4, 1)\n    index_date = datetime.date(2023, 4, 1)\n\n    # Fetch data for the two new subplots\n    historical_mortgage_rates = get_historical_mortgage_rates(api_key, 'MORTGAGE30US', start_date, end_date)\n    average_house_prices = get_average_house_prices(api_key, 'MSPUS', start_date, end_date)\n    federal_funds_rates = get_historical_mortgage_rates(api_key, 'FEDFUNDS', start_date, end_date)\n\n    dates = sorted(set(list(historical_mortgage_rates.keys()) + list(average_house_prices.keys()) + list(federal_funds_rates.keys())))\n    dates = &#91;datetime.datetime.strptime(date, \"%Y-%m\").date() for date in dates]\n\n    mortgage_rates = &#91;historical_mortgage_rates.get(date.strftime(\"%Y-%m\"), None) for date in dates]\n    federal_funds_rates = &#91;federal_funds_rates.get(date.strftime(\"%Y-%m\"), None) for date in dates]\n\n    monthly_mortgage_payment = calculate_monthly_mortgage(price, index_date.year, index_date.month, historical_mortgage_rates)\n    print(f\"Monthly mortgage payment: ${monthly_mortgage_payment:.2f}\")\n\n    adjusted_house_value_median_sales_price(index_date, historical_mortgage_rates, average_house_prices)\n\n\n<\/code><\/pre>\n\n\n\n<p>This code does require a config.py file with a reference to your own FRED API key which can be obtained here &#8211; https:\/\/fredaccount.stlouisfed.org\/apikeys<br><br>api_key = &#8216;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&#8217;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There is always discussion surrounding the trajectory of house prices. At the core of these debates lies the principle of consumer affordability, which is heavily influenced by monthly&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4181","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Analysis of House Prices and Interest Rates: The Path to Equilibrium Using Python and FRED - Jeremy Whittaker<\/title>\n<meta name=\"robots\" content=\"noindex, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Analysis of House Prices and Interest Rates: The Path to Equilibrium\" \/>\n<meta property=\"og:description\" content=\"Python code to generate the adjusted value of median sales price of houses historically based on interest rates.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/new.jeremywhittaker.com\/index.php\/2023\/05\/01\/analysis-of-house-prices-and-interest-rates-the-path-to-equilibrium-using-python-and-fred\/\" \/>\n<meta property=\"og:site_name\" content=\"Jeremy Whittaker\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/WhittakerJeremy\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/WhittakerJeremy\" \/>\n<meta property=\"article:published_time\" content=\"2023-05-01T22:56:31+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-05-02T03:09:22+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/new.jeremywhittaker.com\/wp-content\/uploads\/2023\/05\/charts.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1610\" \/>\n\t<meta property=\"og:image:height\" content=\"952\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"JeremyWhittaker\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"Analysis of House Prices and Interest Rates: The Path to Equilibrium\" \/>\n<meta name=\"twitter:description\" content=\"Python code to generate the adjusted value of median sales price of houses historically based on interest rates.\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/new.jeremywhittaker.com\/wp-content\/uploads\/2023\/05\/charts.png\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"JeremyWhittaker\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/new.jeremywhittaker.com\/index.php\/2023\/05\/01\/analysis-of-house-prices-and-interest-rates-the-path-to-equilibrium-using-python-and-fred\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/new.jeremywhittaker.com\/index.php\/2023\/05\/01\/analysis-of-house-prices-and-interest-rates-the-path-to-equilibrium-using-python-and-fred\/\"},\"author\":{\"name\":\"JeremyWhittaker\",\"@id\":\"https:\/\/new.jeremywhittaker.com\/#\/schema\/person\/ed0edfdefb3e180693efef453372980c\"},\"headline\":\"Analysis of House Prices and Interest Rates: The Path to Equilibrium Using Python and FRED\",\"datePublished\":\"2023-05-01T22:56:31+00:00\",\"dateModified\":\"2023-05-02T03:09:22+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/new.jeremywhittaker.com\/index.php\/2023\/05\/01\/analysis-of-house-prices-and-interest-rates-the-path-to-equilibrium-using-python-and-fred\/\"},\"wordCount\":291,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/new.jeremywhittaker.com\/#\/schema\/person\/ed0edfdefb3e180693efef453372980c\"},\"image\":{\"@id\":\"https:\/\/new.jeremywhittaker.com\/index.php\/2023\/05\/01\/analysis-of-house-prices-and-interest-rates-the-path-to-equilibrium-using-python-and-fred\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/new.jeremywhittaker.com\/wp-content\/uploads\/2023\/05\/image-1-1024x614.png\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/new.jeremywhittaker.com\/index.php\/2023\/05\/01\/analysis-of-house-prices-and-interest-rates-the-path-to-equilibrium-using-python-and-fred\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/new.jeremywhittaker.com\/index.php\/2023\/05\/01\/analysis-of-house-prices-and-interest-rates-the-path-to-equilibrium-using-python-and-fred\/\",\"url\":\"https:\/\/new.jeremywhittaker.com\/index.php\/2023\/05\/01\/analysis-of-house-prices-and-interest-rates-the-path-to-equilibrium-using-python-and-fred\/\",\"name\":\"Analysis of House Prices and Interest Rates: The Path to Equilibrium Using Python and FRED - Jeremy Whittaker\",\"isPartOf\":{\"@id\":\"https:\/\/new.jeremywhittaker.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/new.jeremywhittaker.com\/index.php\/2023\/05\/01\/analysis-of-house-prices-and-interest-rates-the-path-to-equilibrium-using-python-and-fred\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/new.jeremywhittaker.com\/index.php\/2023\/05\/01\/analysis-of-house-prices-and-interest-rates-the-path-to-equilibrium-using-python-and-fred\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/new.jeremywhittaker.com\/wp-content\/uploads\/2023\/05\/image-1-1024x614.png\",\"datePublished\":\"2023-05-01T22:56:31+00:00\",\"dateModified\":\"2023-05-02T03:09:22+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/new.jeremywhittaker.com\/index.php\/2023\/05\/01\/analysis-of-house-prices-and-interest-rates-the-path-to-equilibrium-using-python-and-fred\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/new.jeremywhittaker.com\/index.php\/2023\/05\/01\/analysis-of-house-prices-and-interest-rates-the-path-to-equilibrium-using-python-and-fred\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/new.jeremywhittaker.com\/index.php\/2023\/05\/01\/analysis-of-house-prices-and-interest-rates-the-path-to-equilibrium-using-python-and-fred\/#primaryimage\",\"url\":\"https:\/\/new.jeremywhittaker.com\/wp-content\/uploads\/2023\/05\/image-1.png\",\"contentUrl\":\"https:\/\/new.jeremywhittaker.com\/wp-content\/uploads\/2023\/05\/image-1.png\",\"width\":1675,\"height\":1005},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/new.jeremywhittaker.com\/index.php\/2023\/05\/01\/analysis-of-house-prices-and-interest-rates-the-path-to-equilibrium-using-python-and-fred\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/new.jeremywhittaker.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Analysis of House Prices and Interest Rates: The Path to Equilibrium Using Python and FRED\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/new.jeremywhittaker.com\/#website\",\"url\":\"https:\/\/new.jeremywhittaker.com\/\",\"name\":\"Jeremy Whittaker\",\"description\":\"Research, software, markets, housing, and energy\",\"publisher\":{\"@id\":\"https:\/\/new.jeremywhittaker.com\/#\/schema\/person\/ed0edfdefb3e180693efef453372980c\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/new.jeremywhittaker.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/new.jeremywhittaker.com\/#\/schema\/person\/ed0edfdefb3e180693efef453372980c\",\"name\":\"JeremyWhittaker\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/c8ac20e6dfa86b5f27ce9bffee4851099770cbea5ae7338a274865bfbc8c0218?s=96&d=retro&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c8ac20e6dfa86b5f27ce9bffee4851099770cbea5ae7338a274865bfbc8c0218?s=96&d=retro&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c8ac20e6dfa86b5f27ce9bffee4851099770cbea5ae7338a274865bfbc8c0218?s=96&d=retro&r=g\",\"caption\":\"JeremyWhittaker\"},\"logo\":{\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/c8ac20e6dfa86b5f27ce9bffee4851099770cbea5ae7338a274865bfbc8c0218?s=96&d=retro&r=g\"},\"sameAs\":[\"http:\/\/www.jeremywhittaker.com\",\"https:\/\/www.facebook.com\/WhittakerJeremy\",\"https:\/\/www.linkedin.com\/in\/jeremywhittaker\/\"],\"url\":\"https:\/\/new.jeremywhittaker.com\/index.php\/author\/jeremywhittaker\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Analysis of House Prices and Interest Rates: The Path to Equilibrium Using Python and FRED - Jeremy Whittaker","robots":{"index":"noindex","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"og_locale":"en_US","og_type":"article","og_title":"Analysis of House Prices and Interest Rates: The Path to Equilibrium","og_description":"Python code to generate the adjusted value of median sales price of houses historically based on interest rates.","og_url":"https:\/\/new.jeremywhittaker.com\/index.php\/2023\/05\/01\/analysis-of-house-prices-and-interest-rates-the-path-to-equilibrium-using-python-and-fred\/","og_site_name":"Jeremy Whittaker","article_publisher":"https:\/\/www.facebook.com\/WhittakerJeremy","article_author":"https:\/\/www.facebook.com\/WhittakerJeremy","article_published_time":"2023-05-01T22:56:31+00:00","article_modified_time":"2023-05-02T03:09:22+00:00","og_image":[{"width":1610,"height":952,"url":"https:\/\/new.jeremywhittaker.com\/wp-content\/uploads\/2023\/05\/charts.png","type":"image\/png"}],"author":"JeremyWhittaker","twitter_card":"summary_large_image","twitter_title":"Analysis of House Prices and Interest Rates: The Path to Equilibrium","twitter_description":"Python code to generate the adjusted value of median sales price of houses historically based on interest rates.","twitter_image":"https:\/\/new.jeremywhittaker.com\/wp-content\/uploads\/2023\/05\/charts.png","twitter_misc":{"Written by":"JeremyWhittaker","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/new.jeremywhittaker.com\/index.php\/2023\/05\/01\/analysis-of-house-prices-and-interest-rates-the-path-to-equilibrium-using-python-and-fred\/#article","isPartOf":{"@id":"https:\/\/new.jeremywhittaker.com\/index.php\/2023\/05\/01\/analysis-of-house-prices-and-interest-rates-the-path-to-equilibrium-using-python-and-fred\/"},"author":{"name":"JeremyWhittaker","@id":"https:\/\/new.jeremywhittaker.com\/#\/schema\/person\/ed0edfdefb3e180693efef453372980c"},"headline":"Analysis of House Prices and Interest Rates: The Path to Equilibrium Using Python and FRED","datePublished":"2023-05-01T22:56:31+00:00","dateModified":"2023-05-02T03:09:22+00:00","mainEntityOfPage":{"@id":"https:\/\/new.jeremywhittaker.com\/index.php\/2023\/05\/01\/analysis-of-house-prices-and-interest-rates-the-path-to-equilibrium-using-python-and-fred\/"},"wordCount":291,"commentCount":0,"publisher":{"@id":"https:\/\/new.jeremywhittaker.com\/#\/schema\/person\/ed0edfdefb3e180693efef453372980c"},"image":{"@id":"https:\/\/new.jeremywhittaker.com\/index.php\/2023\/05\/01\/analysis-of-house-prices-and-interest-rates-the-path-to-equilibrium-using-python-and-fred\/#primaryimage"},"thumbnailUrl":"https:\/\/new.jeremywhittaker.com\/wp-content\/uploads\/2023\/05\/image-1-1024x614.png","inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/new.jeremywhittaker.com\/index.php\/2023\/05\/01\/analysis-of-house-prices-and-interest-rates-the-path-to-equilibrium-using-python-and-fred\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/new.jeremywhittaker.com\/index.php\/2023\/05\/01\/analysis-of-house-prices-and-interest-rates-the-path-to-equilibrium-using-python-and-fred\/","url":"https:\/\/new.jeremywhittaker.com\/index.php\/2023\/05\/01\/analysis-of-house-prices-and-interest-rates-the-path-to-equilibrium-using-python-and-fred\/","name":"Analysis of House Prices and Interest Rates: The Path to Equilibrium Using Python and FRED - Jeremy Whittaker","isPartOf":{"@id":"https:\/\/new.jeremywhittaker.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/new.jeremywhittaker.com\/index.php\/2023\/05\/01\/analysis-of-house-prices-and-interest-rates-the-path-to-equilibrium-using-python-and-fred\/#primaryimage"},"image":{"@id":"https:\/\/new.jeremywhittaker.com\/index.php\/2023\/05\/01\/analysis-of-house-prices-and-interest-rates-the-path-to-equilibrium-using-python-and-fred\/#primaryimage"},"thumbnailUrl":"https:\/\/new.jeremywhittaker.com\/wp-content\/uploads\/2023\/05\/image-1-1024x614.png","datePublished":"2023-05-01T22:56:31+00:00","dateModified":"2023-05-02T03:09:22+00:00","breadcrumb":{"@id":"https:\/\/new.jeremywhittaker.com\/index.php\/2023\/05\/01\/analysis-of-house-prices-and-interest-rates-the-path-to-equilibrium-using-python-and-fred\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/new.jeremywhittaker.com\/index.php\/2023\/05\/01\/analysis-of-house-prices-and-interest-rates-the-path-to-equilibrium-using-python-and-fred\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/new.jeremywhittaker.com\/index.php\/2023\/05\/01\/analysis-of-house-prices-and-interest-rates-the-path-to-equilibrium-using-python-and-fred\/#primaryimage","url":"https:\/\/new.jeremywhittaker.com\/wp-content\/uploads\/2023\/05\/image-1.png","contentUrl":"https:\/\/new.jeremywhittaker.com\/wp-content\/uploads\/2023\/05\/image-1.png","width":1675,"height":1005},{"@type":"BreadcrumbList","@id":"https:\/\/new.jeremywhittaker.com\/index.php\/2023\/05\/01\/analysis-of-house-prices-and-interest-rates-the-path-to-equilibrium-using-python-and-fred\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/new.jeremywhittaker.com\/"},{"@type":"ListItem","position":2,"name":"Analysis of House Prices and Interest Rates: The Path to Equilibrium Using Python and FRED"}]},{"@type":"WebSite","@id":"https:\/\/new.jeremywhittaker.com\/#website","url":"https:\/\/new.jeremywhittaker.com\/","name":"Jeremy Whittaker","description":"Research, software, markets, housing, and energy","publisher":{"@id":"https:\/\/new.jeremywhittaker.com\/#\/schema\/person\/ed0edfdefb3e180693efef453372980c"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/new.jeremywhittaker.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/new.jeremywhittaker.com\/#\/schema\/person\/ed0edfdefb3e180693efef453372980c","name":"JeremyWhittaker","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/c8ac20e6dfa86b5f27ce9bffee4851099770cbea5ae7338a274865bfbc8c0218?s=96&d=retro&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/c8ac20e6dfa86b5f27ce9bffee4851099770cbea5ae7338a274865bfbc8c0218?s=96&d=retro&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c8ac20e6dfa86b5f27ce9bffee4851099770cbea5ae7338a274865bfbc8c0218?s=96&d=retro&r=g","caption":"JeremyWhittaker"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/c8ac20e6dfa86b5f27ce9bffee4851099770cbea5ae7338a274865bfbc8c0218?s=96&d=retro&r=g"},"sameAs":["http:\/\/www.jeremywhittaker.com","https:\/\/www.facebook.com\/WhittakerJeremy","https:\/\/www.linkedin.com\/in\/jeremywhittaker\/"],"url":"https:\/\/new.jeremywhittaker.com\/index.php\/author\/jeremywhittaker\/"}]}},"_links":{"self":[{"href":"https:\/\/new.jeremywhittaker.com\/index.php\/wp-json\/wp\/v2\/posts\/4181","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/new.jeremywhittaker.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/new.jeremywhittaker.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/new.jeremywhittaker.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/new.jeremywhittaker.com\/index.php\/wp-json\/wp\/v2\/comments?post=4181"}],"version-history":[{"count":0,"href":"https:\/\/new.jeremywhittaker.com\/index.php\/wp-json\/wp\/v2\/posts\/4181\/revisions"}],"wp:attachment":[{"href":"https:\/\/new.jeremywhittaker.com\/index.php\/wp-json\/wp\/v2\/media?parent=4181"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/new.jeremywhittaker.com\/index.php\/wp-json\/wp\/v2\/categories?post=4181"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/new.jeremywhittaker.com\/index.php\/wp-json\/wp\/v2\/tags?post=4181"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}