diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..2d851c9 --- /dev/null +++ b/Makefile @@ -0,0 +1,7 @@ + +reference: + amortize -P 100000 -r 0.05 -f monthly -n 36 -s > ref.txt + +test: + python amort.py -p 100000 -i 5.0 -t 3 -ot "{\"payment_number\":13,\"amount\":5000}" + diff --git a/amort.py b/amort.py index 31827db..df39cef 100644 --- a/amort.py +++ b/amort.py @@ -74,10 +74,6 @@ def get_totals(amortization_schedule, func=None): return total_paid, total_interest_paid, total_principal_paid if __name__ == "__main__": - # Example usage - # principal = 100000 - # interest_rate = 5.0 - # loan_term = 3 def get_arguments(): p = argparse.ArgumentParser() p. add_argument("--principal", "-p", type=float, \ @@ -122,11 +118,6 @@ if __name__ == "__main__": print("wrote to file", filename) principal, interest_rate, loan_term, extra_payments = get_arguments() - - # one_time_payment = { - # 'payment_number': 13, - # 'amount': 5000 - # } schedule = generate_amortization_schedule(principal, interest_rate, loan_term, extra_payments) paid, interest_paid, principal_paid = get_totals(schedule,export)