Functional API#

The functional API provides standalone functions that delegate to OOP methods on actuarial table instances. Decrement probability functions (px, qx, ix, ox, lx, dx, tpx, tqx) accept LifeTable, DisabilityTable, or ExitTable as appropriate. Annuities, insurances, endowments, commutation functions, and multi-life products require LifeTable. Multi-life functions (äxy, äjoint, etc.) take a sequence of LifeTable instances as their first argument.

Use the functional API when:

  • You prefer a procedural style or want tabular functional composition.

  • You are working with heterogeneous collections of table instances.

  • You need to pass actuarial functions as callables to higher-order operations.

For all other workflows the OOP methods on LifeTable, DisabilityTable, or ExitTable are recommended.

See also

Functional API — Why and when to use the functional API.
Batch Calculations — Multi-table batch dispatch and portfolio BEL.

Single-life functions#

lactuca.äx(table: LifeTable | Sequence[LifeTable], x: object, *, ts: object = 0.0, d: object = 0.0, n: object = None, m: Literal[1, 2, 3, 4, 6, 12, 14, 24, 26, 52, 365] | Sequence[int] | NDArray[int64] = 1, gr: GrowthRate | float | None | Sequence[GrowthRate | float | None] = None, cashflow_amounts: Sequence[float] | None = None, ir: object = None, return_flows: bool = False, t_output: NDArray[float64] | None = None, benefits: Sequence[float] | NDArray[float64] | None = None, on_error: Literal['raise', 'nan'] = 'raise', record_ids: Sequence[Any] | None = None) float | NDArray[float64] | dict[str, NDArray[float64] | float] | BatchResult#
lactuca.ax(table: LifeTable | Sequence[LifeTable], x: object, *, ts: object = 0.0, d: object = 0.0, n: object = None, m: Literal[1, 2, 3, 4, 6, 12, 14, 24, 26, 52, 365] | Sequence[int] | NDArray[int64] = 1, gr: GrowthRate | float | None | Sequence[GrowthRate | float | None] = None, cashflow_times: Sequence[float] | None = None, cashflow_amounts: Sequence[float] | None = None, ir: object = None, return_flows: bool = False, t_output: NDArray[float64] | None = None, benefits: Sequence[float] | NDArray[float64] | None = None, on_error: Literal['raise', 'nan'] = 'raise', record_ids: Sequence[Any] | None = None) float | NDArray[float64] | dict[str, NDArray[float64] | float] | BatchResult#
lactuca.Ax(table: LifeTable | Sequence[LifeTable], x: object, *, ts: object = 0.0, d: object = 0.0, n: object = None, m: Literal[1, 2, 3, 4, 6, 12, 14, 24, 26, 52, 365] | Sequence[int] | NDArray[int64] = 1, gr: GrowthRate | float | None | Sequence[GrowthRate | float | None] = None, ir: object = None, cashflow_times: Sequence[float] | None = None, cashflow_amounts: Sequence[float] | None = None, return_flows: bool = False, t_output: NDArray[float64] | None = None, benefits: Sequence[float] | NDArray[float64] | None = None, on_error: Literal['raise', 'nan'] = 'raise', record_ids: Sequence[Any] | None = None) float | NDArray[float64] | dict[str, NDArray[float64] | float] | BatchResult#
lactuca.nEx(table: LifeTable | Sequence[LifeTable], x: object, *, n: object, ts: object = 0.0, ir: object = None, return_flows: bool = False, t_output: NDArray[float64] | None = None, benefits: Sequence[float] | NDArray[float64] | None = None, on_error: Literal['raise', 'nan'] = 'raise', record_ids: Sequence[Any] | None = None) float | NDArray[float64] | dict[str, NDArray[float64] | float] | BatchResult#
lactuca.px(table: LifeTable | DisabilityTable | ExitTable, x: object = None, m: Literal[1, 2, 3, 4, 6, 12, 14, 24, 26, 52, 365] = 1) object#

Return survival probability \(p_x\) from a life, disability, or exit table.

Parameters:
  • table (AnyTable) – Actuarial table instance (LifeTable, DisabilityTable, or ExitTable).

  • x (float, int, sequence of float, NDArray[np.float64], or None, optional) – Age(s) to evaluate. Pandas and Polars Series are accepted; converted to float64 by the delegated OOP method. If None, returns all \(p_x\) values.

  • m (PaymentFrequencyLiteral, optional) – Frequency divisor; returns the \(1/m\)-year probability (default 1 for annual).

