Giter Club home page Giter Club logo

debtpaymentplan's Introduction

Debt Payment Planner and Payoff Intelligence

Calculate the best way to pay down your debt.

Feature Summary

  • Amortization Schedule
  • Order debt to payoff the fastest.
  • Debt Snowball
    • Order the debt so the bulk of the payments go toward the debt that will be paid off earlier.
    • As each card is paid off, that money is combined and added to the next card to be paid off quickly.
  • Payment Statistics: Number of payments, range, utilization, APRs, etc.

Create a Debt Info Object

Each DebtInfo object handles the majority of the logic and calculations. Combine these to create a portfolio.

public DebtInfo(string name, decimal balance, decimal rate, decimal minPayment, bool forceMinPayment = true)

Create a Portfolio Object

A portfolio combines all the debts to ensure that the amortization and payments are optimized.

var portfolio = new DebtPortfolio
            {
                new DebtInfo("A", 16345.44M, 3.25M, 225),
                new DebtInfo("B", 12000, 0, 125),
                new DebtInfo("C", 6000, 3.5M, 182),
                new DebtInfo("D", 4000, 12.25M, 50),
                new DebtInfo("E", 2000, 15.55M, 200),
                new DebtInfo("F", 1000, 22, 50),
                new DebtInfo("G", 500, 22, 50),
                new DebtInfo("H", 10, 50.3M, 250),
                new DebtInfo("I", balance: 13000, 12, 100),
            };

Sample Output

The debt summary shows the debt statistics and the amortization schedule. This is a calcuation available by executing or overriding:

public virtual string Header
{
    get
    {
        var builder = new StringBuilder();

        foreach (var keyValuePair in GetAmortization())
        {
            var debtInfo = keyValuePair.Key;
            var debtAmortization = keyValuePair.Value;
            builder.AppendLine($"\n{debtInfo}");
            builder.AppendLine($"\nNumber Payments: {debtAmortization.Count}\n");
            builder.AppendLine(debtAmortization.ToString());
        }

        return builder.ToString();
    }
}
Name: E

Balance      | % Rate | Minimum | Max Payment
------------ | ------ | ------- | -----------
   $2,000.00 | 15.55% | $200.00 |     $450.00

Number Payments: 6

Payment   1:    $200.00 |   $25.92 |    $174.08 |    $1,825.92
Payment   2:    $450.00 |   $23.67 |    $426.33 |    $1,399.59
Payment   3:    $450.00 |   $18.14 |    $431.86 |      $967.73
Payment   4:    $450.00 |   $12.55 |    $437.45 |      $530.28
Payment   5:    $450.00 |    $6.88 |    $443.12 |       $87.16
Payment   6:     $87.16 |    $0.00 |     $87.16 |        $0.00

Sample Payment Summary

Payment summary shows all payments combined for all debts. Each payment is the sum of all debt for that payment. This is a calculation available by executing or overriding:

public virtual string Payments
{
    get
    {
        var list = GetAmortization();
        var builder = new StringBuilder();

        var maxPayments = list.Values.ToList().Max(x => x.Count);

        for (var i = 0; i < maxPayments; i++)
        {
            var paymentNum = i + 1;
            builder.AppendLine(
                $"Payment {paymentNum,3}: {list.Values.Sum(x => x.Count > i ? x[i].Payment : 0),11:C}");
        }

        builder.AppendLine($"{"Total",11}: {list.Values.Sum(x => x.Sum(y => y.Payment)),11:C}");

        return builder.ToString();
    }
}
Payment   1:   $1,098.26
Payment   2:   $1,338.26
Payment   3:   $1,338.26
Payment   4:   $1,338.26
Payment   5:   $1,338.26
...
Payment  47:   $1,327.00
Payment  48:   $1,327.00
Payment  49:   $1,327.00
Payment  50:     $750.34
      Total:  $62,927.47

Release Notes

  • None

License

debtpaymentplan's People

Contributors

cwinland avatar

Stargazers

 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.