savings_rate()
Savings rate: the percent of income not spent.
Usage
savings_rate(
income,
spending,
)From the Savings Strategies chapter.
Parameters
income: ArrayLike-
Income for the period. Must be greater than 0.
spending: ArrayLike- Spending for the same period.
Returns
float or numpy.ndarray-
Percentages (
15is 15%). Negative when spending exceeds income.
Raises
TypeError-
If an argument is not numeric.
ValueError-
If an argument contains missing values, or
incomeis not greater than 0.
Examples
>>> from perfinpy import savings_rate
>>> savings_rate(income=3200, spending=2720)15.0