Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

January 2023 Assessment: R-project

ST226

Actuarial Investigations: Financial

Throughout the paper consider the prospect of investing in a small business over a 50-year period. At the end of the 50-year period any upfront costs cannot be recovered. The business is expected to generate revenue immediately, and its upfront costs and monthly cash flow are summarised below.

Note: remember that marks will be awarded for the clarity of your R code, as well as for the accuracy of your written answers.

Question 1

Write a function in R which takes as inputs an effective yearly interest rate, a time horizon in years, an upfront cost, per-period costs, per-period revenue, and the number of periods in a year (e.g. 12 for months, 4 for quarters) and returns the Net Present Value (NPV) of an investment.

Use your function to calculate the NPV for the proposed investment assuming an effective in- terest rate of 5% per year. [25 marks]

Question 2

Using the function you wrote in Question 1 produce a plot of the NPV against different values of the effective interest rate ranging from 0% to 20% per year. Interpret your plot. [25 marks]

Question 3

Explain in detail how you would calculate the internal rate of return for the proposed investment. Implement your method in R and report the output. [30 marks]

Question 4

Now suppose the effective interest rates per annum are mutually independently random vari- ables each following a Uniform distribution with support [0:02; 0:08].  Including the command set.seed(1) at the start of your code to make sure your work is reproducible:

(a)  Use R to simulate the NPV with these random interest rates. [10 marks]

(b)  Repeat your simulation from part a 1,000 times, store the results as a vector, and produce a histogram for the simulated values. [5 marks]

(c)  Use your output from part (b) to calculate the mean of the NPV as well as the probability that the NPV is smaller than the quantity you found in Question 1, when the interest rate was xed. [5 marks]