SAVINGS Function
Returns the balance of a periodic savings by using
variable interest rates.
Syntax
SAVINGS(
basedate,
initialdepositdate,
depositamount,
depositnumber,
depositinterval,
compoundinginterval,
date1,
rate2 <,date2, rate2,...>)
Required Arguments
basedate
is a SAS date. The
value that is returned is the balance of the savings at basedate.
initialdepositdate
is a SAS date. initialdepositdate is the date of the first
deposit. Subsequent deposits are at the beginning of subsequent deposit
intervals.
depositamount
is numeric. All deposits
are assumed constant. depositamount is the value of each deposit.
depositnumber
is a positive integer. depositnumber is the number of deposits.
depositinterval
is a SAS interval. depositinterval is the frequency at which deposits
are made.
compoundinginterval
is a SAS interval. compoundinginterval is the compounding interval.
date
is a SAS date. Each
date is paired with a rate. date is the time that rate takes
effect.
rate
is a numeric percentage.
Each rate is paired with a date. rate is the interest rate that starts on date.
Details
The following details
apply to the SAVINGS function:

The values for rates must be between
–99 and 120.

depositinterval cannot be 'CONTINUOUS'.

The list of daterate pairs does
not need to be in chronological order.

When multiple rate changes occur
on a single date, the SAVINGS function applies only the final rate
that is listed for that date.

Simple interest is applied for
partial periods.

There must be a valid daterate
pair whose date is at or prior to both the
initialdepositdate and the
basedate.
Example

If you deposit $300 monthly for
two years into an account that compounds quarterly at an annual rate
of 4%, the balance of the account after five years can be expressed
as follows:
amount_base1 = SAVINGS("01jan2005"d, "01jan2000"d, 300, 24,
"MONTH", "QUARTER", "01jan2000"d, 4.00);

If the interest rate increases
by a quarterpoint each year, then the balance of the account could
be expressed as follows:
amount_base2 = SAVINGS("01jan2005"d, "01jan2000"d, 300, 24,
"MONTH", "QUARTER", "01jan2000"d, 4.00,
"01jan2001"d, 4.25, "01jan2002"d, 4.50,
"01jan2003"d, 4.75, "01jan2004"d, 5.00);

To determine the balance after
one year of deposits, the following statement sets amount_base3 to
the desired balance:
amount_base3 = SAVINGS("01jan2001"d, "01jan2000"d, 300, 24,
"MONTH", "QUARTER", "01jan2000"d, 4);
The SAVINGS function
ignores deposits after the base date, so the deposits after the reference
date do not affect the value that is returned.