Returns:

Survival probability value(s).

Return type:

float or NDArray[np.float64]

Raises:

TypeError – If any age or duration argument is a boolean. If m is a boolean.

See also

DecrementTable.px

OOP equivalent on LifeTable, DisabilityTable, and ExitTable.

Examples

>>> from lactuca import LifeTable, px
>>> lt = LifeTable('PASEM2010', 'm')
>>> px(lt, 65)  # annual survival probability at age 65
lactuca.qx(table: LifeTable, x: object = None, m: Literal[1, 2, 3, 4, 6, 12, 14, 24, 26, 52, 365] = 1) object#

Return decrement probability \(q_x\) from a LifeTable.

Parameters:
  • table (LifeTable) – Life table instance. DisabilityTable and ExitTable raise NotImplementedError because their primary decrement is not qx (use ix or ox instead).

  • x (float, int, sequence of float, NDArray[np.float64], or None, optional) – Age(s) to evaluate. Pandas and Polars Series are accepted; converted to float64 by the delegated OOP method. If None, returns all \(q_x\) values.

  • m (PaymentFrequencyLiteral, optional) – Frequency divisor; returns the \(1/m\)-year probability (default 1 for annual).

Returns:

Death/decrement probability value(s).

Return type:

float or NDArray[np.float64]

Raises:
  • TypeError – If any age argument is a boolean. If m is a boolean.

  • NotImplementedError – If table is a DisabilityTable or ExitTable.

See also

DecrementTable.qx

OOP method (LifeTable only; raises NotImplementedError on other tables).

Examples

>>> from lactuca import LifeTable, qx
>>> lt = LifeTable('PASEM2010', 'm')
>>> qx(lt, 65)  # annual decrement probability at age 65
lactuca.tpx(table: LifeTable | DisabilityTable | ExitTable, x: object, *, t: object = 1) object#

Return interval survival probability \({}_t p_x\).

Parameters:
  • table (AnyTable) – Actuarial table instance (LifeTable, DisabilityTable, or ExitTable).

  • x (float, int, sequence of float, or NDArray[np.float64]) – Entry age(s). Pandas and Polars Series are accepted; converted to float64 internally.

  • t (float, int, sequence of float, or NDArray[np.float64], optional) – Duration(s) in years (default 1). Pandas and Polars Series are accepted.

Returns:

Survival probability value(s).

Return type:

float or NDArray[np.float64]

Raises:

TypeError – If any age or duration argument is a boolean.

See also

DecrementTable.tpx

OOP equivalent on LifeTable, DisabilityTable, and ExitTable.

Examples

>>> from lactuca import LifeTable, tpx
>>> lt = LifeTable('PASEM2010', 'm')
>>> tpx(lt, 65, t=10)  # 10-year survival probability from age 65
lactuca.tqx(table: LifeTable | DisabilityTable | ExitTable, x: object, *, t: object = 1) object#

Return interval death/decrement probability \({}_t q_x\).

Parameters:
  • table (AnyTable) – Actuarial table instance (LifeTable, DisabilityTable, or ExitTable).

  • x (float, int, sequence of float, or NDArray[np.float64]) – Entry age(s). Pandas and Polars Series are accepted; converted to float64 internally.

  • t (float, int, sequence of float, or NDArray[np.float64], optional) – Duration(s) in years (default 1). Pandas and Polars Series are accepted.

Returns:

Death/decrement probability value(s).

Return type:

float or NDArray[np.float64]

Raises:

TypeError – If any age or duration argument is a boolean.

See also

DecrementTable.tqx

OOP equivalent on LifeTable, DisabilityTable, and ExitTable.

Examples

>>> from lactuca import LifeTable, tqx
>>> lt = LifeTable('PASEM2010', 'm')
>>> tqx(lt, 65, t=10)  # 10-year decrement probability from age 65
lactuca.lx(table: LifeTable | DisabilityTable | ExitTable, x: object = None) object#

Return \(\ell_x\) values from a life, disability, or exit table.

Parameters:
  • table (AnyTable) – Actuarial table instance (LifeTable, DisabilityTable, or ExitTable).

  • x (float, int, sequence of float, NDArray[np.float64], or None, optional) – Age(s) to evaluate. Pandas and Polars Series are accepted; converted to float64 by the delegated OOP method. If None, returns all \(\ell_x\) values.

