Git Product home page Git Product logo

Comments (6)

alecloudenback avatar alecloudenback commented on July 17, 2024

Thanks! Do you mind posting a snippet of what you are currently doing? And then potentially what you'd like to do as an alternative?

from lifecontingencies.jl.

Soel-Philippe avatar Soel-Philippe commented on July 17, 2024

Thanks for your reply.
I think for completeness, it'd be good for fractional ages to be supported.
Example:
Suppose I want to build a constructor of SingleLife objects having a custom life_table built from MortalityTables...
I'd do it as:

sl(age::Real)=SingleLife(life_table,issue_age=age,alive=true,fractional_assump=Uniform())

I'd build a LifeContingency constructor on such a SingleLife as:

lc(age::Real,y::Real=0.0485)=LifeContingency(sl(age),Rate(y,Periodic(1))

As it's implemented now, I can't construct a LifeContingency as lc(23.75), it throws an ERROR.
The SingleLife constructor requires it's second args to be of type Int64.

Since it does interact with MortalityTables' objects, I don't know how much work is
needed to implement this... but I think a layer should be added between SingleLife
objects and MortalityTables' ones...

from lifecontingencies.jl.

alecloudenback avatar alecloudenback commented on July 17, 2024

Got it. I think that maybe that's not actually what you want to be able to do, unless mortality is parametric. That is:

  1. if mortality is a vector of rates, then there's an inherent assumption about how issue ages get mapped from a Real to an Integer (see Age Last Birthday vs Age Nearest Birthday). The rates in the mortality assume that you start at an integer age as defined for that table via ALB or ANB
  2. if mortality is a parametric model then a fractional starting age makes sense because the force of mortality is continuous and there's no need to map an issue age to ALB or ANB

Number 2 is actually not permitted currently but it should be, I have a draft PR up at #79. Before merging that, I wanted to get your thoughts. I think you were asking about number 1, but I'm not sure that it should be supported.

from lifecontingencies.jl.

Soel-Philippe avatar Soel-Philippe commented on July 17, 2024

Yes sir, being able to use a general parametric model, not only the Gompertz-Makeham, would be great!
But would you please to tell me how do I deal with non-Int ages? Assuming I have a table of rates (only
rates of Int ages).
If don't want to build the whole thing myself, using your API, how do I issue a policy with issue_age=25.25?

from lifecontingencies.jl.

alecloudenback avatar alecloudenback commented on July 17, 2024

It's the ALB vs ANB thing. When a mortality rate table is constructed, it is assumed that the issue age is an integer by rounding the fractional age to an integer before doing the computations. Mortality tables should say whether they are constructed assuming an integer issue age of ALB or ANB (e.g. 2001 Valuation Basic Table (VBT) Preferred Select and Ultimate Table - Male Nonsmoker. Basis: Age Nearest Birthday. )

In your example, actual issue age of 25.25 means you should use 25 for both age-last-birthday and age-nearest-birthday. However, 25.75 would be 25 or 26 depending on how the underlying table was calculated.

You said: "custom life_table built from MortalityTables" - do you know what the assumption was (ALB/ANB) when the custom table was constructed?

from lifecontingencies.jl.

Soel-Philippe avatar Soel-Philippe commented on July 17, 2024

That's the thing, I don't know the assumptions but I think it's foundable!
Thanks for your reply.

from lifecontingencies.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.