我需要用Python重写vdb()函数,在网上找不到实际的数学公式。下面是对函数的描述。在
VDB function
This article describes the formula syntax and usage of the VDB function in Microsoft Excel.
Description Returns the depreciation of an asset for any period you specify, including partial periods, using the double-declining balance method or some other method you specify. VDB stands for variable declining balance.
Syntax
VDB(cost, salvage, life, start_period, end_period, [factor], [no_switch])
The VDB function syntax has the following arguments:
Cost Required. The initial cost of the asset.
Salvage Required. The value at the end of the depreciation (sometimes called the salvage value of the asset). This value can be 0.
Life Required. The number of periods over which the asset is depreciated (sometimes called the useful life of the asset).
Start_period Required. The starting period for which you want to calculate the depreciation. Start_period must use the same units as life.
End_period Required. The ending period for which you want to calculate the depreciation. End_period must use the same units as life.
Factor Optional. The rate at which the balance declines. If factor is omitted, it is assumed to be 2 (the double-declining balance method). Change factor if you do not want to use the double-declining balance method. For a description of the double-declining balance method, see DDB.
No_switch Optional. A logical value specifying whether to switch to straight-line depreciation when depreciation is greater than the declining balance calculation. If no_switch is TRUE, Microsoft Excel does not switch to straight-line depreciation even when the depreciation is greater than the declining balance calculation. If no_switch is FALSE or omitted, Excel switches to straight-line depreciation when depreciation is greater than the declining balance calculation.
可变余额递减法(vdb)是余额递减法和直线折旧法的组合方法,前提是{}为假或省略。否则,即使折旧大于余额递减计算,也使用标准折旧法。下面假设
no_switch
为FALSE或省略。在公式如下:
Source&online calculatorhere,在这里您可以找到有关余额递减折旧法和直线折旧法的信息链接。在
这里讨论VDB功能: http://www.excelfunctions.net/Excel-Vdb-Function.html
默认为双倍余额递减法,如下所示: https://en.wikipedia.org/wiki/Depreciation#Doubling_Declining_balance_method
相关问题 更多 >
编程相关推荐