Returns:

Survivor values at age(s) \(x\).

Return type:

float or NDArray[np.float64]

Raises:

TypeError – If any age or duration argument is a boolean.

See also

DecrementTable.lx

OOP equivalent on LifeTable, DisabilityTable, and ExitTable.

Examples

>>> from lactuca import LifeTable, lx
>>> lt = LifeTable('PASEM2010', 'm')
>>> lx(lt, 65)
lactuca.dx(table: LifeTable | DisabilityTable | ExitTable, x: object = None) object#

Return \(d_x\) values (number of decrements between ages \(x\) and \(x+1\)).

Parameters:
  • table (AnyTable) – Actuarial table instance (LifeTable, DisabilityTable, or ExitTable).

  • x (float, int, sequence of float, NDArray[np.float64], or None, optional) – Age(s) to evaluate. Pandas and Polars Series are accepted; converted to float64 by the delegated OOP method. If None, returns all \(d_x\) values.

Returns:

Decrement count value(s).

Return type:

float or NDArray[np.float64]

Raises:

TypeError – If any age or duration argument is a boolean.

See also

DecrementTable.dx

OOP equivalent on LifeTable, DisabilityTable, and ExitTable.

Examples

>>> from lactuca import LifeTable, dx
>>> lt = LifeTable('PASEM2010', 'm')
>>> dx(lt, 65)  # number of deaths between ages 65 and 66
lactuca.ex(table: LifeTable, x: object) object#

Return complete expectation of life \(\mathring{e}_x\) (integer ages only).

The function name ex is a short API alias for \(\mathring{e}_x\) (complete), not curtate \(e_x\).

Parameters:
  • table (LifeTable) – Life table instance.

  • x (int, sequence of int, or NDArray[np.float64]) – Integer age(s). Pandas and Polars Series of int are accepted.

Returns:

Complete expectation of life at age(s) \(x\).

Return type:

float or NDArray[np.float64]

Raises:

TypeError – If any age or duration argument is a boolean.

See also

LifeTable.ex

OOP equivalent on LifeTable.

LifeTable.ex_curtate

Curtate expectation \(e_x\) at integer ages.

Examples

>>> from lactuca import LifeTable, ex
>>> lt = LifeTable('PASEM2010', 'm')
>>> ex(lt, 65)  # complete expectation of life at age 65
lactuca.ex_curtate(table: LifeTable, x: object) object#

Return curtate expectation of life \(e_x\) (integer ages only).

The API name ex_curtate denotes curtate \(e_x = \sum_{k=1}^{\omega-x} {}_k p_x\), not the complete expectation \(\mathring{e}_x\) returned by ex().

Parameters:
  • table (LifeTable) – Life table instance.

  • x (int, sequence of int, or NDArray[np.float64]) – Integer age(s). Pandas and Polars Series of int are accepted.

Returns:

Curtate expectation of life at age(s) \(x\).

Return type:

float or NDArray[np.float64]

Raises:

TypeError – If any age or duration argument is a boolean.

See also

LifeTable.ex_curtate

OOP equivalent on LifeTable.

ex

Complete expectation \(\mathring{e}_x\).

Examples

>>> from lactuca import LifeTable, ex_curtate
>>> lt = LifeTable('PASEM2010', 'm')
>>> ex_curtate(lt, 65)  # curtate expectation at age 65
lactuca.ex_continuous(table: LifeTable, x: object, *, m: Literal[1, 2, 3, 4, 6, 12, 14, 24, 26, 52, 365] = 12) object#

Return continuous expectation of life \(\mathring{e}_x\) for fractional ages.

Parameters:
  • table (LifeTable) – Life table instance.

  • x (float or sequence of float) – Fractional (non-integer) age(s). Integer ages raise ValueError.

  • m (PaymentFrequencyLiteral, optional) – Number of subintervals for numerical integration (default 12).

Returns:

Complete expectation of life at fractional age(s) \(x\).

Return type:

float or NDArray[np.float64]

Raises:
  • TypeError – If any age argument is a boolean. If m is a boolean.

  • ValueError – If any age in x is an integer.

See also

LifeTable.ex_continuous

OOP equivalent on LifeTable.

ex

Discrete variant for integer ages.

Examples

