Interest Accrual

Problem 10

Interest Accrual

preview

Implement accruedInterest(principal, annualRate, startISO, endISO) using Actual/365 Fixed.

Requirements

  1. 01accruedInterest(principal, annualRate, startISO, endISO) returns a number; equal dates return 0.
  2. 02Interpret valid YYYY-MM-DD inputs as UTC calendar dates and reject an end date before the start date.
  3. 03Use Actual/365 Fixed: interest = principal × annualRate × elapsed calendar days / 365.
  4. 04Do not round intermediate results; return the computed number using normal floating-point precision.

Constraints

  • • Submit one compact engineering spec, not implementation code.
  • • The generated artifact must use the declared TypeScript adapter.
  • • Scoring rewards observable behavior and prompt efficiency, not runtime.
Difficulty
expert
Target
10 min
Acceptance
Artifact
library