代写F71AG Project代写R语言

- 首页 >> OS编程

F71AG Project

Deadline: Tuesday 2 April 2024 3:30 PM (Edinburgh, UK)

1 Instructions

• This is an individual project. Your work cannot be shared with anyone.

• Submission on canvas: Students must submit a) a report saved as pdf, b) the R code and c) an excel file. Name the files as follows: a) LastN ame_N ame_report.pdf, b) LastN ame_N ame_code.R or R markdown, and c) LastN ame_N ame_excel.xls or any excel file.

• Report: This is where you show all the calculations you need to support your code and is where you also report the solutions (e.g., final calculations from R such as probabilities, images from R such as the histograms, or tables with solutions) and discuss your results. This file can contain hand-written parts (using a pen in a tablet). Divide your report per Exercise and clearly present your results with all necessary explanations to support your solutions and your comments.

• R code: Must have all necessary comments to follow your steps. Students can use chunks of code from the lecturer, in that case, reference those chunks of code with a comment. Your code needs to be reproducible, for this use a seed before your simulations. Your code must be well-presented.

• Excel: This file is for the last Exercise only and it must have all the formulas you need to arrive to the final solutions, as well as necessary comments.

• Late submission penalties (from Tuesday 2 April 2024 3:31 PM included): the mark for coursework submitted late, and within 5 working days of the coursework deadline will be reduced by 30%. Coursework submitted more than 5 working days after the deadline will not be marked.

• You must submit your declaration of authorship.

• Marking: this project will be marked out of 100 marks and counts 30% of your final mark.

2 Exercises

1. A sample of n = 104 claim amounts (x1, x2, . . . , xn) gives the following statistics:

The insurer observes the following data

(a) Use the method of moments to fit the claims with an Exponential, Gamma, Pareto and Lognormal distribution.

(b) Check for each fitted model the expected number of claims in each part of the range shown in the table. Discuss your results.

[Total: 18 marks]

2. Consider two independent losses modeled with different compound Poisson pro-cesses:

where N1 has intensity λ1 = 2, claims (Xi) ∞i=1 form. an i.i.d. sequence following a Gamma(α, β) distribution with α = 8 and β such that their mean is 4, N2 has intensity λ2 = 2, claims (Yi) ∞i=1 form. an i.i.d. sequence following a Pareto(α, λ) distribution with α = 4 and λ = 8. Time is in years. Set a seed for your simulations.

(a) Simulate a sample of size n = 104 for the given compound Poisson processes in 5 years. Give a histogram for the simulations.

(b) The insurer merges both losses and denotes by S(t) = S1(t) + S2(t) its total loss. Give the histogram for the total losses in 5 years.

(c) Calculate the probabilities P(S(1) > 25) and P(S(5) > 90) with your sample, the Normal approximation and the Translated Gamma approximation. Use the sample mean, sample variance and skeewness for your calculations. Comment your results.

(d) To satisfy capital requirements, the insurer needs to report the value x such that in any 5 years P(S(t) > x) = 0.1 and make sure x does not exceed 70. First calculate x. Secondly, to satisfy the capital requirements, the insurer considers an excess of loss contract for each claim of S1 and a proportional reinsurance for S2. Try three different cases for the excess of loss and proportional reinsurance so that the retained loss satisfies the requirement.

(e) Simulate 100 points of the claim sizes Xi . Use the Panjer recursive formula to calculate P(S1(1) > 25). Discuss your results within the scope of approximat-ing probabilities.

[Total: 40 marks]

3. Consider the surplus process

where N = (N(t))t≥0 is a Poisson process with intensity λ = 5, (Xi) ∞i=1 is an i.i.d. sequence of positive r.v.’s with Pareto(5,7) distribution. Time is in years. Set a seed for your simulations.

(a) For the same initial capital, choose two different values for c and give a his-togram of the surplus in 10 years.

(b) Study the probability of ruin using a safety loading factor that is not too high. Obtain the probability of ruin simulating paths of U(t). Give as an estimator the average of m simulated probabilities.

(c) Save the ruin times you find in your simulations and give the histogram for the ruin time.

(d) Plot at least two paths of the surplus.

[Total: 24 marks]

4. A motor insurance signs policies at the beginning of every year to cover for accidents in that year. The insurance company has contracts to cover accidents in years i = 1, 2, 3, 4, 5 and assumes all claims will be fully settled in the next 4 years (j = 0, 1, 2, 3, 4). The table below has cumulative data of claims and cumulative data of number of claims. Assume the data has been adjusted.

(a) Use only the data from the claim sizes and estimate the reserve required to cover for IBNR. Give your solution per accident year and as a total.

(b) Use all the available data to estimate the the reserve required to cover for IBNR.

(c) Compare your results in (a) and (b).

[Total: 18 marks]






站长地图