>>> from lactuca import LifeTable, ex_continuous
>>> lt = LifeTable('PASEM2010', 'm')
>>> ex_continuous(lt, 65.5, m=12)
lactuca.ix(table: DisabilityTable, x: object = None, m: Literal[1, 2, 3, 4, 6, 12, 14, 24, 26, 52, 365] = 1) object#

Return disability incidence probability \(i_x\) from a DisabilityTable.

Parameters:
  • table (DisabilityTable) – Disability table instance. LifeTable and ExitTable raise NotImplementedError because they do not model disability.

  • x (float, int, sequence of float, NDArray[np.float64], or None, optional) – Age(s) to evaluate. Pandas and Polars Series are accepted; converted to float64 by the delegated OOP method. If None, returns all \(i_x\) values.

  • m (PaymentFrequencyLiteral, optional) – Frequency divisor; returns the \(1/m\)-year probability (default 1 for annual).

Returns:

Disability incidence probability value(s).

Return type:

float or NDArray[np.float64]

Raises:
  • TypeError – If any age argument is a boolean. If m is a boolean.

  • NotImplementedError – If table is a LifeTable or ExitTable.

See also

DisabilityTable.ix

OOP equivalent on DisabilityTable.

Examples

>>> from lactuca import DisabilityTable, ix
>>> dt = DisabilityTable('DummySD2015', 'm')
>>> ix(dt, 45)  # disability incidence probability at age 45
lactuca.ox(table: ExitTable, x: object = None, m: Literal[1, 2, 3, 4, 6, 12, 14, 24, 26, 52, 365] = 1) object#

Return exit/turnover probability \(o_x\) from an ExitTable.

Parameters:
  • table (ExitTable) – Exit table instance. LifeTable and DisabilityTable raise NotImplementedError because they do not model exit/turnover.

  • x (float, int, sequence of float, NDArray[np.float64], or None, optional) – Age(s) to evaluate. Pandas and Polars Series are accepted; converted to float64 by the delegated OOP method. If None, returns all \(o_x\) values.

  • m (PaymentFrequencyLiteral, optional) – Frequency divisor; returns the \(1/m\)-year probability (default 1 for annual).

Returns:

Exit probability value(s).

Return type:

float or NDArray[np.float64]

Raises:
  • TypeError – If any age argument is a boolean. If m is a boolean.

  • NotImplementedError – If table is a LifeTable or DisabilityTable.

See also

ExitTable.ox

OOP equivalent on ExitTable.

Examples

>>> from lactuca import ExitTable, ox
>>> et = ExitTable('DummyEXIT', 'm')
>>> ox(et, 40)  # exit probability at age 40

Commutation functions#

lactuca.Dx(table: LifeTable, x: object = None, *, ir: object = None, x0: object = 0) object#

Return commutation function \(D_x = v^x \ell_x\).

Parameters:
  • table (LifeTable) – Life table instance.

  • x (int, sequence of int, NDArray[np.float64], or None, optional) – Integer age(s). Pandas and Polars Series of int are accepted. If None, returns all ages.

  • ir (float, InterestRate, or None, optional) – Interest rate. If None, uses table.interest_rate.

  • x0 (int, optional) – Reference origin for discount factors (default 0).

Returns:

\(D_x\) value(s).

Return type:

float or NDArray[np.float64]

Raises:

TypeError – If any age, discount-origin, or interest-rate argument is a boolean.

See also

LifeTable.Dx

OOP equivalent on LifeTable.

Nx

Commutation function \(N_x = \sum_{t \geq x} D_t\).

Examples

>>> from lactuca import LifeTable, Dx
>>> lt = LifeTable('PASEM2010', 'm')
>>> Dx(lt, 65, ir=0.03)
lactuca.Nx(table: LifeTable, x: object = None, *, ir: object = None, x0: object = 0) object#

Return commutation function \(N_x = \sum_{t \geq x} D_t\).

Parameters:
  • table (LifeTable) – Life table instance.

  • x (int, sequence of int, NDArray[np.float64], or None, optional) – Integer age(s). Pandas and Polars Series of int are accepted. If None, returns all ages.

  • ir (float, InterestRate, or None, optional) – Interest rate. If None, uses table.interest_rate.

  • x0 (int, optional) – Reference origin for discount factors (default 0).

Returns:

\(N_x\) value(s).

Return type:

float or NDArray[np.float64]

Raises:

TypeError – If any age, discount-origin, or interest-rate argument is a boolean.

