depreciationDdb¶
Evaluates the depreciation of an asset using the double-declining balance method.
Synopsis¶
depreciationDdb (cost, salvage, life, period, factor)
Required Arguments¶
- float
cost
(Input) - Initial value of the asset.
- float
salvage
(Input) - The value of an asset at the end of its depreciation period.
- int
life
(Input) - Number of periods over which the asset is being depreciated.
- int
period
(Input) - Period for which the depreciation is to be computed.
period
cannot be greater thanlife
. - float
factor
(Input) - Rate at which the balance declines.
factor
must be positive.
Return Value¶
The depreciation of an asset using the double-declining balance method for a period specified by the user. If no result can be computed, NaN is returned.
Description¶
Function depreciationDdb
computes the depreciation of an asset using the
double-declining balance method for a specified period.
It is computed using the following:
\[[\mathrm{cost} - \mathrm{salvage}(\text{total depreciation from prior periods})]
\left(\frac{\mathit{factor}}{\mathit{life}}\right)\]
Example¶
In this example, depreciationDdb
computes the depreciation of an asset,
which costs $2,500 initially, lasts 24 periods and a salvage value of $500,
for each period.
from __future__ import print_function
from numpy import *
from pyimsl.math.depreciationDdb import depreciationDdb
cost = 2500
salvage = 500
factor = 2
life = 24
for period in range(1, life + 1):
ddb = depreciationDdb(cost, salvage, life, period, factor)
print("For period %i, ddb = $%.2f." % (period, ddb))
Output¶
For period 1, ddb = $208.33.
For period 2, ddb = $190.97.
For period 3, ddb = $175.06.
For period 4, ddb = $160.47.
For period 5, ddb = $147.10.
For period 6, ddb = $134.84.
For period 7, ddb = $123.60.
For period 8, ddb = $113.30.
For period 9, ddb = $103.86.
For period 10, ddb = $95.21.
For period 11, ddb = $87.27.
For period 12, ddb = $80.00.
For period 13, ddb = $73.33.
For period 14, ddb = $67.22.
For period 15, ddb = $61.62.
For period 16, ddb = $56.48.
For period 17, ddb = $51.78.
For period 18, ddb = $47.46.
For period 19, ddb = $22.09.
For period 20, ddb = $0.00.
For period 21, ddb = $0.00.
For period 22, ddb = $0.00.
For period 23, ddb = $0.00.
For period 24, ddb = $0.00.