Data Study on Financial Decisions in NYC

Posted on Mar 10, 2021
The skills I demoed here can be learned through taking Data Science with Machine Learning bootcamp with NYC Data Science Academy.

Link to app:

An embedded video of my presentation can be found at the bottom of this post.


Whether to buy property or continue renting in New York City is a financial decision with significant impact. Renting may appear more affordable on a month-to-month basis. However, there may be long-term financial benefit to buying property even if it can be capital-intensive. This app is meant to be an access to data and tool for New Yorkers to factor in their own financial situation in making this important decision.


This app will helps the user answer the following questions:

  1. What is the inventory of properties out there I can afford that is better than renting?
  2. What is the most expensive property I can afford (herein referred to as "best buy option"), and what will my recurring costs be?
  3. If I buy my best-buy option, after how many years will I be better off than if I had continued renting?


Buying Renting
  • accumulates as personal value
  • property value increases over time
  • requires big money up front
  • closing costs
  • lack of flexibility
  • personal responsbility to maintain
  • cheaper monthly payment
  • more cash for alternative investments
  • flexibility
  • rent payments are lost value

The data used for this model is a list of tax class 2 properties sold in Manhattan in 2019.ย Financial attractiveness is than evaluated within a 30-year horizon, which is a common mortgage lifetime.

In this model, we are making predictions on market distribution based on what 2019 looked like. How the coming years actually turn out could be different, so it is important to keep in mind that this model is only an estimate. Nevertheless, this model is most useful in evaluating how sensitive the rent-or-buy decision is to the provided parameters.ย 

Another key assumption is that user has enough saved for a down payment. In the rent option, this down payment value is assumed to be instead invested in alternate securities.

Source of Data

Data was taken from the New York City Department of Finance (link). Only the Manhattan data was used. From this dataset, only tax class 2 condos and co-ops were used.

Inputs in Modelling

There are several inputs used in the modelling.

  • Monthly housing budget: the amount of money you have available for either buying or renting. Any money left over after monthly rent or mortgage is assumed to be invested in alternate securities (i.e. index funds in the stock market).
  • Alternative monthly rent: how much you pay in rent monthly. The model will analyze properties that are more affordable than rental options with this monthly rent.
  • Mortgage rate: the annual rate your mortgage increases in value. This is usually the number that banks quote you. The monthly mortgage rate used in the model is calculated as (annual) mortgage rate / 12. There is some error in doing this, but it is not significant.
  • Income tax rate:ย determined by your income level. This will be used to calculate how much of a tax refund you get because mortgage interest payments are tax-deductible.
  • Down payment:ย The fraction of the sale price you pay at the time of purchase. A lot of properties require 20% minimum. Most banks have penalties for paying less than 20% down. Therefore, the model limits down payment to above 20%.
  • tax rate as percent of market value: calculation of the actual tax rate is complicated in New York City. To make the model simpler, use a tax rate suggested in this StreetEasy article.
  • common charges as percent of market value
  • Property value annual growth rate: the average annual rate the market value of propertie increases.
  • Alternative investment growth rate: the average annual growth rate of other investments such as stocks.
  • Closing costs:ย fees paid to brokers, lawyers, and taxes at time of purchase.

Price to Value Ratio

To help make a comparison between rentals and purchases, I used a price-to-value ratio (P/V ratio) over a 30-year period. P/V ratio is defined as the amount paid divided by the value of assets. The amount paid is simply the housing budget over 30 years. This table helps explain the P/V ratio:

ย  buy rent
price monthly housing budget*12*30 monthly housing budget*12*30
value future portfolio value of alt. investments and of property future portfolio value of alt. investments

For the rent option, price includes cash going to rent, and left-over cash going into alternative investments. For the buy option, price includes cash going to mortgage, taxes, and common charges, and left-over cash going into alternative investments.


The model takes the inputs and calculates a P/V ratio for all properties and outputs those that are within the monthly housing budget. A distribution of affordable buy options by P/V ratio is reported in figure 1. For comparision, a P/V ratio of the rent option is also provided.

Figure 2 plots P/V ratio vs. sale price. The best buy option is the property in this distrbution that has the highest sale price. The monthly mortgage, tax and common charges of this option is reported. At this point, questions 1 and 2 can be answered.

The financials of the best-buy option is further evaluated throughtout a 30-year period. Figure provides total personal value over the years for each scenario. For the rent option, total personal value is the value of the investment portfolio. FOr the buy option, it is the sum of investment portfolio and property value minus mortgage debt.

Figure 5 shows the cummulative cash out over the years.

  • rent option: - (rent payments)
  • buy option: - (interest + taxes + common charges) + tax refund

Figure 6 takes the ratio of data from the previous figures to explore how worthy each option is through the years.

Data Analysis

Default case