See also

LifeTable.Nx

OOP equivalent on LifeTable.

Dx

Commutation function \(D_x = v^x \ell_x\).

Sx

Commutation function \(S_x = \sum_{t \geq x} N_t\).

Examples

>>> from lactuca import LifeTable, Nx
>>> lt = LifeTable('PASEM2010', 'm')
>>> Nx(lt, 65, ir=0.03)
lactuca.Sx(table: LifeTable, x: object = None, *, ir: object = None, x0: object = 0) object#

Return commutation function \(S_x = \sum_{t \geq x} N_t\).

Parameters:
  • table (LifeTable) – Life table instance.

  • x (int, sequence of int, NDArray[np.float64], or None, optional) – Integer age(s). Pandas and Polars Series of int are accepted. If None, returns all ages.

  • ir (float, InterestRate, or None, optional) – Interest rate. If None, uses table.interest_rate.

  • x0 (int, optional) – Reference origin for discount factors (default 0).

Returns:

\(S_x\) value(s).

Return type:

float or NDArray[np.float64]

Raises:

TypeError – If any age, discount-origin, or interest-rate argument is a boolean.

See also

LifeTable.Sx

OOP equivalent on LifeTable.

Nx

Commutation function \(N_x = \sum_{t \geq x} D_t\).

Examples

>>> from lactuca import LifeTable, Sx
>>> lt = LifeTable('PASEM2010', 'm')
>>> Sx(lt, 65, ir=0.03)
lactuca.Cx(table: LifeTable, x: object = None, *, ir: object = None, x0: object = 0) object#

Return commutation function \(C_x = v^{x+\alpha} d_x\).

Parameters:
  • table (LifeTable) – Life table instance.

  • x (int, sequence of int, NDArray[np.float64], or None, optional) – Integer age(s). Pandas and Polars Series of int are accepted. If None, returns all ages.

  • ir (float, InterestRate, or None, optional) – Interest rate. If None, uses table.interest_rate.

  • x0 (int, optional) – Reference origin for discount factors (default 0).

Returns:

\(C_x\) value(s).

Return type:

float or NDArray[np.float64]

Raises:

TypeError – If any age, discount-origin, or interest-rate argument is a boolean.

See also

LifeTable.Cx

OOP equivalent on LifeTable.

Mx

Commutation function \(M_x = \sum_{t \geq x} C_t\).

Examples

>>> from lactuca import LifeTable, Cx
>>> lt = LifeTable('PASEM2010', 'm')
>>> Cx(lt, 65, ir=0.03)
lactuca.Mx(table: LifeTable, x: object = None, *, ir: object = None, x0: object = 0) object#

Return commutation function \(M_x = \sum_{t \geq x} C_t\).

Parameters:
  • table (LifeTable) – Life table instance.

  • x (int, sequence of int, NDArray[np.float64], or None, optional) – Integer age(s). Pandas and Polars Series of int are accepted. If None, returns all ages.

  • ir (float, InterestRate, or None, optional) – Interest rate. If None, uses table.interest_rate.

  • x0 (int, optional) – Reference origin for discount factors (default 0).

Returns:

\(M_x\) value(s).

Return type:

float or NDArray[np.float64]

Raises:

TypeError – If any age, discount-origin, or interest-rate argument is a boolean.

See also

LifeTable.Mx

OOP equivalent on LifeTable.

Cx

Commutation function \(C_x = v^{x+\alpha} d_x\).

Rx

Commutation function \(R_x = \sum_{t \geq x} M_t\).

Examples

>>> from lactuca import LifeTable, Mx
>>> lt = LifeTable('PASEM2010', 'm')
>>> Mx(lt, 65, ir=0.03)
lactuca.Rx(table: LifeTable, x: object = None, *, ir: object = None, x0: object = 0) object#

Return commutation function \(R_x = \sum_{t \geq x} M_t\).

Parameters:
  • table (LifeTable) – Life table instance.

  • x (int, sequence of int, NDArray[np.float64], or None, optional) – Integer age(s). Pandas and Polars Series of int are accepted. If None, returns all ages.

  • ir (float, InterestRate, or None, optional) – Interest rate. If None, uses table.interest_rate.

  • x0 (int, optional) – Reference origin for discount factors (default 0).

Returns:

\(R_x\) value(s).

Return type:

float or NDArray[np.float64]

Raises:

