Asset depreciation¶
Overview¶
This module implements the following functions to compute the depreciation of an asset:
depreciation_sl
: Computes the depreciation of an asset using straight line depreciation method.depreciation_soyd
: Computes the depreciation of an asset using the sum-of-year’s-digits method.depreciation_db
: Computes the depreciation of an asset using the declining balance method.
Functions in this module¶
-
cashflows.depreciation.
depreciation_db
(costs, life, salvalue=None, factor=1, convert_to_sl=True, delay=None, noprint=True)[source]¶ Computes the depreciation of an asset using the declining balance method.
Parameters: - costs (pandas.Series) – the cost per period of the assets.
- life (pandas.Series) – number of depreciation periods for the asset.
- salvalue (pandas.Series) – salvage value as a percentage of cost.
- factor (float) – acelerating factor for depreciation.
- convert_to_sl (bool) – converts to straight line method?
- noprint (bool) – when True, the procedure prints a depreciation table.
Returns: Returns a pandas DataFrame with the computations.
Examples.
>>> costs = cashflow(const_value=0, periods=16, start='2000Q1', freq='Q') >>> costs[0] = 1000 >>> life = cashflow(const_value=0, periods=16, start='2000Q1', freq='Q') >>> life[0] = 4 >>> depreciation_db(costs=costs, life=life, factor=1.5, convert_to_sl=False) Beg_Book Depr Accum_Depr End_Book 2000Q1 1000.00 375.00 375.00 625.00 2000Q2 625.00 234.38 609.38 390.62 2000Q3 390.62 146.48 755.86 244.14 2000Q4 244.14 91.55 847.41 152.59 2001Q1 152.59 0.00 847.41 152.59 2001Q2 152.59 0.00 847.41 152.59 2001Q3 152.59 0.00 847.41 152.59 2001Q4 152.59 0.00 847.41 152.59 2002Q1 152.59 0.00 847.41 152.59 2002Q2 152.59 0.00 847.41 152.59 2002Q3 152.59 0.00 847.41 152.59 2002Q4 152.59 0.00 847.41 152.59 2003Q1 152.59 0.00 847.41 152.59 2003Q2 152.59 0.00 847.41 152.59 2003Q3 152.59 0.00 847.41 152.59 2003Q4 152.59 0.00 847.41 152.59
>>> costs = cashflow(const_value=0, periods=16, start='2000Q1', freq='Q') >>> costs[0] = 1000 >>> costs[8] = 1000 >>> life = cashflow(const_value=0, periods=16, start='2000Q1', freq='Q') >>> life[0] = 4 >>> life[8] = 4 >>> depreciation_db(costs=costs, life=life, factor=1.5, convert_to_sl=False) Beg_Book Depr Accum_Depr End_Book 2000Q1 1000.00 375.00 375.00 625.00 2000Q2 625.00 234.38 609.38 390.62 2000Q3 390.62 146.48 755.86 244.14 2000Q4 244.14 91.55 847.41 152.59 2001Q1 152.59 0.00 847.41 152.59 2001Q2 152.59 0.00 847.41 152.59 2001Q3 152.59 0.00 847.41 152.59 2001Q4 152.59 0.00 847.41 152.59 2002Q1 1152.59 375.00 1222.41 777.59 2002Q2 777.59 234.38 1456.79 543.21 2002Q3 543.21 146.48 1603.27 396.73 2002Q4 396.73 91.55 1694.82 305.18 2003Q1 305.18 0.00 1694.82 305.18 2003Q2 305.18 0.00 1694.82 305.18 2003Q3 305.18 0.00 1694.82 305.18 2003Q4 305.18 0.00 1694.82 305.18
-
cashflows.depreciation.
depreciation_sl
(costs, life, salvalue=None)[source]¶ Computes the depreciation of an asset using straight line depreciation method.
Parameters: - costs (pandas.Series) – the cost per period of the assets.
- life (pandas.Series) – number of depreciation periods for the asset.
- salvalue (pandas.Series) – salvage value as a percentage of cost.
Returns: Returns a pandas DataFrame with the computations.
Examples.
>>> costs = cashflow(const_value=0, periods=16, start='2000Q1', freq='Q') >>> costs[0] = 1000 >>> life = cashflow(const_value=0, periods=16, start='2000Q1', freq='Q') >>> life[0] = 4 >>> depreciation_sl(costs=costs, life=life) Beg_Book Depr Accum_Depr End_Book 2000Q1 1000.0 250.0 250.0 750.0 2000Q2 750.0 250.0 500.0 500.0 2000Q3 500.0 250.0 750.0 250.0 2000Q4 250.0 250.0 1000.0 0.0 2001Q1 0.0 0.0 1000.0 0.0 2001Q2 0.0 0.0 1000.0 0.0 2001Q3 0.0 0.0 1000.0 0.0 2001Q4 0.0 0.0 1000.0 0.0 2002Q1 0.0 0.0 1000.0 0.0 2002Q2 0.0 0.0 1000.0 0.0 2002Q3 0.0 0.0 1000.0 0.0 2002Q4 0.0 0.0 1000.0 0.0 2003Q1 0.0 0.0 1000.0 0.0 2003Q2 0.0 0.0 1000.0 0.0 2003Q3 0.0 0.0 1000.0 0.0 2003Q4 0.0 0.0 1000.0 0.0
>>> costs = cashflow(const_value=0, periods=16, start='2000Q1', freq='Q') >>> costs[0] = 1000 >>> costs[8] = 1000 >>> life = cashflow(const_value=0, periods=16, start='2000Q1', freq='Q') >>> life[0] = 4 >>> life[8] = 4 >>> depreciation_sl(costs=costs, life=life) Beg_Book Depr Accum_Depr End_Book 2000Q1 1000.0 250.0 250.0 750.0 2000Q2 750.0 250.0 500.0 500.0 2000Q3 500.0 250.0 750.0 250.0 2000Q4 250.0 250.0 1000.0 0.0 2001Q1 0.0 0.0 1000.0 0.0 2001Q2 0.0 0.0 1000.0 0.0 2001Q3 0.0 0.0 1000.0 0.0 2001Q4 0.0 0.0 1000.0 0.0 2002Q1 1000.0 250.0 1250.0 750.0 2002Q2 750.0 250.0 1500.0 500.0 2002Q3 500.0 250.0 1750.0 250.0 2002Q4 250.0 250.0 2000.0 0.0 2003Q1 0.0 0.0 2000.0 0.0 2003Q2 0.0 0.0 2000.0 0.0 2003Q3 0.0 0.0 2000.0 0.0 2003Q4 0.0 0.0 2000.0 0.0
-
cashflows.depreciation.
depreciation_soyd
(costs, life, salvalue=None)[source]¶ Computes the depreciation of an asset using the sum-of-year’s-digits method.
Parameters: - costs (pandas.Series) – the cost per period of the assets.
- life (pandas.Series) – number of depreciation periods for the asset.
- salvalue (pandas.Series) – salvage value as a percentage of cost.
Returns: Returns a pandas DataFrame with the computations.
Examples.
>>> costs = cashflow(const_value=0, periods=16, start='2000Q1', freq='Q') >>> costs[0] = 1000 >>> life = cashflow(const_value=0, periods=16, start='2000Q1', freq='Q') >>> life[0] = 4 >>> depreciation_soyd(costs=costs, life=life) Beg_Book Depr Accum_Depr End_Book 2000Q1 1000.0 400.0 400.0 600.0 2000Q2 600.0 300.0 700.0 300.0 2000Q3 300.0 200.0 900.0 100.0 2000Q4 100.0 100.0 1000.0 0.0 2001Q1 0.0 0.0 1000.0 0.0 2001Q2 0.0 0.0 1000.0 0.0 2001Q3 0.0 0.0 1000.0 0.0 2001Q4 0.0 0.0 1000.0 0.0 2002Q1 0.0 0.0 1000.0 0.0 2002Q2 0.0 0.0 1000.0 0.0 2002Q3 0.0 0.0 1000.0 0.0 2002Q4 0.0 0.0 1000.0 0.0 2003Q1 0.0 0.0 1000.0 0.0 2003Q2 0.0 0.0 1000.0 0.0 2003Q3 0.0 0.0 1000.0 0.0 2003Q4 0.0 0.0 1000.0 0.0
>>> costs = cashflow(const_value=0, periods=16, start='2000Q1', freq='Q') >>> costs[0] = 1000 >>> costs[8] = 1000 >>> life = cashflow(const_value=0, periods=16, start='2000Q1', freq='Q') >>> life[0] = 4 >>> life[8] = 4 >>> depreciation_soyd(costs=costs, life=life) Beg_Book Depr Accum_Depr End_Book 2000Q1 1000.0 400.0 400.0 600.0 2000Q2 600.0 300.0 700.0 300.0 2000Q3 300.0 200.0 900.0 100.0 2000Q4 100.0 100.0 1000.0 0.0 2001Q1 0.0 0.0 1000.0 0.0 2001Q2 0.0 0.0 1000.0 0.0 2001Q3 0.0 0.0 1000.0 0.0 2001Q4 0.0 0.0 1000.0 0.0 2002Q1 1000.0 400.0 1400.0 600.0 2002Q2 600.0 300.0 1700.0 300.0 2002Q3 300.0 200.0 1900.0 100.0 2002Q4 100.0 100.0 2000.0 0.0 2003Q1 0.0 0.0 2000.0 0.0 2003Q2 0.0 0.0 2000.0 0.0 2003Q3 0.0 0.0 2000.0 0.0 2003Q4 0.0 0.0 2000.0 0.0