The buy vs. rent decision problem is a classical project to illustrate the value of money in the financial courses. There are different versions of this project. The context of the various versions are pretty much the same with the change only on the numbers - interest rate, price of the condo, etc. Here a solution based on the Python functions is provided using the functionalities implemented in this article.
The story started with the consideration to buy a property. In May 2013, Rebecca Young completed her MBA and moved to Toronto for a new job in investment banking. There, she rented a spacious, two-bedroom condominium for $3,000 per month, which included parking but not utilities or cable television. In July 2014, the virtually identical unit next door became available for sale with an asking price of $620,000, and Young believed she could purchase it for $600,000. She realized she was facing the classic buy-versus-rent decision. It was time for her to apply some of the analytical tools she had acquired in business school — including “time value of money” concepts — to her personal life...
Summary of the financial details
- Purchase price of the property: $600,000
- Down payment: 20% of property price
- Mortgage interest (Semi-annual compound): 4%
- Mortgage periods: 25 years
- Owner monthly fees: Condo fee ($1055) + property tax ($300) + maintenance ($50)
- Purchase closing cost: 1.5% + 1.5% + $2000
- Rent: $3000
- The condo price remains unchanged
- The condo price drops 10% over the next two years, then increases back to it's purchase price by the end of 5 years
- The condo price increases annually by the annual rate of inflation of 2% over the next 10 years
- The condo price increases annually by an annual rate of 5% over the next 10 years.
- 5% of selling price
- $2000 flat fee
def get_monthly_pmt(loan_amt, r, n): """ calculate monthly payment loan_amt: inital loan amount r: monthly interest n: total number of payments """ return loan_amt*r*(1 + r)**n / ((1 + r)**n - 1)
def get_principle(loan_amt, A, r, t): """ calculate principle for month t loan_amt: intial loan amount A: monthly payment r: monthly intrest t: number of payments """ return loan_amt*((1 + r)**t) - A*((1 + r)**t - 1)/r
"""
r = (1 + 0.04/2)^(1/6) - 1 = 0.00330589
>>> get_monthly_pmt(loan_amt=480000, r=0.00330589, n=300)
2524.905347597944 """
- The initial out of pocket - the value is expected to increase in the future with the initial deposit. The initial out of pocket is down payment plus closing cost: 600000*20% + 600000*3% + 2000 = $140,000.
- The savings of rent - the accumulative value is expected to increase in the future by continuous contribution of $929.91.
def get_future_value_init(deposit, r, n): """ Calculate future value deposit: monthly deposit r: monthly interest n: total number of months """ return deposit*(1 + r)**n def get_future_value(deposit, r, n): """ Calculate future value deposit: monthly deposit r: monthly interest n: total number of deposit """ return deposit*((1 + r)**n - 1)/r for i in [24, 60, 120]: a = get_future_value_init(140000, r=0.00330589, n=i) b = get_future_value(929.91, r=0.00330589, n=i) print(a, b, a+b) """ 151540.5012231941 23187.245216568885 174727.74643976297 170659.2154860795 61600.682143214086 232259.8976292936 208032.62735945804 136691.56848584456 344724.1958453026 """
Scenario analysis
The principle balance after 2, 5, and 10 years can be calculated as follows. The take-home amount is the selling price subtracted by the selling fee and principle balance. And the future value can be derived by the take-home amount subtracted by the future value of the opportunity.
def get_principle(loan_amt, A, r, t): """ calculate principle for month t loan_amt: intial loan amount A: monthly payment r: monthly intrest t: number of payments """ return loan_amt*((1 + r)**t) - A*((1 + r)**t - 1)/r for i in [24, 60, 120]: print(get_principle(480000, A=2524.91, r=0.00330589, t=i)) """ 456608.96654832666 417857.9213183897 342107.0756292622 """
The results of the 4 different scenarios are summarized as below. It's an interesting observation that the final net future value is highly dependent on the property price. The decision to buy or rent the property is based on the housing market.
Scenario 1:
Opportunity | Principle | Selling-price | Selling-fee | Take-home | Net-future-value |
---|---|---|---|---|---|
174,728 | 456,609 | 600,000 | 32,000 | 111,391 | -63,337 |
232,260 | 417,858 | 600,000 | 32,000 | 150,142 | -82,118 |
344,724 | 342,107 | 600,000 | 32,000 | 225,893 | -118,831 |
Scenario 2:
Opportunity | Principle | Selling-price | Selling-fee | Take-home | Net-future-value |
---|---|---|---|---|---|
174,728 | 456,609 | 540,000 | 29,000 | 54,391 | -120,337 |
232,260 | 417,858 | 600,000 | 32,000 | 150,142 | -82,118 |
344,724 | 342,107 | 660,000 | 35,000 | 282,893 | -61,831 |
Scenario 3:
Opportunity | Principle | Selling-price | Selling-fee | Take-home | Net-future-value |
---|---|---|---|---|---|
174,728 | 456,609 | 624,240 | 33,212 | 134,419 | -40,309 |
232,260 | 417,858 | 662,448 | 35,122 | 209,468 | -22,792 |
344,724 | 342,107 | 731,397 | 38,570 | 350,720 | 5,996 |
Scenario 4:
Opportunity | Principle | Selling-price | Selling-fee | Take-home | Net-future-value |
---|---|---|---|---|---|
174,728 | 456,609 | 661,500 | 35,075 | 169,816 | -4,912 |
232,260 | 417,858 | 765,769 | 40,288 | 307,623 | 75,363 |
344,724 | 342,107 | 977,337 | 50,867 | 584,363 | 239,639 |