Custom function for delayed discounting
We were recently asked if there was a way to delay the start of discounting in a model. We thought this method would be useful to other users and wanted to share it with you.
You will need to add 4 variables to your model which you can do on the Variable Properties View. The variables you need to add and their definitions are:
- CustomDiscount(value) = Discount(value; discount_rate; discount_stage)
- Create this function the same way you would create a new variable. Instead of just giving the variable a name, also add in the parentheses and a name in the parentheses.
- This function can be used over and over with different parameters placed within the parentheses to be used as the argument "value" when the function runs.
- discount_rate = 0.01
- This is your discount interest rate. Set it to whatever rate you please. This one is set at 1%.
- discount_stage_start = 2
- This is the first _stage when you want discounting to start.
- In this example, assume we want _stage 0 to take zero time and then no discounting for _stage 1. This is why we set discount_stage_start = 2. This can be altered if there was a longer period with no discounting. It is then used in the last variable.....
- discount_stage = Max(0; _stage - discount_stage_start + 1)
- This is the adjusted discount _stage reflecting the delay in starting discounting for use in the CustomDiscount function you created.
The CustomDiscount function can then be used to delay discounting. You would pass in different values dependent on the payoff set. For example: we have an annual cost cAnnual and annual utility uAnnual we use the custom function as:
- Cost: CustomDiscount(cAnnual)
- Eff: CustomDiscount(uAnnual)
Once you add the 4 variables into your model, you just need to use the CustomDiscount function in the same way for all state and transition rewards.
Comments
At first, I thought the easier way to do this would be to use global discounting and use a function as your discount rate. e.g. instead of setting 0.01 in the box, setting discount_rate and then having the discount rate be something like discount_rate = If(_Stage>X;0.01;0).
However, after testing this, I've discovered that global discounting doesn't work if the discount rate changes over time. Perhaps a feature for the next release?
Harpreet,
That is an interesting idea, but it would not have completely handled the original request from the modeler.
The modeler wanted to delay discounting for 2 years, and apply discounting in the next cycle as if it were only 1 cycle into the future. Therefore, we had to come up with an approach that modified time rather than interest rate.
We can consider making the discount rate vary in the future.
Thanks for the feedback.
Andrew
Andrew,
On further thought you're actually right. My method would have resulted in future payoffs being adjusted by (payoff)/(1+r)^(_stage), while the original request was for (payoff)/(1+r)^(_stage-X), thus my method would have resulted in future payoffs being over discounted relative to what was wanted.
Harpreet
Please sign in to leave a comment.