Comments (6)
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.
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.
Got it. I think that maybe that's not actually what you want to be able to do, unless mortality
is parametric. That is:
- 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 - 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.
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.
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.
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)
- Don't use Commutation functions for Insurance Calcs
- change API for discount rates
- Make things iterable
- Improve the `show` for Life Cont. Objects
- export `APV`
- add certain and immediate annuity HOT 1
- API definitions - intervals vs n-payments HOT 3
- Add Endowment HOT 3
- API Refactor HOT 2
- TagBot trigger issue HOT 36
- survival vector on `life`?
- Update docstrings/tests for MT v2
- Add more test cases HOT 1
- Review documentation and identify things that are unclear or need additional detail
- Pull common functions out of specific packages into a Base package HOT 1
- Error reproducing README example HOT 1
- Add additional decrements
- Use SnoopCompile to precompile more stuff
- Update for FinanceCore.jl
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lifecontingencies.jl.