Functions and CALL Routines |
Category: | Financial |
Syntax | |
Arguments | |
Details | |
Calculating Results | |
Restrictions in Calculating Results | |
Examples |
Syntax |
MORT(a,p,r,n) |
is numeric, and specifies the periodic interest rate that is expressed as a fraction.
is an integer, and specifies the number of compounding periods.
Range: | n 0 |
Details |
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.
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
Examples |
In the following statement, an amount of $50,000 is borrowed for 30 years at an annual interest rate of 10 percent compounded monthly. The monthly payment can be expressed as follows:
payment=mort(50000, . , .10/12,30*12);
The value that is returned is 438.79 (rounded). The second argument has been set to missing, which indicates that the periodic payment is to be calculated. The 10 percent 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.
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.