In the default case, there is a strong case to buy. Based on 2019 data, there should be a good number of properties in the market that are better than the rent option. It is also observed that the monthly housing budget is more limiting than the financial attractiveness of buy options. In other words, if you can afford to buy something, then it is highly likely that it is better than renting.

In the default case, the best buy option is a market value of $541,250 with monthly mortgage of $1,870.21, monthly taxes of $676.56 and monthly common charges of $451.04. Figures 4, 5 and 6 show that from the beginning, the buy option not only results in higher value but also requires less overall cash.

Sensitivity analysis

Let's say that we want to buy more expensive property without increasing ourย monthly budget. We can then look at properties that have a significant tax abatement such that the tax rate would only be 0.05%. Perhaps we may also receive a gift fund from parents that would enable a down payment of 50%. In this case, the best buy option shoots up to $988,000 with monthly mortgage of $2,133.69, monthly taxes of $41.17 and monthly common charges of $823.33.

What or how much to buy can be sensitive to the property value growth rate and the alternative investments growth rate. The the property value growth rate is below the alternative investment rate, figure 2 has a positive slope which suggests it is better to buy as cheap as possible. However, when the property value growth rate exceeds the alternative investment rate, the it would be more financially attractive to buyย as expensive as one can afford.

Finally, we can try to make a case for renting by adjusting the alternative investment rate. By setting this to 11% while the property value growth rate is at a default 4%, the financial picture is the same at the end of 30 years. This will be shown on figure 6. If the alternative investment rate increases further, then renting becomes more attractive sooner.


In general, if one can afford to buy, then it is better to buy. However, buying property requires significant capital cost for the down payment and closing costs. There is also the unquantified value of flexibility. When one buys property, then they are geographically less mobile to move to a different location that could perhaps provide a higher net income. This model also does not consider the quality of living and of the properties themselves. In general, this app should help the user provide bounds to their different financial scenarios and understand the sensitivity of their decision to the right factors.

About Author

Lorenzo Mangubat

I enable technologies to scale. My experience ranges from start-up development to high-volume manufacturing. I bring together structured problem-solving, data science, and operational discipline to drive improvements in products, processes and organizations.
View all posts by Lorenzo Mangubat >

Leave a Comment

No comments found.

View Posts by Categories

Our Recent Popular Posts

View Posts by Tags

#python #trainwithnycdsa 2019 2020 Revenue 3-points agriculture air quality airbnb airline alcohol Alex Baransky algorithm alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus ames dataset ames housing dataset apartment rent API Application artist aws bank loans beautiful soup Best Bootcamp Best Data Science 2019 Best Data Science Bootcamp Best Data Science Bootcamp 2020 Best Ranked Big Data Book Launch Book-Signing bootcamp Bootcamp Alumni Bootcamp Prep boston safety Bundles cake recipe California Cancer Research capstone car price Career Career Day citibike classic cars classpass clustering Coding Course Demo Course Report covid 19 credit credit card crime frequency crops D3.js data data analysis Data Analyst data analytics data for tripadvisor reviews data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization database Deep Learning Demo Day Discount disney dplyr drug data e-commerce economy employee employee burnout employer networking environment feature engineering Finance Financial Data Science fitness studio Flask flight delay gbm Get Hired ggplot2 googleVis H20 Hadoop hallmark holiday movie happiness healthcare frauds higgs boson Hiring hiring partner events Hiring Partners hotels housing housing data housing predictions housing price hy-vee Income Industry Experts Injuries Instructor Blog Instructor Interview insurance italki Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter las vegas airport lasso regression Lead Data Scienctist Lead Data Scientist leaflet league linear regression Logistic Regression machine learning Maps market matplotlib Medical Research Meet the team meetup methal health miami beach movie music Napoli NBA netflix Networking neural network Neural networks New Courses NHL nlp NYC NYC Data Science nyc data science academy NYC Open Data nyc property NYCDSA NYCDSA Alumni Online Online Bootcamp Online Training Open Data painter pandas Part-time performance phoenix pollutants Portfolio Development precision measurement prediction Prework Programming public safety PwC python Python Data Analysis python machine learning python scrapy python web scraping python webscraping Python Workshop R R Data Analysis R language R Programming R Shiny r studio R Visualization R Workshop R-bloggers random forest Ranking recommendation recommendation system regression Remote remote data science bootcamp Scrapy scrapy visualization seaborn seafood type Selenium sentiment analysis sentiment classification Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau teachers team team performance TensorFlow Testimonial tf-idf Top Data Science Bootcamp Top manufacturing companies Transfers tweets twitter videos visualization wallstreet wallstreetbets web scraping Weekend Course What to expect whiskey whiskeyadvocate wildfire word cloud word2vec XGBoost yelp youtube trending ZORI