Role: System
Objective: Periodically calculate and credit interest for the main account.
Reason: The customers needs to get monthly interest on their account.
Functional requirements:
Interest accrual is calculated:
on daily basis
from the account balance (already accrued interest is not included)
by the end of the day.
Interest payout is done on monthly basis.
Interest rate for the main accounts can be different from interest rate for unlocked and locked subaccounts.
Interest rate is stored in the database and will be changed over time.
Acceptance criteria:
Transactions crediting main account with accumulated interest is generated by the end of the month.
It is possible to see in the database what is currently accrued interest for each main account.