IFinance.Ddb

Fore Syntax

Ddb(

Cost: Double;

Salvage: Double;

Life: Double;

Period: Double;

Factor: Double): Double;

Fore.NET Syntax

Ddb(

Cost: double;

Salvage: double;

Life: double;

Period: double;

Factor: double): double;

Parameters

Parameters Description Constraints
Cost The initial cost of the asset. Cannot be negative.
Salvage The salvage value at the end of the lifetime of the asset. Must belong to the [0;Cost] interval.
Life The number of periods of the asset's useful life. Must be positive.
Period The period, for which depreciation has to be calculated. The period must be measured in the same units as Life. Must be in the [1;Life] interval
Factor Interest rate of a decreasing remainder. Must be positive.

Description

The Ddb method returns the value of asset depreciation for this period.

Comments

Calculation method depends on the interest rate of decreasing remainder.

The Ddb method calculates depreciation, using an increased coefficient. Depreciation is maximum in the first period, decreasing in the following periods. The Ddb function uses the following formula to calculate depreciation for a period:

min((Cost - total depreciation for previous periods) * (Factor/Life);

(Cost - Salvage - total depreciation for previous periods)).

If it is required to use double declining method to calculate depreciation, the Factor parameters must be equal to 2.

Fore Example

To execute the example, add a link to the MathFin system assembly.

Sub UserProc;
Var
    r: Double;
Begin
    r := Finance.
Ddb(5400012002467);
    Debug.WriteLine(r);
End Sub UserProc;

After executing the example the console window displays the asset depreciation value equal to 2808.4646154333.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.MathFin;

Public Shared Sub Main(Params: StartParams);
Var
    r: double;
    Finance: FinanceClass = New FinanceClass();
Begin
    r := Finance.Ddb(5400012002467);
    System.Diagnostics.Debug.WriteLine(r);
End Sub;

See also:

IFinance