amortization_schedule_calculator v0.0.1 AmortizationScheduleCalculator.CompositeInterest

This protocol defines the functions used to calculate composite interest.

Link to this section Summary

Functions

Calculates the effective interest rate for the entire period given the number of months and the monthly interest rate

Calculates the monthly payment given the amount, interest rate and term in months

Link to this section Functions

Calculates the effective interest rate for the entire period given the number of months and the monthly interest rate.

Examples

iex> CompositeInterest.effective_interest_rate(360, Decimal.new(0.005))
#Decimal<6.022575212263216184054046820>

Calculates the monthly payment given the amount, interest rate and term in months.

Examples

iex> CompositeInterest.get_monthly_payment(Money.new(:usd, 100000), Decimal.new(0.005), 360)
#Money<:USD, 599.55>