Coder Social home page Coder Social logo

buy-vs-rent's Introduction

Buy vs Rent

Build Status

Compare net worth when buying a property vs renting.

image

How

Modify opts.js with your variables, then run npm run simulate to run a Monte-Carlo simulation of two conditions over a period of x years:

  1. Saving for a deposit, buying a property and paying off the mortgage. Once paid off, investing any left-over income in a stock market.
  2. Renting a property and investing any left-over income in a stock market.

Run npm start and visit 0.0.0.0:8080 to see a comparison of net worth.

Variables considered

  • income, yearly income increases, income in old age
  • expenses and yearly inflation increases
  • federal, provincial taxes (Ontario) and RRSP allowance (for investment)
  • rent and historical rent increases according to a guideline
  • 60-40 stock market return adjusted for CAD exchange rate
  • Toronto property value for condos/houses, historical increases, condo/maintenance fees, taxes and buy/sell fees
  • historical mortgage rates, downpayment minimums and insurance

Notes

  • If we default on a mortgage or don't have enough income to pay all the taxes and fees, property is sold, any equity is invested on a stock market and we continue with renting.
  • All of RRSP allowance is used for stock market portfolio. At the end of the simulation it is sold in total which incurs a heavy tax, in real life we'd be withdrawing it year by year instead.

Todo

  • RRSP allowance carries over to the next year if unused
  • simulate raising of taxes
  • link mortgage rates to inflation
  • consider all payroll deducation in net income

buy-vs-rent's People

Contributors

radekstepan avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.