Skip to content

Instantly share code, notes, and snippets.

@eppspacjar
Last active March 19, 2023 15:57
Show Gist options
  • Select an option

  • Save eppspacjar/bb1935d5992fc30a7e95569a55a1dcc2 to your computer and use it in GitHub Desktop.

Select an option

Save eppspacjar/bb1935d5992fc30a7e95569a55a1dcc2 to your computer and use it in GitHub Desktop.
/* -- Loan Calculator I/O model -- */
// Input data (from the web application):
{
loanAmount: 10000, // The value of the borrowed amount (in $).
loanDuration: 10 // The duration of the loan (in months).
}
// Output data (calculated with DecisionRules):
{
loanAmount: 10000, // The value of the borrowed amount (in $).
interestRate: 19.9, // The determined value of the Interest rate (p.a.) for the loan (in %)
monthlyPayment: 1093.46, // The calculated monthly payment for the loan (in $).
totalPayment: 10934.58, // The calculated total payment for the loan (in $).
APR: 21.82 // The calculated Annual Percentage Rate for the loan (in %).
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment