Example: Depreciation - French Accounting System
In this example, the depreciation for the second accounting period is calculated for an asset.
using System;
using Imsl.Finance;
public class amordegrcEx1
{
public static void Main(String[] args)
{
double cost = 2400.0;
DateTime issue = DateTime.Parse("11/1/92");
DateTime firstPeriod = DateTime.Parse("11/30/93");
double salvage = 300.0;
int period = 2;
double rate = .15;
DayCountBasis dcb = DayCountBasis.BasisNASD;
double amordegrc = Bond.Amordegrc(cost, issue, firstPeriod,
salvage, period, rate, dcb);
Console.Out.WriteLine("The depreciation for the second accounting "
+ "period is " + amordegrc);
}
}
Output
The depreciation for the second accounting period is 334
Link to C# source.