Skip to content

Latest commit

 

History

History
39 lines (34 loc) · 949 Bytes

README.md

File metadata and controls

39 lines (34 loc) · 949 Bytes

"# lumio"

Loan Document Structure

{
  name: 'Nick Wurfle',
  amount: 20000,
  startDate: '2018-06-10T00:00:00.000Z',
  interestRate: 1.5,
  interestFrequency: 'Monthly/Annual'
  paymentDay: 1,
  leasePeriod: 5,  
  hasPenalty: true,
  penaltyType:'FixedPerDay/InterestOnInterest',
  penaltyRate: 200
}

Payment Document Structure

{
  loanId: 'Loan Document ID',
  amount: 4250,
  interest: 250,
  principal: 4000,
  paymentDate: '2018-06-10T00:00:00.000Z',
}

Interest Calculations, Assuming No Principal Repayment

  1. Pick the loan and past payments.
  2. Arrange payments in ascending date order.
  3. Calculate interest for 'start stub' (if present)
  4. Calculate interest for each month till last month.
  5. Calculate interest for 'end stub'. (Accrued Interest)
  6. Cancel/Cross-out interest flow with interest paid back.
  7. Identify outstanding Interest till last monthend.