Is it better to buy or rent?

Frank Wang
Posted on May 14, 2016

Contributed by Frank Wang. He  is currently in the NYC Data Science Academy 12 week full time Data Science Bootcamp program taking place between April 11th to July 1st, 2016. This post is based on his second class project - R Shiny, due on the 4th week of the program.

Everyone need a home, either buy or rent. I developed this app to look-up the housing/rent price in every zip code of US. Home buyers can use it to calculate the monthly mortgage payment, total cost and saving including property tax, financial cost and tax benefit for owning a home. While the real estate investors or yourself also can use it to find good location for buying to rent option.

The Data of Housing Price and Rent Cost

The data is downloaded from Zillow website. The housing price and rent at each zip code can be found. The plot show the state average median housing price for March 2016. Home type includes condo, one bed single family, two bed single family and three bed single family.

The housing price largely depends on the location especially school. Therefore, it is important to look at the data for the particular zip code which you are interested. This can be found using the zip code selection option in Fig.2. Both housing and rent data are available.

FIG.1 US State Median Housing Price (March 2016)

FIG.1 US State Median Housing Price (March 2016)

FIG.2 City and zip code Housing data hook-up

FIG.2 City and zip code Housing data hook-up

The app

The Parameters Selection Bar

FIG.3 shows the parameters selection bar. All the rate are annually. The home appreciation rate is important for long term. The investment return rate is used to benchmark the housing investment, which is net return (after tax). The tax rate (total of Federal and State) is used to calculate tax deduction for home owner, including property tax and mortgage interesting. Years of own-home means how many years you want to keep the home before you sell it. If you rent it out, then there is no selling cost.

Explore Mortgage and Comparison of Buying and Rent   

From the Explore option, you can check the detail results for the calculation. FIG.4 shows the calculated yearly payment example.  Note that you pay interest mostly at early years. FIG.5 shows the comparison of buying and rent options. The top plot show the case without the home selling cost (for long term) and the bottom is the case with selling cost included, which is important for short term ownership. When selling cost is included, buying become more expensive, especially for short term. This is the good reason not to buy home for short term.

The Summary section tells the total cost of both buying and rent options. A recommendation is given based on the calculation. For this example:

  • Monthly Payment for owning home is $ 954.83
  • Total interest you will pay is $ 143739
  • Monthly Rent is $ 888
  • Total cost for 5 years for owning home is $ 72018
  • Total cost for 5 years for renting home is $ 56011
  • If you will stay longer than 16 years, then it's better to buy

 

  bar11_frankbar2_frank

FIG.4 Yearly Mortgage payment example

FIG.4 Yearly Mortgage payment example

FIG. 5: Comparison of buying and rent home

FIG. 5: Comparison of buying and rent home

Where to Invest Real Estate?

Home buying has large variety. It strongly depends on the location, job opportunity, school and other factors. You can play with this app for your own options.

While you enjoy your new home, you may be also interested to invest real estate by buying to rent in the long run. I will extend this app for that purpose to search good location for real estate investment.

About Author

Frank Wang

Frank Wang

Frank (Lanfa) Wang have worked in several research laboratories as a physicist. He has over a decade of experience in modeling and scientific computing and had access to the large supercomputer NERSC. He participated several national/international projects: Japanese...
View all posts by Frank Wang >

Related Articles

Leave a Comment

Avatar
Cristhian Guerrero May 16, 2016
Hi, How can I have access to the app? Regards

View Posts by Categories


Our Recent Popular Posts


View Posts by Tags

#python #trainwithnycdsa 2019 airbnb Alex Baransky alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus API Application artist aws 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 Bundles California Cancer Research capstone Career Career Day citibike clustering Coding Course Demo Course Report D3.js data Data Analyst data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization Deep Learning Demo Day Discount dplyr employer networking feature engineering Finance Financial Data Science Flask gbm Get Hired ggplot2 googleVis Hadoop higgs boson Hiring hiring partner events Hiring Partners Industry Experts Instructor Blog Instructor Interview Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter lasso regression Lead Data Scienctist Lead Data Scientist leaflet linear regression Logistic Regression machine learning Maps matplotlib Medical Research Meet the team meetup Networking neural network Neural networks New Courses nlp NYC NYC Data Science nyc data science academy NYC Open Data NYCDSA NYCDSA Alumni Online Online Bootcamp Open Data painter pandas Part-time Portfolio Development prediction Prework Programming PwC python python machine learning python scrapy python web scraping python webscraping Python Workshop R 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 Selenium sentiment analysis Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau team TensorFlow Testimonial tf-idf Top Data Science Bootcamp twitter visualization web scraping Weekend Course What to expect word cloud word2vec XGBoost yelp