coffeeAndCodeMSO / mort_comp

Compare two mortgages to see which is a better deal. Typically a 15 year versus a 30 year mortgage.
https://coffeeandcodemso.github.io/mort_comp/
5 stars 2 forks source link

added checkbox for making extra yearly payment #33

Closed rschultheis closed 6 years ago

rschultheis commented 6 years ago

So I felt like doing some JS coding and took on something I've wanted to do here for a while. This sets the stage for completing the analysis I really want... more below.

So this is complex change, even though it only changes the UI in a simple way.

The effect on the UI is that there is a new checkbox that allows specifying making a 13th payment each year. This means the mortgage gets payed off sooner, and thus lifetime cost is less. Lost of people do this.

To make this work, the entire ammortizaton table needs to be calculated... that is each payment and its effect on outstanding principal must be understood.

Now that the ammortization table is available, it can be used to add other features. The main one I want is to be able to calc the rate of investment return such that the 30 year mortgage is in fact the better choice. That is, if the difference in the lower 30 year payment is invested at some rate of return, when does the home owner come out ahead . Frikking hard, but with the table in place its now possible. I think some nice charts could help here @eidietrich

Other features could be showing the whole table in the UI, and actually allowing it to be edited directly for custom payment schedules, making super large payments, etc.

This is what the change looks like, note the time to pay off the 30 year mortgage is actually 25.33 years.

screen shot 2018-01-03 at 11 48 40 pm

Sidenote: I am getting tired of this project and want to do something different when I get back to town. Hoping to wrap this one up soon, but totally willing to work with others who might want to extend it.

ed42311 commented 6 years ago

I think you're good to let this one roll, we'll keep making cards and working on it is we go... no worries. Was thinking maybe you could lead us through a ruby app or building a ruby api...