From e86a25b48b4ff2703a243ebac22c1cc0c74a8d88 Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Sat, 28 Oct 2023 03:39:02 +0000 Subject: [PATCH] build based on 0fd6134 --- dev/.documenter-siteinfo.json | 2 +- dev/api/index.html | 22 +++++++++++----------- dev/index.html | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index f4d020b..a9e1b80 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.6.7","generation_timestamp":"2023-10-28T03:36:17","documenter_version":"1.1.2"}} \ No newline at end of file +{"documenter":{"julia_version":"1.6.7","generation_timestamp":"2023-10-28T03:38:56","documenter_version":"1.1.2"}} \ No newline at end of file diff --git a/dev/api/index.html b/dev/api/index.html index ae28356..612abe6 100644 --- a/dev/api/index.html +++ b/dev/api/index.html @@ -1,12 +1,12 @@ -API Reference · LifeContingencies.jl

LifeContingencies API Reference

Exported API

LifeContingencies.InsuranceMethod
Insurance(lc::LifeContingency, term)
+API Reference · LifeContingencies.jl

LifeContingencies API Reference

Exported API

LifeContingencies.InsuranceMethod
Insurance(lc::LifeContingency, term)
 Insurance(life,interest, term)
 Insurance(lc::LifeContingency)
 Insurance(life,interest)

Life insurance with a term period of term. If term is nothing, then whole life insurance.

Issue age is based on the issue_age in the LifeContingency lc.

Examples

ins = Insurance(
     SingleLife(mortality = UltimateMortality([0.5,0.5]),issue_age = 0),
     FinanceModels.Yield.Constant(0.05),
     1           # 1 year term
-) 
source
LifeContingencies.JointLifeType
struct JointLife
     lives
     contingency
     joint_assumption
@@ -28,8 +28,8 @@
     lives = (l1,l2),
     contingency = LastSurvivor(),
     joint_assumption = Frasier()
-)
source
LifeContingencies.SingleLifeType
struct SingleLife
     mortality
     issue_age::Int
     alive::Bool
@@ -40,21 +40,21 @@
 SingleLife(
     mort       = mort.select[30], 
     issue_age  = 30          
-)
source
FinanceCore.discountMethod
discount(Insurance)

The discount vector for the given insurance.

To get the fully computed and allocated vector, call collect(discount(...)).

source
FinanceCore.present_valueMethod
present_value(Insurance,`time`)

The actuarial present value of the given insurance benefits, as if you were standing at time.

For example, if the given Insurance has decremented payments [1,2,3,4,5] at times [1,2,3,4,5] and you call pv(ins,3), you will get the present value of the payments [4,5] at times [1,2].

To get an undecremented present value, divide by the survivorship to that timepoint:

present_value(ins,10) / survival(ins,10)
source
LifeContingencies.APVMethod
APV(lc::LifeContingency,to_time)

The actuarial present value which is the survival times the discount factor for the life contingency.

source
FinanceCore.discountMethod
discount(Insurance)

The discount vector for the given insurance.

To get the fully computed and allocated vector, call collect(discount(...)).

source
FinanceCore.present_valueMethod
present_value(Insurance,`time`)

The actuarial present value of the given insurance benefits, as if you were standing at time.

For example, if the given Insurance has decremented payments [1,2,3,4,5] at times [1,2,3,4,5] and you call pv(ins,3), you will get the present value of the payments [4,5] at times [1,2].

To get an undecremented present value, divide by the survivorship to that timepoint:

present_value(ins,10) / survival(ins,10)
source
LifeContingencies.APVMethod
APV(lc::LifeContingency,to_time)

The actuarial present value which is the survival times the discount factor for the life contingency.

source
LifeContingencies.AnnuityDueMethod
AnnuityDue(lc::LifeContingency; n=nothing, start_time=0; certain=nothing,frequency=1)
 AnnuityDue(life, interest; n=nothing, start_time=0; certain=nothing,frequency=1)

Annuity due with the benefit period starting at start_time and ending after n periods with frequency payments per year of 1/frequency amount and a certain period with non-contingent payments.

Examples

ins = AnnuityDue(
     SingleLife(mortality = UltimateMortality([0.5,0.5]),issue_age = 0),
     FinanceModels.Yield.Constant(0.05),
     1, # term of policy
-) 
source
LifeContingencies.AnnuityImmediateMethod
AnnuityImmediate(lc::LifeContingency; term=nothing, start_time=0; certain=nothing,frequency=1)
 AnnuityImmediate(life, interest; term=nothing, start_time=0; certain=nothing,frequency=1)

