financeaccounting

deprec Pro Rated M

Only available under a commercial licence
COST (GBP)
this unit 2.70
sub units 5.40
add a commercial licence to your cart
0
viewed 1417 times
www.codecogs.com/d-ox/finance/accounting/deprecproratedm.php
Other modules that are used by this module. We add these to the cart for you whenever you add this module, unless you already own enough licences for them. Click for details
Controller: CodeCogs    Contact Controller

Interface

#include <codecogs/finance/accounting/deprecproratedm.h>

using namespace Finance::Accounting;

double deprecProRatedM (double valCost,                 int datePu,                 int dateFi,                 double valSalv,                 int per,                 double rate,                 Finance::Banking::YearBasis basis)
Return the depreciation for each accounting period. Excel: AMORDEGRC

Function Documentation

 
doubledeprecProRatedMdoublevalCost
intdatePu
intdateFi
doublevalSalv
intper
doublerate
Finance::Banking::YearBasisbasis )
This function calculates the depreciation of an asset for each accounting period. It is provided for use with the French accounting system. This function is equivalent to the Microsoft Excel function AMORDEGRC. Its behaviour is similar to that of AMORLINC, except that a depreciation coefficient is applied depending on the life of the asset. The coefficients are shown in the table below:
Life of asset (1/rate) Depreciation coefficient
Under 3 years 1.0
3<=Life<5 1.5
5<=Life<=6 2.0
More than 6 years 2.5
Example:
#include <stdio.h>
 
#include <codecogs/units/date/date.h>
#include <codecogs/units/date/dateymd.h>
#include <codecogs/finance/accounting/deprecproratedm.h>
 
int main(void)
{
  int datePur=Units::Date::date(1998, 8, 19);
  int dateFir=Units::Date::date(1998, 12, 31);
  double deprec;
  deprec=Finance::Accounting::deprecProRatedM(2400,
                                          datePur,
                                          dateFir,
                                          300,
                                          1,
                                          0.15,
                                          Finance::Banking::yb_Act);
  int y, m, d;
  
  printf("Consider an asset with the following terms:\n\n");
  printf("cost 2400, salvage 300, 1st period, rate 15%%\n");
 
  Units::Date::dateYMD(datePur, y, m, d);
  printf("purchase date %i/%i/%i, ", y, m, d);
 
  Units::Date::dateYMD(dateFir, y, m, d);
  printf("end of first period %i/%i/%i, ", y, m, d);
  
  printf("depreciation=%f\n", deprec);
  return 0;
}
Output:
Consider an asset with the following terms:
 
cost 2400, salvage 300, 1st period, rate 15%
purchase date 1998/8/19, end of first period 1998/12/31, depreciation=776.000000
Parameters:
valCostThe cost of the asset.
datePuThe date of purchase of the asset.
dateFiThe date of the end of the first period.
valSalvThe salvage value at the end of the life of the asset.
perThe period.
rateThe rate of depreciation (e.g. 15% depreciation rate is 0.15).
basisThe day count basis to use:
TypeValueDescription
yb_US0US (NASD) 30/360 - As with the European 30/360 (yb_EU, with the additional provision that if the end date occurs on the 31st of a month it is moved to the 1st of the next month if the start date is earlier than the 30th.
yb_Act1Uses the exact number of elapsed days between the two dates, as well as the exact length of the year.
yb_Act3602Uses the exact number of elapsed days between two dates but assumes the year only have 360 days
yb_Act3653Uses the exact number of elapsed days between two dates but assumes the year always has 365 days
yb_EU4European 30/360 - Each month is assumed to have 30 days, such that the year has only 360 days. Start and end dates that occur on the 31st of a month become equal to the 30th of the same month.
Returns:
The depreciation for each accounting period.
Authors:
James Warren (August 2005)
Source Code:
Register

- To get code register with CodeCogs. Already a Member, then Login.


Last Modified: 18 Oct 07 @ 17:07     Page Rendered: 2008-05-14 06:32:56

Page Comments

  You must login to leave a messge


Valid CSS!   Valid XHTML 1.0 Transitional