Relationship Between Manhattan Real Estate Price and S&P 500 Stock Price

Luna
7 min readMay 16, 2021

Abstract: Because of the COVID-19, trillions of dollars have been printed to ease the economy, how to hedge against inflation becomes an important topic. Traditionally, real estate and the stock market are two asset classes for protection against inflation. This paper investigated the price relationship between Manhattan real estate and S&P 500 stock to serve as an investment reference. With the Hadoop MapReduce, I explored the 2005–2019 Manhattan real estate sales records and S&P 500 stock price records and did a price comparison. From the price comparison, even though the 15 years’ price trend was both increasing, there wasn’t any apparent monthly price correlation. Therefore, Manhattan real estate should be a good asset diversification to the stock market.

Keywords: Real Estate, S&P 500, Stock Market, Asset

I. Introduction

Fiat money is a store of value in the modern world. However, because of its centralized nature and unlimited supply, fiat money’s intrinsic value will be depreciated if the government issue too much of it. Under the economic crisis, issuing money is the government’s first reaction, as we have seen during the COVID-19 period. Questioning the future value of fiat money, people start to look for other more reliable assets as the store of value, like gold, real estate, bitcoin, and stock. Curious about these assets classes, I decided to draw insights from the relationship between Manhattan real estate and S&P 500 stock.

There are some studies about the relationship between real estate and stock prices around the world, mainly discussing the wealth effect and credit-price effects. However, there isn’t any specific study about the Manhattan real estate market. This study focused on and provided more insights into Manhattan real estate.

In this study, the data flow diagram is shown in Figure 1. In the first phase, I got the raw Manhattan real estate sale records and S&P 500 stock records. Following their corresponding schemas, I cleaned them up by Hadoop’s MapReduce. In the second phase, I used MapReduce to calculate the monthly average prices for Manhattan real estate and S&P 500 stock. In the final phase, I produced the data visualization by Tableau.

Figure 1: Data Flow Diagram

II. Motivation

Because of the loose monetary policy during COVID-19, I was into the inflation hedge asset investment. New York’s real estate market is one of the most expensive and complex real estate markets worldwide. Since I interact with New York City every day, its real estate market is an interesting asset to look into. I am also interested in the stock market since it is liquid and has great growth potential. I chose S&P 500 index because it is one of the most popular benchmarks to the U.S. stock market and the fund has outperformed the majority of active funds.

III. Related Work

  1. Wealth Effect and Credit-Price Effect

Panayotis Kapopoulos * & Fotios Siokis (2005) Stock and real estate prices in Greece: wealth versus ‘credit-price’ effect, Applied Economics Letters, 12:2, 125–128, DOI: 10.1080/1350485042000307107

This work presented how to use two classic mechanisms — wealth effect and credit-price effect — to interpret the relationship between real estate and stock prices. Wealth effect means households that gain capital from the increased stock market will be more attempt to buy real estate. The increase in demand will drive up the real estate price. The credit-price effect emphasizes the real estate serves as collateral to credit-constrained firms. The price rise in real estate will stimulate economic activities including investment in the stock market.

These two mechanisms inspired me to find the correlation between Manhattan real estate price and S&P 500 stock price.

2. Dataset Handling

Preethi Jayaraman (2018) NYC Property Sales Analysis, https://rstudio-pubs-static.s3.amazonaws.com/363900_342aa40e88404e2eaf9dbf95163c1cc6.html

This work used NYC real estate sales records to analyze trends about NYC real estate market boroughs like the most in-demand borough and the hottest buildings. Since we used the same dataset, it gave me ideas on the dataset schema design and data cleaning process.

IV. Datasets

  1. Manhattan Real Estate

The Manhattan real estate sales records dataset contains about 347487 sales records, and it should include all Manhattan property transactions from 2005–2019. This dataset was downloaded from NYC Department of Finance website.

There are twenty-one terms in the original datasets. However, we only need four of them in the schema as follows.

Field Name: TAX CLASS AT TIME OF SALE

Data Type: STRING

Brief Description: From <Glossary of Terms for Property Sales Files>

“Class 1: Includes most residential property of up to three units, vacant land that is zoned for residential use, and most condominiums that are not more than three stories.

Class 2: Includes all other property that is primarily residential, such as cooperatives and condominiums.”

Since this project focused on the residential real estate, I filtered and analyzed only Class 1 and 2 properties.

