Skip to content

IFDM-127: Fixes to the interest calculation#83

Open
jenbreese wants to merge 5 commits into1.xfrom
IFDM-127
Open

IFDM-127: Fixes to the interest calculation#83
jenbreese wants to merge 5 commits into1.xfrom
IFDM-127

Conversation

@jenbreese
Copy link
Copy Markdown
Collaborator

READY FOR REVIEW

Summary

Review By (Date)

  • 4/3

Criticality

  • Normal

Review Tasks

Setup tasks and/or behavior to test

  1. Check out this branch
  2. Example.
    Initial amount: $1,000
    Interest rate: 8%
    Number of compounding periods: 20
    Compounding semi-annually
    Final amount: $2,191.12

Currently, if I put the same inputs into the calculator, the final amount is: $4,801.02, which is the output for 20 years (40 semi-annual periods).

Front End Validation

  • Is the markup using the appropriate semantic tags and passes HTML validation?
  • Cross-browser testing has been performed?
  • Automated accessibility scans performed?
  • Manual accessibility tests performed?
  • Design is approved by @ user?

Backend / Functional Validation

Code

  • Are the naming conventions following our standards?
  • Does the code have sufficient inline comments?
  • Is there anything in this code that would be hidden or hard to discover through the UI?
  • Are there any code smells?
  • Are tests provided? eg (unit, behat, or codeception)

Code security

General

  • Is there anything included in this PR that is not related to the problem it is trying to solve?
  • Is the approach to the problem appropriate?

Affected Projects or Products

  • Does this PR impact any particular projects, products, or modules?

Associated Issues and/or People

  • JIRA ticket(s)
  • Other PRs
  • Any other contextual information that might be helpful (e.g., description of a bug that this PR fixes, new functionality that it adds, etc.)
  • Anyone who should be notified? (@mention them here)

Resources

const [interestAmount, setInterestAmount] = useState(0);
const [totalAmount, setTotalAmount] = useState(0);
const MAX_YEARS = 240;
const MAX_PERIODS = 960; // 240 years * 4 quarters (reasonable max)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment says "240 years × 4 quarters (reasonable max)" — but now that daily and weekly compounding are available, 960 is a very tight ceiling. 960 days is only about 2.6 years. A user selecting Daily and wanting to model 10 years would need to enter 3,650 but can't. The max was designed around quarterly as the most granular option; it needs rethinking now that daily is supported.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. Thank you for pointing that out. I'll bring it up in our meeting today.

@jenbreese
Copy link
Copy Markdown
Collaborator Author

@imonroe Can you take a look at this again? The MAX_PERIODS was added by the AI and it was not client requested. I pulled out the MAX_PERIODS.

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

Successfully merging this pull request may close these issues.

2 participants