Annuity immediate with the benefit period starting at start_time and ending after term periods with frequency payments per year of 1/frequency amount and a certain period with non-contingent payments.

Examples

ins = AnnuityImmediate(
     SingleLife(mortality = UltimateMortality([0.5,0.5]),issue_age = 0),
     FinanceModels.Yield.Constant(0.05),
     1 # term of policy
-) 
source
LifeContingencies.cashflowsMethod
cashflows(Insurance)

The vector of decremented benefit cashflows for the given insurance.

To get the fully computed and allocated vector, call collect(cashflows(...)).

source
LifeContingencies.premium_netMethod
premium_net(lc::LifeContingency)
-premium_net(lc::LifeContingency,to_time)

The net premium for a whole life insurance (without second argument) or a term life insurance through to_time.

The net premium is based on 1 unit of insurance with the death benfit payable at the end of the year and assuming annual net premiums.

source
LifeContingencies.probabilityMethod
probability(Insurance)

The vector of contingent benefit probabilities for the given insurance.

To get the fully computed and allocated vector, call collect(probability(...)).

source
LifeContingencies.timepointsMethod
timepoints(Insurance)

The vector of times corresponding to the cashflow vector for the given insurance.

To get the fully computed and allocated vector, call collect(timepoints(...)).

source
LifeContingencies.cashflowsMethod
cashflows(Insurance)

The vector of decremented benefit cashflows for the given insurance.

To get the fully computed and allocated vector, call collect(cashflows(...)).

source
LifeContingencies.premium_netMethod
premium_net(lc::LifeContingency)
+premium_net(lc::LifeContingency,to_time)

The net premium for a whole life insurance (without second argument) or a term life insurance through to_time.

The net premium is based on 1 unit of insurance with the death benfit payable at the end of the year and assuming annual net premiums.

source
LifeContingencies.probabilityMethod
probability(Insurance)

The vector of contingent benefit probabilities for the given insurance.

To get the fully computed and allocated vector, call collect(probability(...)).

source
LifeContingencies.timepointsMethod
timepoints(Insurance)

The vector of times corresponding to the cashflow vector for the given insurance.

To get the fully computed and allocated vector, call collect(timepoints(...)).

source
MortalityTables.omegaMethod
omega(lc::LifeContingency)
 omega(l::Life)
-omega(i::InterestRate)

Lifes and LifeContingencys

Returns the last defined timeperiod for both the interest rate and mortality table. Note that this is different than calling omega on a MortalityTable, which will give you the last `attainedage`.

Example: if the LifeContingency has issue age 60, and the last defined attained age for the MortalityTable is 100, then omega of the MortalityTable will be 100 and omega of the LifeContingency will be 40.

InterestRates

The last period that the interest rate is defined for. Assumed to be infinite (Inf) for functional and constant interest rate types. Returns the lastindex of the vector if a vector type.

source
MortalityTables.survivalMethod
survival(Insurance)

The survivorship vector for the given insurance.

To get the fully computed and allocated vector, call collect(survival(...)).

source
MortalityTables.survivalMethod
survival(lc::LifeContingency,from_time,to_time)
-survival(lc::LifeContingency,to_time)

Return the probability of survival for the given LifeContingency, with decrements beginning at time zero.

Examples

```julia-repl julia> q = [.1,.2,.3,.4];

julia> l = SingleLife(mortality=q);

julia> survival(l,1) 0.9

julia> decrement(l,1) 0.09999999999999998

julia> survival(l,1,2) 0.8

julia> decrement(l,1,2) 0.19999999999999996

julia> survival(l,1,3) 0.5599999999999999

julia> decrement(l,1,3) 0.44000000000000006

```
source

Unexported API

LifeContingencies.ContingencyType
Contingency()

An abstract type representing the different triggers for contingent benefits. Available options to use include:

  • LastSurvivor()
source
LifeContingencies.JointAssumptionType
JointAssumption()

An abstract type representing the different assumed relationship between the survival of the lives on a JointLife. Available options to use include:

  • Frasier()
source
LifeContingencies.CMethod
C(lc::LifeContingency, to_time)

$C_x$ is a retrospective actuarial commutation function which is the product of the discount factor and the difference in l ($l_x$).

source
LifeContingencies.DMethod
D(lc::LifeContingency, to_time)

$D_x$ is a retrospective actuarial commutation function which is the product of the survival and discount factor.