Field Name: GROSS SQUARE FEET

Data Type: DOUBLE

Brief Description: The total area of all floors of the property. Gross square feet is larger than the normal real estate listings’ net square feet. Therefore, in the later analysis, the average prices will be lower than the market listings’ average prices.

This project skipped the invalid data with value <=1.

Field Name: SALE PRICE

Data Type: DOUBLE

Brief Description: The sale price of the property.

This project skipped the invalid data with value <= 100.

Field Name: SALE DATE

Data Type: STRING

Brief Description: The property sale closing date.

2. S&P 500 Stock

The S&P 500 stock dataset contains about 3776 trading day stock records from 2005–2019. This dataset was downloaded from Wall Street Journal website’s S&P 500 historical prices section.

There are five terms: Date, Open, High, Low, Close in the original dataset. I chose three of them as the schema below.

Field Name: DATE

Data Type: STRING

Brief Description: The corresponding date of the stock price.

Field Name: HIGH

Data Type: DOUBLE

Brief Description: The highest price of the stock at a particular date.

Field Name: LOW

Data Type: DOUBLE

Brief Description: The lowest price of the stock at a particular date.

V. Analytics Stages

The data flow diagram is shown in Figure 1.

  1. Manhattan Real Estate

After the Manhattan real estate sales records dataset downloading, since the records were separated yearly, I merged them all into one file. First, I converted every year’s .xlxs file to a .csv file using Microsoft Excel’s export function. Then, I put all .csv files into one folder and run the command ‘copy *.csv HistoricalHousingPrices.csv’ in this folder to merge all separate .csv files into one HistoricalHousingPrices.csv file. After that, I uploaded HistoricalHousingPrices.csv onto the HDFS.

In the cleaning phase, I filtered out properties with tax classes other than Class 1 and Class 2, properties with invalid gross square feet value <=1, and properties with invalid sale price value <= 100. In addition, I only kept the sale date, gross square feet, and sale price columns. In this dataset, the date format was like 3/25/19. However, the same date in S&P 500 stock dataset was 03/25/19. To unitize the date format with the S&P 500 stock dataset, I changed all housing record dates also to the xx/xx/xx format by adding 0 to one-digit numbers.

In the calculation phase, I added all sales records’ gross square feet in the same month to get a monthly total gross square feet. Similarly, I added all sales records’ sale prices in the same month to get a monthly total sale price. Finally, I divided the monthly total sale price by the monthly total gross square feet to get a monthly average real estate price.

In the analytics phase, I used monthly average real estate prices from the previous phase to draw the Manhattan real estate price line chart.

2. S&P 500 Stock

I used the original file downloaded from the website as HistoricalStockPrices.csv and uploaded it onto the HDFS.

In the cleaning phase, I filtered out stock records with invalid high or low value. Here, the invalidity meant the price value wasn’t numerical. In addition, I only kept the record date, high, and low columns.

In the calculation phase, I first calculated the daily stock price by taking the average value of the high price and the low price. Then, I added all daily stock prices in the same month to get a monthly total stock price. Finally, I divide the monthly total stock price by the number of trading days this month to get a monthly average stock price.

In the analytics phase, I used monthly average stock prices from the previous phase to draw the S&P 500 stock price line chart.

In Figure 2, the Manhattan real estate price line chart is the upper orange one, and the S&P 500 stock price line chart is the lower green one.

Figure 2: Monthly Prices Visualization

VII. Conclusion

Under the loose monetary policy, real estate and stock are two important asset classes to hedge again the devaluation of fiat money. Investigating whether there is a relationship between the real estate price and the stock price provides essential investment insights to investors and households.

This paper is different from previous works by focusing on Manhattan real estate instead of the national-wide or global-wide real estate, and thus provides specific investment reference on the Manhattan real estate market. From the analysis result, from 2005–2019, Manhattan’s real estate price and S&P 500 stock price both had grown over time. However, on a monthly level, there wasn’t any apparent correlation between these two prices. Therefore, Manhattan real estate should be a great asset diversification to the U.S. stock market.

Future work can be done upon this paper in two ways. First, doing more in-depth analysis under the previous-mentioned two mechanisms — wealth effect and credit-price Effect. Second, dividing the dataset into higher granularity. For example, we can divide the Manhattan real estate into different price baskets or divide the S&P 500 stock records into individual stocks, and then analyze the correlation between Manhattan real estate and the U.S. stock market.

--

--