TypeError – If any age, discount-origin, or interest-rate argument is a boolean.

See also

LifeTable.Rx

OOP equivalent on LifeTable.

Mx

Commutation function \(M_x = \sum_{t \geq x} C_t\).

Examples

>>> from lactuca import LifeTable, Rx
>>> lt = LifeTable('PASEM2010', 'm')
>>> Rx(lt, 65, ir=0.03)
lactuca.Tx(table: LifeTable, x: object) object#

Return total future person-years \(T_x\) (integer ages only).

Parameters:
  • table (LifeTable) – Life table instance.

  • x (int, sequence of int, or NDArray[np.float64]) – Integer age(s). Pandas and Polars Series of int are accepted.

Returns:

Total person-years lived from age \(x\) onwards.

Return type:

float or NDArray[np.float64]

Raises:

TypeError – If any age or duration argument is a boolean.

See also

LifeTable.Tx

OOP equivalent on LifeTable.

Tx_continuous

Continuous variant for fractional ages.

Examples

>>> from lactuca import LifeTable, Tx
>>> lt = LifeTable('PASEM2010', 'm')
>>> Tx(lt, 65)  # total future person-years from age 65
lactuca.Tx_continuous(table: LifeTable, x: object, *, m: Literal[1, 2, 3, 4, 6, 12, 14, 24, 26, 52, 365] = 12) object#

Return continuous \(T_x\) for fractional ages using numerical integration.

Parameters:
  • table (LifeTable) – Life table instance.

  • x (float or sequence of float) – Fractional (non-integer) age(s). Integer ages raise ValueError.

  • m (PaymentFrequencyLiteral, optional) – Number of subintervals for numerical integration (default 12).

Returns:

Total person-years lived from fractional age \(x\) onwards.

Return type:

float or NDArray[np.float64]

Raises:
  • TypeError – If any age argument is a boolean. If m is a boolean.

  • ValueError – If any age in x is an integer.

See also

LifeTable.Tx_continuous

OOP equivalent on LifeTable.

Tx

Discrete variant for integer ages.

Examples

>>> from lactuca import LifeTable, Tx_continuous
>>> lt = LifeTable('PASEM2010', 'm')
>>> Tx_continuous(lt, 65.5, m=12)
lactuca.Lx(table: LifeTable, x: object) object#

Return person-years lived \(L_x\) (integer ages only).

Parameters:
  • table (LifeTable) – Life table instance.

  • x (int, sequence of int, or NDArray[np.float64]) – Integer age(s). Pandas and Polars Series of int are accepted.

Returns:

Person-years lived in \([x, x+1)\).

Return type:

float or NDArray[np.float64]

Raises:

TypeError – If any age or duration argument is a boolean.

See also

LifeTable.Lx

OOP equivalent on LifeTable.

Examples

>>> from lactuca import LifeTable, Lx
>>> lt = LifeTable('PASEM2010', 'm')
>>> Lx(lt, 65)  # person-years lived between ages 65 and 66
lactuca.Lx_continuous(table: LifeTable, x: object, *, m: Literal[1, 2, 3, 4, 6, 12, 14, 24, 26, 52, 365] = 12) object#

Return continuous \(L_x\) for fractional ages using numerical integration.

Parameters:
  • table (LifeTable) – Life table instance.

  • x (float or sequence of float) – Fractional (non-integer) age(s). Integer ages raise ValueError.

  • m (PaymentFrequencyLiteral, optional) – Number of subintervals for numerical integration (default 12).

Returns:

Person-years lived in \([x, x+1)\) at fractional age \(x\).

Return type:

float or NDArray[np.float64]

Raises:
  • TypeError – If any age argument is a boolean. If m is a boolean.

  • ValueError – If any age in x is an integer.

See also

LifeTable.Lx_continuous

OOP equivalent on LifeTable.

Lx

Discrete variant for integer ages.

Examples

>>> from lactuca import LifeTable, Lx_continuous
>>> lt = LifeTable('PASEM2010', 'm')
>>> Lx_continuous(lt, 65.5, m=12)

Multi-life functions#

