|Oracle® OLAP DML Reference
11g Release 2 (11.2)
Part Number E17122-05
The FINTSCHED function calculates the interest portion of the payments on a series of fixed-rate installment loans that are paid off over a specified number of time periods. For each time period, you specify the amount of the loans incurred during that time period and a single interest rate that applies to those loans over their lifetime.
FINTSCHED calculates the result for a given time period as the sum of the interest due on each loan that is incurred or outstanding in that period.
The result returned by the FINTSCHED function is dimensioned by the union of all the dimensions of loans, rates, n, and the dimension used as the time-dimension argument.
FINTSCHED(loans, rates, n, [time-dimension] [STATUS])
A numeric expression that contains the initial amounts of the loans. When loans does not have a time dimension, or when loans is dimensioned by multiple time dimensions, the time-dimension argument is required.
A numeric expression that contains the interest rates charged for loans. When rates is a dimensioned variable, it can be dimensioned by any dimension, including a different time dimension. When rates is dimensioned by a time dimension, you specify the interest rate in each time period that applies to the loans incurred in that period. The interest rate for the time period in which a loan is incurred applies throughout the lifetime of that loan. The rates are expressed as decimal values; for example, a 5 percent rate is expressed as
A numeric expression that specifies the number of payments required to pay off the loans in the series. The n expression can be a dimensioned variable, but it cannot be dimensioned by the time dimension argument. One payment is made in each time period of the time dimension by which loans is dimensioned or in each time period of the dimension specified in the time-dimension argument. For example, one payment is made each month when loans is dimensioned by MONTH.
The name of the dimension along which the interest payments are calculated. When the time dimension has a type of DAY, WEEK, MONTH, QUARTER, or YEAR, the time-dimension argument is optional, unless loans has multiple time dimensions.
Specifies that FINTSCHED should use the current status list (that is, only the dimension values currently in status in their current status order) when computing the interest portion of the payments. By default FINTSCHED uses the default status list.
FINTSCHED and NA Values
When loans has a value other than
NA and the corresponding value of rates is
NA, an error occurs.
FINTSCHED is affected by the NASKIP option. When NASKIP is set to
YES (the default), and a loan value is
NA for the affected time period, the result returned by FINTSCHED depends on whether the corresponding interest rate has a value of
NA or a value other than
NA. Table 7-11, "Effect of NASKIP When Loan or Rate Values are NA for a Time Period" illustrates how NASKIP affects the results when a loan or rate value is
NA for a given time period.
Table 7-11 Effect of NASKIP When Loan or Rate Values are NA for a Time Period
|Loan Value||Rate Value||Result When NASKIP = YES||Result When NASKIP = NO|
As an example, suppose a loan expression and a corresponding interest expression both have
NA values for 1997 but both have values other than
NA for succeeding years. When the number of payments is 3, FINTSCHED returns
NA for 1997, 1998, and 1999. For 2000, FINTSCHED returns the interest portion of the payment due for loans incurred in 1998, 1999, and 2000.
FINTSCHED Ignores the Status of the Time Dimension
The FINTSCHED calculation begins with the first time dimension value, regardless of how the status of that dimension may be limited. For example, suppose loans is dimensioned by
year, and the values of
year range from
Yr99. The calculation always begins with
Yr95, even when you limit the status of
year so that it does not include
However, when loans is not dimensioned by the time dimension, the FINTSCHED calculation begins with the first value in the current status of the time dimension. For example, suppose loans is not dimensioned by
year is specified as time-dimension. When the status of
year is limited to
Yr99, the calculation begins with
Yr97 instead of
Example 7-98 Calculating Interest
The following statements create two variables called
DEFINE loans DECIMAL <year> DEFINE rates DECIMAL <year>
Suppose you assign the following values to the variables
YEAR LOANS RATES -------------- ---------- ---------- Yr95 100.00 0.05 Yr96 200.00 0.06 Yr97 300.00 0.07 Yr98 0.00 0.00 Yr99 0.00 0.00
For each year,
loans contains the initial value of the fixed-rate loan incurred during that year. For each year, the value of
rates is the interest rate that is charged for any loans incurred in that year; for those loans, this same rate is charged each year until the loans are paid off.
The following statement specifies that each loan is to be paid off in three payments, calculates the interest portion of the payments on the loans,
REPORT W 20 HEADING 'Payment' FINTSCHED(loans, rates, 3, year)
and produces the following report.
YEAR Payment -------------- -------------------- Yr95 5.00 Yr96 15.41 Yr97 30.98 Yr98 18.70 Yr99 7.48
The interest payment for 1995 is interest on the loan of $100 incurred in 1995, at 5 percent. The interest payment for 1996 is the sum of the interest on the remaining principal of the 1995 loan, at 5 percent, plus interest on the loan of $200 incurred in 1996, at 6 percent. The 1997 interest payment is the sum of the interest on the remaining principal of the 1995 loan, at 5 percent; interest on the remaining principal of the 1996 loan, at 6 percent; and interest on the loan of $300 incurred in 1997, at 7 percent. Since the 1995 loan is paid off in 1997, the payment for 1998 represents interest on the remaining principal of the 1996 and 1997 loans. In 1999, the interest payment is on the remaining principal of the 1997 loan.