Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Credit card payoff calculations #104

Closed
13 tasks done
jantman opened this issue Aug 3, 2017 · 6 comments
Closed
13 tasks done

Credit card payoff calculations #104

jantman opened this issue Aug 3, 2017 · 6 comments
Assignees

Comments

@jantman
Copy link
Owner

jantman commented Aug 3, 2017

For accounts of type "Credit Card", add an additional field to hold the interest rate (if OFX doesn't have this) and how often it's compounded. Then add payoff calculations to the Accounts view based on the amount of all payments for each account in the last month.

  • code to calculate interest, minimum payment, and payoff time for credit card accounts
  • required attributes added to Account model
    • APR
    • Interest calculation/compounding method
    • Minimum payment method
    • Billing period type (number of days) and args
  • Database-backed settings table to store blobs of text - specifically used to store settings for the view
  • View for CC payoff calculations
  • Input for payment increase date/amounts (multiple); round trip to DB (save and fill)
  • Input for one-time additional payment on a given date (billing cycle); round trip to DB (save and fill)
  • Display results of various calculation methods
  • Calculations are based on the last interest payment on the account (OFX), and the associated balance at that time, as well as the account settings.
  • View includes clear warnings as shown below.
@jantman
Copy link
Owner Author

jantman commented Aug 4, 2017

Maybe it would also be nice to have an ajax-y view dedicated to this, that has a CC payoff calculator for each credit account, that shows the payoff time at a given payment per month (pre-populated with the current monthly payment) and allows the user to change the months or payments and see the calculation.

@jantman
Copy link
Owner Author

jantman commented Aug 8, 2017

Make sure that this page has a big warning:

  • I've found the interest, balance and minimum payment calculations to be within 1% for my own use, but this should be taken as an estimate only and often will not match actual credit card statements as interest rates generally change during billing cycles. Also, keep in mind that on cards with high balances and long payoff times, the calculations could be off quite a bit.
  • Assumes a fixed interest rate
  • Doesn't account for any fees or purchases (essentially any increase to principal other than interest)
  • There's some rounding going on
  • Assumes relatively predictable billing cycles and payment dates, which is often not the case.
  • Assumes payments are made exactly in the middle of each billing cycle.

jantman added a commit that referenced this issue Aug 13, 2017
jantman added a commit that referenced this issue Aug 13, 2017
jantman added a commit that referenced this issue Aug 14, 2017
jantman added a commit that referenced this issue Aug 16, 2017
@jantman
Copy link
Owner Author

jantman commented Aug 16, 2017

Ok, so at this point:

  • Get the code that I have now, which doesn't yet handle settings (increases or onetimes) working, tested and covered.
  • Add support for increases and onetimes, by adding constructor kwargs on the PayoffMethod classes, and then using those to figure the maximum monthly payment.
  • Use a class property on the Account model to get the APR
  • Add support for configuring the margin on accounts instead of the APR, and figuring the APR by pulling the prime rate from http://markets.wsj.com/us and caching it in the settings table with an expiration timestamp. Add this to sampledata, and switch an account to use it (and update unit tests too).
  • Go over the complete diff for this, make sure any debugging code is pulled out.
  • check skips, xfails and xpasses.

jantman added a commit that referenced this issue Aug 17, 2017
jantman added a commit that referenced this issue Aug 17, 2017
@jantman
Copy link
Owner Author

jantman commented Aug 20, 2017

Checked full diff as of fa10a53

Remaining:

  • Use a class property on the Account model to get the APR
  • Add support for configuring the margin on accounts instead of the APR, and figuring the APR by pulling the prime rate from http://markets.wsj.com/us and caching it in the settings table with an expiration timestamp. Add this to sampledata, and switch an account to use it (and update unit tests too).
  • check skips, xfails and xpasses.

@jantman
Copy link
Owner Author

jantman commented Aug 20, 2017

Remaining:

  • check skips, xfails and xpasses.
  • Discover doesn't show interest amounts on statements except for new purchases. Need to change how we calculate everything, and instead of using the last date interest was posted, just use the last date we have balances for.

@jantman
Copy link
Owner Author

jantman commented Aug 21, 2017

Final bits:

  • final check for skips, xfails, xpasses, and coverage
  • regenerate jsdocs and docs
  • add to features and screenshots

jantman added a commit that referenced this issue Aug 21, 2017
@jantman jantman self-assigned this Aug 21, 2017
jantman added a commit that referenced this issue Aug 21, 2017
Issues/104 - Credit card payoff calculations
@jantman jantman reopened this Aug 21, 2017
@jantman jantman closed this as completed Aug 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant