SAVINGS Function
Returns the balance of a periodic savings by using
variable interest rates.
Syntax
SAVINGS(
base-date,
initial-deposit-date,
deposit-amount,
deposit-number,
deposit-interval,
compounding-interval,
date-1,
rate-2 <,date-2, rate-2,...>)
Required Arguments
base-date
is a SAS date. The
value that is returned is the balance of the savings at base-date.
initial-deposit-date
is a SAS date. initial-deposit-date is the date of the first
deposit. Subsequent deposits are at the beginning of subsequent deposit
intervals.
deposit-amount
is numeric. All deposits
are assumed constant. deposit-amount is the value of each deposit.
deposit-number
is a positive integer. deposit-number is the number of deposits.
deposit-interval
is a SAS interval. deposit-interval is the frequency at which deposits
are made.
compounding-interval
is a SAS interval. compounding-interval 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.
-
deposit-interval cannot be 'CONTINUOUS'.
-
The list of date-rate 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 date-rate
pair whose date is at or prior to both the
initial-deposit-date and the
base-date.
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 quarter-point 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.