Saturday, October 8, 2011

Mortgage Calculator App

WPF

In order to get a better understanding of Windows Presentation Foundation (WPF) I've decided to dive right in.

A while back I had created a Mortgage Calculator in C# .NET 1.2 as a Windows Form Application:



















However, the GUI implementation left something to be desired. I wanted to avoid using modal forms. Instead the UI needed to be isolated to one window. While a trivial task, adding 2 panels to a form and switching the visible property seemed like a hack and annoying to maintain. Other suggestions seemed to suffer from the same basic problems.

Enter WPF. WPF uses DirectX which pipes all the UI processing to the GPU. This saves the CPU from wasting calculations. The following post on stackoverflow.com has a fairly succinct break down of it.

Instead of generating the GUI with pure code as Windows Form Application does, WPF uses Extensible Application Markup Language (XAML). XAML is an XML based user interface markup language. It's values define UI elements, data binding, events and more.

Using WPF, implementing a form with multiple GUI states doesn't feel as clumsy. Also, databinding takes away much of the coding I used to encounter with loading, validating and updating values in the database.

Mortgage Calculator

The Mortgage Calculator is intended to give your average everyday landlord/amateur investor a rough estimate of what his properties vital stats will be month by month in the amortization schedule.

A problem with most Mortgage Calculators, especially at Real Estate or Mortgage websites, is their lack of data. In particular, leaving out Tax and Insurance from the monthly payment might give someone unrealistic expectations of their out of pocket costs.




Mortgagecalculator.org includes tax but leaves out insurance and Association dues.

As an example lets pull up a listing from http://mihome.mobi/:






















Plugging this information into MortgageCalculator.org we get:



















$24,375.00 doesn't tell us much. Did the property tax increase over the 30 year amortization or is this a fixed dollar amount every year?

$24,375 breaks down to $812.50 a year.

Again we have no idea about Insurance or Association Dues.

When we scroll down in the listing we find that the tax was underestimated.











Perhaps we had the wrong percentage? Yes, but home values used to calculate property tax themselves are figured out by a city tax assessors who's valuations can differ from the current market value. Simply stated the only tax rate that matters is the current dollar amount listed, which in this case is $582.50 higher.

Principal and Interest Payment: $348.93
Tax: $1,395 / 12 = $116.25
Insurance: $500 / 12 = $41.67
Association Dues: $246

Total Payment: $752.85

Almost double what MortgageCalculator.org showed!

What about the changes in tax, insurance and other costs? If the total payment now is $752.85 it will most certainly become more expensive in the future.

I designed Mortgage Calculator to address 3 main areas where details were lacking:
  1. Total cost of owning and maintaining the house.
  2. Future appreciation of all costs.
  3. Rental stats.
In the amortization schedule I would want to track the following:
  • Principal
  • Interest
  • Extra Payments
  • Balance
  • Home Value
  • Tax
  • Insurance
  • Association Dues
  • Maintenance
  • Total Monthly Cost
  • Equity
  • Loan To Value
  • Rental Income
  • Cash Flow
On top of this I would want to assign appreciation rates to the following values:
  • Tax
  • Insurance
  • Association Dues
  • Maintenance
  • Rent
  • Home Value
In our next post we will be dealing with creation of the Database.


Download the Code Here

4 comments:

  1. Nice Blog Thanks for sharing this post with a lot of useful information. I would like to get updates from you. Keep blogging..
    mortgage calculator

    ReplyDelete
  2. If you are looking for the best private mortgage lenders in Oshawa, you can simply visit Mortgage Intelligence's website. Mortgage Intelligence has many best agents who can help to contact private mortgage lenders and will also help you to get the best mortgage rate for buying a new home. Their agents are fully trustworthy and they will become your helping hand until you buy a home. Best mortgage lenders Oshawa

    ReplyDelete
  3. I read your blog it's very nice and very helpful, I learn something new every time from this website, Thanks for sharing this information with us. I am also a blogger i guide people on App and Software Development. You can visit my blog here how much to make an app

    ReplyDelete