source
LifeContingencies.MMethod
M(lc::LifeContingency, from_time)

The $M_x$ actuarial commutation function where the from_time argument is x. Issue age is based on the issue_age in the LifeContingency lc.

source
LifeContingencies.NMethod
N(lc::LifeContingency, from_time)

$N_x$ is a prospective actuarial commutation function which is the sum of the D ($D_x$) values from the given time to the end of the mortality table.

source
LifeContingencies.lMethod
l(lc::LifeContingency, to_time)

$l_x$ is a retrospective actuarial commutation function which is the survival up to a certain point in time. By default, will have a unitary basis (ie 1.0), but you can specify basis keyword argument to use something different (e.g. 1000 is common in the literature.)

source
MortalityTables.decrementMethod
decrement(lc::LifeContingency,to_time)
+omega(i::InterestRate)

Lifes and LifeContingencys

Returns the last defined timeperiod for both the interest rate and mortality table. Note that this is different than calling omega on a MortalityTable, which will give you the last `attainedage`.

Example: if the LifeContingency has issue age 60, and the last defined attained age for the MortalityTable is 100, then omega of the MortalityTable will be 100 and omega of the LifeContingency will be 40.

InterestRates

The last period that the interest rate is defined for. Assumed to be infinite (Inf) for functional and constant interest rate types. Returns the lastindex of the vector if a vector type.

source
MortalityTables.survivalMethod
survival(Insurance)

The survivorship vector for the given insurance.

To get the fully computed and allocated vector, call collect(survival(...)).

source
MortalityTables.survivalMethod
survival(lc::LifeContingency,from_time,to_time)
+survival(lc::LifeContingency,to_time)

Return the probability of survival for the given LifeContingency, with decrements beginning at time zero.

Examples

```julia-repl julia> q = [.1,.2,.3,.4];

julia> l = SingleLife(mortality=q);

julia> survival(l,1) 0.9

julia> decrement(l,1) 0.09999999999999998

julia> survival(l,1,2) 0.8

julia> decrement(l,1,2) 0.19999999999999996

julia> survival(l,1,3) 0.5599999999999999

julia> decrement(l,1,3) 0.44000000000000006

```
source

Unexported API

LifeContingencies.ContingencyType
Contingency()

An abstract type representing the different triggers for contingent benefits. Available options to use include:

  • LastSurvivor()
source
LifeContingencies.JointAssumptionType
JointAssumption()

An abstract type representing the different assumed relationship between the survival of the lives on a JointLife. Available options to use include:

  • Frasier()
source
LifeContingencies.CMethod
C(lc::LifeContingency, to_time)

$C_x$ is a retrospective actuarial commutation function which is the product of the discount factor and the difference in l ($l_x$).

source
LifeContingencies.DMethod
D(lc::LifeContingency, to_time)

$D_x$ is a retrospective actuarial commutation function which is the product of the survival and discount factor.

source
LifeContingencies.MMethod
M(lc::LifeContingency, from_time)

The $M_x$ actuarial commutation function where the from_time argument is x. Issue age is based on the issue_age in the LifeContingency lc.

source
LifeContingencies.NMethod
N(lc::LifeContingency, from_time)

$N_x$ is a prospective actuarial commutation function which is the sum of the D ($D_x$) values from the given time to the end of the mortality table.

source
LifeContingencies.lMethod
l(lc::LifeContingency, to_time)

$l_x$ is a retrospective actuarial commutation function which is the survival up to a certain point in time. By default, will have a unitary basis (ie 1.0), but you can specify basis keyword argument to use something different (e.g. 1000 is common in the literature.)

source
MortalityTables.decrementMethod
decrement(lc::LifeContingency,to_time)
 decrement(lc::LifeContingency,from_time,to_time)

Return the probability of death for the given LifeContingency, with decrements beginning at time zero.

Examples

julia> q = [.1,.2,.3,.4];
 
 julia> l = SingleLife(mortality=q);
@@ -75,4 +75,4 @@
 0.5599999999999999
 
 julia> decrement(l,1,3)
-0.44000000000000006
source

Please open an issue if you encounter any issues or confusion with the package.

+0.44000000000000006
source

Please open an issue if you encounter any issues or confusion with the package.

diff --git a/dev/index.html b/dev/index.html index 6f51371..99e6d42 100644 --- a/dev/index.html +++ b/dev/index.html @@ -117,4 +117,4 @@ } + async src="//gc.zgo.at/count.js">