from mortgagetvm import MortgageComparison

mortgageComparison = MortgageComparison()
mortgageComparison.setDefaults(tvmRate      = '8.0%', # Market rate of return
                               houseCost    = '$400,000',
                               startingCash = '100%')
mortgageComparison.addMortgage(
                     name         = 'Lower down payment',
                     mortgageRate = '4.0%',
                     downPayment  = '20%')
mortgageComparison.addMortgage(
                     name         = 'Lower rate',
                     mortgageRate = '3.5%',
                     downPayment  = '50%')

mortgageComparison.simulateMortgages()
mortgageComparison.plot('loanSize','savings','netWorth')