Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Devineau&Al's Bootstrap. #44

Open
lrnv opened this issue Apr 17, 2018 · 9 comments
Open

Adding Devineau&Al's Bootstrap. #44

lrnv opened this issue Apr 17, 2018 · 9 comments

Comments

@lrnv
Copy link

lrnv commented Apr 17, 2018

Hi,
I'm actualy trying to add some missing reserving models to the package. Is there some norms that all models should implement to be considered as viable models for Triangles ?

I've heard about the TriangleModel class, but i cant find it. Furthermore, wich S3 methods should be implemented for my new models ? What are the necessary outputs of a TriangleModel ? The issue is that with S3 classes everything is optional, so it's hard to understand how things are binded together.

I'm implementing both univariate and multivariate models (notably the recursives Mack/MW bootstraps). Do i need to know somethings specials about the Multivariate case (special classes ? special formating of outputs ? )

Is there somewhere a technical documentation about the package that could help me bring my code to the package standards ?

@mages
Copy link
Owner

mages commented Apr 19, 2018

Hi there,

You are making some interesting points. Unfortunately, there isn't a unifying approach to the various models in respect of input and output yet.

The S3 methods most reserving functions have are: print, summary and plot. The reference manual provides you with the details, also on the triangle class. The code of the triangle class is here.

Brian Fanin has developed a much more complex triangle class in the MRMR package.

Perhaps, you can share some of your work via a gist?

@trinostics
Copy link
Collaborator

Here are my two cents. You may find that many -- if not all -- of the methods in ChainLadder are based on published papers describing those methods. See for example the implementations of the Mack and Clark papers. The authors of the ChainLadder code held the UI to follow the notation of the papers quite closely. If you want to add some missing reserving models, then I might add a couple of standards to consider: 1) appropriate references and citations to published work; 2) consistency of the UI to the notation in the referenced work would be a courtesy to the eventual package user trying to understand the theory behind ChainLadder functions they are using. Thank you for your interest in ChainLadder.

@lrnv
Copy link
Author

lrnv commented Jul 20, 2018

Hi,

See a gist here : https://gist.github.com/lrnv/01c37d66f7394e221a30d54873c37a3d

The implementation of this bootstrap is based on a 2011's paper, that's quoted in the gist, if you choose the default parameters of the BootMackChainLadder function (i.e use only Triangle, the input triangle, and B, the number of bootstrap replicates).

This Mack bootstrap is prooved to converge to Mack S.E (under Mack hypohtesis) and to MW's CDR S.E (under MW hypothesis). Other possible parameter values caracterise models that are still not publicly prooved (working on it) please ignore them yet and keep the default parameters.

Only the one-year view is implemented here but every view is avaliable.

The code is obviously not optimised.

@mages
Copy link
Owner

mages commented Jul 20, 2018

Hi there the link you provided is to a private/ secret gist. Can you please change it to public, as otherwise it is not accessible.

@lrnv
Copy link
Author

lrnv commented Jul 20, 2018

Sorry, done.

Edit : i splitted the discution beetween adding this bootstrap and formating norms

@lrnv lrnv changed the title Formating norms for models Adding Devineau&Al's Bootstrap. Jul 20, 2018
@mages
Copy link
Owner

mages commented Jul 21, 2018

Hi there,

I am not sure I found the correct reference in your gist. Did you mean: England, P., & Verrall, R. (2006). Predictive distributions of outstanding liabilities in general insurance. Annals of Actuarial Science., and section 5.3 here in particular?

Sorry, I am not familiar with the Mack Bootstrap, but from skimming the above section it appears to be very similar in nature to the BootChainLadder function, yet with a different process distribution; here Normal, rather than Gamma or over-dispersed Poisson. Correct?

@lrnv
Copy link
Author

lrnv commented Jul 23, 2018

Hi,

England & verral 2006 develops a bootstrap of mack's model that use a distributional assumption (normal). The bootstrap i'm talking about dont.

The reference was kinda hidden on line 183. There it is : https://arxiv.org/ftp/arxiv/papers/1107/1107.0164.pdf

This reference develops a bootstrap aproach of Mack's model that's suited and prooved to converge to the CDR of M&W, wich is implemented in my gist.

It also develops an extention for tail factor, wich i did not implement.

Although not prooved by England & Verral (2002, not 2006), Mack's model can indeed be viewed as a quasi-GLM (with joint modeling of dispersion and weights, see McCullagh & Nelder for details about theese kind of Glm's).

But it's not quite the same as ODP or Neg.bin GLMs as implemented in the BootChainLadder function, since structures of the GLMs are very different (e.g, the responses are the individual developpement factors, not the incremental claims).

Therefore, it can not be implemented the same way. It could be implemented this way if you want : https://gist.github.com/lrnv/f87961fbbbdb277aaec3024b06bb9aad

Wich is a very easy way of implementing this GLM vision of mack's model. Note that adjustement for degree of freedom made there (and about wich England & Verall (still 2002) were still questioninng) are following the methodology of McCullagh & Nelder. The formal proof will be published soon.

@mages
Copy link
Owner

mages commented Jul 24, 2018

Thanks, that is helpful. I suggest. we set a time for a phone call to discuss in more detail. Can you please send me an email with your availability for next week?

@lrnv
Copy link
Author

lrnv commented Mar 23, 2020

Hi,

More advances were made on this work at the time, and i finaly wrote my actuarial thesis on this (sadly, in french, there, containing non-peer-reviewed proofs). I ended up putting this code in a small (working, with exemples, but laking clearer documentation) package (my first one !) there. See the R/ directory and directly read the code, or just devtools::install_github it and see it's help files for exemples.

It provides :

  • A Bootstrap of the Mack model, making no more asusmptions than the Mack model as i already said at the time. Bornhuetter-Fergusson options are avaliable
  • A Mutli-triangle version that allows joint resampling of residuals (taking into account the whole dependence structure of joint residuals, not only correlations). An option is present to use instead multivariate random normals as residuals, allowing to reproduce Merz&Wuthrich results. other possibility are offered on residuals picking.

Finaly, without more assumption than Mack's, we are able to produce CDR and other Ny-results... With just an additional normality assumption on residuals, Merz results are avaliables.

If you are still interested, I could turn this into a proper pull-request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants