Skip to main content

pricing.RateHistory

A history of rate changes from an initial level of 1, and the

Usage

Source

pricing.RateHistory()

parallelogram method: the portion of a period’s premium at each rate level under uniform writing and earning, and the factor to the current level (Werner and Modlin, ch. 5).

Parameters

effective: list of float

Effective dates as year fractions, in order.

changes: list of float

Overall average changes, 0.05 for +5%.

applies: list of str
"written" (policies written on or after the date; the default) or "in_force" (all premium earned on or after it, a law change).

Raises

ValueError
For dates out of order, a change of -100% or less, or mismatched lengths.

Examples

>>> from prospicio.pricing import Period, RateHistory
>>> h = RateHistory([2010.5, 2011.0, 2012.25], [0.05, 0.10, -0.01])
>>> level = h.rate_level(Period.calendar(2011.0, 2012.0), term=1.0)
>>> level.shares

[0.125, 0.375, 0.5]

>>> round(level.on_level_factor, 4)

1.0431

Attributes

Name Description
current_level The level after every change.

current_level

The level after every change.

current_level: float

Methods

Name Description
from_levels() A history from the cumulative level after each change, as an
rate_level() The portion of period’s premium at each rate level, for

from_levels()

A history from the cumulative level after each change, as an

Usage

Source

from_levels(effective, levels, applies=None)

exhibit prints them; rounded printed levels carry into the factors.

Parameters
effective: list of float
levels: list of float
applies: list of str = None
Returns
RateHistory

rate_level()

The portion of period’s premium at each rate level, for

Usage

Source

rate_level(period, term)

policies of term years.

Parameters
period: Period
term: float
Returns
RateLevel