Precision interest calculation engine. Supports APY, APR, tiered rates, compound interest, and accrual schedules.
$ dotnet add package PrimusSaaS.Banking.InterestFinancial calculation engine.
builder.Services.AddPrimusInterestCalculator();
// Calculate APY
var result = await _interest.CalculateInterestAsync(new CalculationRequest
{
Principal = 10000,
AnnualRate = 4.5m,
Compounding = CompoundingFrequency.Monthly,
StartDate = DateTime.Today,
EndDate = DateTime.Today.AddYears(1)
});
Console.WriteLine($"Earned: ${result.InterestEarned} (APY: {result.APY}%)");