lactuca.äxy(tables_xy: Sequence[LifeTable] | tuple[Sequence[LifeTable], Sequence[LifeTable]], ages: object, *, ts: object = 0.0, d: object = 0.0, n: object = None, m: Literal[1, 2, 3, 4, 6, 12, 14, 24, 26, 52, 365] | Sequence[int] | NDArray[int64] = 1, gr: GrowthRate | float | None | Sequence[GrowthRate | float | None] = None, cashflow_amounts: Sequence[float] | None = None, ir: object = None, return_flows: bool = False, t_output: NDArray[float64] | None = None, benefits: Sequence[float] | NDArray[float64] | None = None, on_error: Literal['raise', 'nan'] = 'raise', record_ids: Sequence[Any] | None = None) float | NDArray[float64] | dict[str, NDArray[float64] | float] | BatchResult#
lactuca.axy(tables_xy: Sequence[LifeTable] | tuple[Sequence[LifeTable], Sequence[LifeTable]], ages: object, *, ts: object = 0.0, d: object = 0.0, n: object = None, m: Literal[1, 2, 3, 4, 6, 12, 14, 24, 26, 52, 365] | Sequence[int] | NDArray[int64] = 1, gr: GrowthRate | float | None | Sequence[GrowthRate | float | None] = None, cashflow_times: Sequence[float] | None = None, cashflow_amounts: Sequence[float] | None = None, ir: object = None, return_flows: bool = False, t_output: NDArray[float64] | None = None, benefits: Sequence[float] | NDArray[float64] | None = None, on_error: Literal['raise', 'nan'] = 'raise', record_ids: Sequence[Any] | None = None) float | NDArray[float64] | dict[str, NDArray[float64] | float] | BatchResult#
lactuca.Axy(tables_xy: Sequence[LifeTable] | tuple[Sequence[LifeTable], Sequence[LifeTable]], ages: object, *, ts: object = 0.0, d: object = 0.0, n: object = None, m: Literal[1, 2, 3, 4, 6, 12, 14, 24, 26, 52, 365] | Sequence[int] | NDArray[int64] = 1, gr: GrowthRate | float | None | Sequence[GrowthRate | float | None] = None, ir: object = None, cashflow_times: Sequence[float] | None = None, cashflow_amounts: Sequence[float] | None = None, return_flows: bool = False, t_output: NDArray[float64] | None = None, benefits: Sequence[float] | NDArray[float64] | None = None, on_error: Literal['raise', 'nan'] = 'raise', record_ids: Sequence[Any] | None = None) float | NDArray[float64] | dict[str, NDArray[float64] | float] | BatchResult#
lactuca.nExy(tables_xy: Sequence[LifeTable] | tuple[Sequence[LifeTable], Sequence[LifeTable]], ages: object, *, n: object, ts: object = 0.0, ir: object = None, return_flows: bool = False, t_output: NDArray[float64] | None = None, benefits: Sequence[float] | NDArray[float64] | None = None, on_error: Literal['raise', 'nan'] = 'raise', record_ids: Sequence[Any] | None = None) float | NDArray[float64] | dict[str, NDArray[float64] | float] | BatchResult#
lactuca.äjoint(tables: Sequence[LifeTable], ages: object, *, ts: object = 0.0, d: object = 0.0, n: object = None, m: Literal[1, 2, 3, 4, 6, 12, 14, 24, 26, 52, 365] | Sequence[int] | NDArray[int64] = 1, gr: GrowthRate | float | None | Sequence[GrowthRate | float | None] = None, cashflow_amounts: Sequence[float] | None = None, ir: object = None, return_flows: bool = False, t_output: NDArray[float64] | None = None, benefits: Sequence[float] | NDArray[float64] | None = None, on_error: Literal['raise', 'nan'] = 'raise', record_ids: Sequence[Any] | None = None) float | NDArray[float64] | dict[str, NDArray[float64] | float] | BatchResult#
lactuca.ajoint(tables: Sequence[LifeTable], ages: object, *, ts: object = 0.0, d: object = 0.0, n: object = None, m: Literal[1, 2, 3, 4, 6, 12, 14, 24, 26, 52, 365] | Sequence[int] | NDArray[int64] = 1, gr: GrowthRate | float | None | Sequence[GrowthRate | float | None] = None, cashflow_times: Sequence[float] | None = None, cashflow_amounts: Sequence[float] | None = None, ir: object = None, return_flows: bool = False, t_output: NDArray[float64] | None = None, benefits: Sequence[float] | NDArray[float64] | None = None, on_error: Literal['raise', 'nan'] = 'raise', record_ids: Sequence[Any] | None = None) float | NDArray[float64] | dict[str, NDArray[float64] | float] | BatchResult#
lactuca.Afirst(tables: Sequence[LifeTable], ages: object, *, ts: object = 0.0, d: object = 0.0, n: object = None, m: Literal[1, 2, 3, 4, 6, 12, 14, 24, 26, 52, 365] | Sequence[int] | NDArray[int64] = 1, gr: GrowthRate | float | None | Sequence[GrowthRate | float | None] = None, ir: object = None, cashflow_times: Sequence[float] | None = None, cashflow_amounts: Sequence[float] | None = None, return_flows: bool = False, t_output: NDArray[float64] | None = None, benefits: Sequence[float] | NDArray[float64] | None = None, on_error: Literal['raise', 'nan'] = 'raise', record_ids: Sequence[Any] | None = None) float | NDArray[float64] | dict[str, NDArray[float64] | float] | BatchResult#
lactuca.nEjoint(tables: Sequence[LifeTable], ages: object, *, n: object, ts: object = 0.0, ir: object = None, return_flows: bool = False, t_output: NDArray[float64] | None = None, benefits: Sequence[float] | NDArray[float64] | None = None, on_error: Literal['raise', 'nan'] = 'raise', record_ids: Sequence[Any] | None = None) float | NDArray[float64] | dict[str, NDArray[float64] | float] | BatchResult#
lactuca.äxyz(tables_xyz: Sequence[LifeTable], ages: object, *, ts: object = 0.0, d: object = 0.0, n: object = None, m: Literal[1, 2, 3, 4, 6, 12, 14, 24, 26, 52, 365] | Sequence[int] | NDArray[int64] = 1, gr: GrowthRate | float | None | Sequence[GrowthRate | float | None] = None, cashflow_amounts: Sequence[float] | None = None, ir: object = None, return_flows: bool = False, t_output: NDArray[float64] | None = None, benefits: Sequence[float] | NDArray[float64] | None = None, on_error: Literal['raise', 'nan'] = 'raise', record_ids: Sequence[Any] | None = None) float | NDArray[float64] | dict[str, NDArray[float64] | float] | BatchResult#
lactuca.axyz(tables_xyz: Sequence[LifeTable], ages: object, *, ts: object = 0.0, d: object = 0.0, n: object = None, m: Literal[1, 2, 3, 4, 6, 12, 14, 24, 26, 52, 365] | Sequence[int] | NDArray[int64] = 1, gr: GrowthRate | float | None | Sequence[GrowthRate | float | None] = None, cashflow_times: Sequence[float] | None = None, cashflow_amounts: Sequence[float] | None = None, ir: object = None, return_flows: bool = False, t_output: NDArray[float64] | None = None, benefits: Sequence[float] | NDArray[float64] | None = None, on_error: Literal['raise', 'nan'] = 'raise', record_ids: Sequence[Any] | None = None) float | NDArray[float64] | dict[str, NDArray[float64] | float] | BatchResult#
lactuca.Axyz(tables_xyz: Sequence[LifeTable], ages: object, *, ts: object = 0.0, d: object = 0.0, n: object = None, m: Literal[1, 2, 3, 4, 6, 12, 14, 24, 26, 52, 365] | Sequence[int] | NDArray[int64] = 1, gr: GrowthRate | float | None | Sequence[GrowthRate | float | None] = None, ir: object = None, cashflow_times: Sequence[float] | None = None, cashflow_amounts: Sequence[float] | None = None, return_flows: bool = False, t_output: NDArray[float64] | None = None, benefits: Sequence[float] | NDArray[float64] | None = None, on_error: Literal['raise', 'nan'] = 'raise', record_ids: Sequence[Any] | None = None) float | NDArray[float64] | dict[str, NDArray[float64] | float] | BatchResult#
lactuca.nExyz(tables_xyz: Sequence[LifeTable], ages: object, *, n: object, ts: object = 0.0, ir: object = None, return_flows: bool = False, t_output: NDArray[float64] | None = None, benefits: Sequence[float] | NDArray[float64] | None = None, on_error: Literal['raise', 'nan'] = 'raise', record_ids: Sequence[Any] | None = None) float | NDArray[float64] | dict[str, NDArray[float64] | float] | BatchResult#

See also

Joint-Life Calculations — Multi-life annuities, first-death insurances, and derivable last-survivor formulas.
Utilitiespayment_times() and other helpers for constructing custom payment grids (cashflow_times parameter).