The following programming task was set for me during a recent internship. Here is the specification:
A person who has a bad motor accident can be awarded a payment stream for the rest of their life by the UK courts.
What we have:
- The age of the life at the settlement date: 10
- A series of payments, starting immediately at the settlement date, at the start of each year for n years.
- A probability of survival for each year of life . i.e. the probability that a y year-old will live to y+1
- There is a discount rate of 1.5%
What we need:
A C# function that returns, at any point during the payment stream , the ‘value’ of the outstanding series of payments:
- Discount the cashflow to the specified time
- Multiply each cashflow by the probability of survival for that age