Modeling Depreciation
To model depreciation, two inputs are required:
1) a schedule of spend to be depreciated
2) a depreciation schedule
For this example, the index time is 10 year series with
Constant startYear=2008 Time:=Sequence (startYear,startYear+9,1)
Example depreciation schedule is a 5yr MACRS depreciation schedule entered as a variable:
Table(time)(.2,.32,.192,.1152,.1152,.0576,0,0,0,0)
SpendOverTime is a variable indexed by time with the capital spend amounts as desired:
Table(time)(0,0,111,0,0,0,0,0,0,0)
Create a user defined function:
Function_Depreciation, Parameters: (SpendOverTime,DepreciationSchedule), Definition: index depr_years = copyindex(time); var deprStartyr:=time; sum(if time-depr_years+1<1 then 0 else slice(SpendOverTime,time,Depr_years-startYear+1)*slice(depreciationSchedule,time,time-depr_years+1),depr_years)
Then create a depreciation test variable to check the result
Variable: DepreciationTest definition: function_Depreciation(spendOverTime,DepreciationSchedule)
Comments
Enable comment auto-refresher