MORT Function

Returns amortization parameters.

Category: Financial
Returned data type: DOUBLE

Syntax

MORT(a, p, r, n)

Arguments

a

specifies any valid expression that evaluates to the initial amount.

Data type DOUBLE
See <sql-expression>
FedSQL Expressions

p

specifies any valid expression that evaluates to the periodic payment.

Data type DOUBLE
See <sql-expression>
FedSQL Expressions

r

specifies any valid expression that evaluates to the periodic interest rate that is expressed as a fraction.

Data type DOUBLE
See <sql-expression>
FedSQL Expressions

n

specifies any valid expression that evaluates to the number of compounding periods.

Range n ≥ 0
Data type INTEGER
See <sql-expression>
FedSQL Expressions

Details

Calculating Results

The MORT function returns the missing argument in the list of four arguments from an amortization calculation with a fixed interest rate that is compounded each period. The arguments are related by the following equation:
One missing argument must be provided. The value is then calculated from the remaining three. No adjustment is made to convert the results to round numbers.

Restrictions in Calculating Results

The MORT function returns an invalid argument note to the SAS log and sets _ERROR_ to 1 if one of the following argument combinations is true:
  • rate < –1 or n < 0
  • principal <= 0 or payment <= 0 or n <= 0
  • principal <= 0 or payment <= 0 or rate <= –1
  • principal * rate > payment
  • principal > payment * n

Example

In the following example, an amount of $50,000 is borrowed for 30 years at an annual interest rate of 10% compounded monthly.
select mort(50000, . , .10/12, 30*12);
The value that is returned is 438.79 (rounded). The second argument is set to missing, which indicates that the periodic payment is to be calculated. The 10% nominal annual rate has been converted to a monthly rate of 0.10/12. The rate is the fractional (not the percentage) interest rate per compounding period. The 30 years are converted to 360 months.
Last updated: February 23, 2017