module Finance::Loan
Overview
Collection of formulas used for a fixed rate redeemable loan.
Extended Modules
Defined in:
finance/loan.crInstance Method Summary
-
#borrowing_cap(capacity : Float64, rate : Float64, duration : Int32)
Returns the borrowing capacity given the monthly payment capacity, the yearly rate and the duration of the loan in month.
-
#loan_schedule(fund : Float64, rate : Float64, duration : Int32, date = Time.now)
Returns the loan schedule given the fund borrowed, the yearly rate and the duration of the loan in month.
-
#monthly_payment(fund : Float64, rate : Float64, duration : Int32)
Returns the monthly payment due given the fund borrowed, the yearly rate and the duration of the loan in month.
-
#total_cost(fund : Float64, rate : Float64, duration : Int32)
Returns the total cost of the loan, i.e.
Instance Method Detail
Returns the borrowing capacity given the monthly payment capacity, the yearly rate and the duration of the loan in month.
Finance::Loan.borrowing_cap(1, 0.12, 12) # => 11.26
Returns the loan schedule given the fund borrowed, the yearly rate and the duration of the loan in month.
Finance::Loan.loan_schedule(100, 0.12, 12)
Returns the monthly payment due given the fund borrowed, the yearly rate and the duration of the loan in month.
Finance::Loan.monthly_payment(100, 0.12, 12) # => 8.88
Returns the total cost of the loan, i.e. the sum of all the monthly interests given the fund borrowed, the yearly rate and the duration of the loan in month.
Finance::Loan.total_cost(100, 0.12, 12) # => 6.56