getcorefin / corefin

The open-source lending infra
https://corefin.com
MIT License
188 stars 19 forks source link

Amortization schedule for Actual/365 calculator is incorrect #32

Open albertjo opened 3 months ago

albertjo commented 3 months ago

For the following loan configuration:

{
  term: 6,
  start_date: 01/01/2024,
  interest_rate: 10%,
  principal: $1000,
  first_payment_date: 02/01/2024
}

The amortization schedule should be:

[
  {
    principal: 163.06,
    interest: 8.49
  },
  {
    principal: 164.90,
    interest: 6.65
  },
  {
    principal: 165.84,
    interest: 5.71
  },
  {
    principal: 167.39,
    interest: 4.16
  },
  {
    principal: 168.67,
    interest: 2.88
  },
  {
    principal: 170.14,
    interest: 1.41
  }
]