Skip to main content

reserving.IndexPaths

One index path per simulation for the periods after a

Usage

Source

reserving.IndexPaths()

CalendarIndex’s last given period: index levels on the index’s scale, not rates. Indexation.reinflate_draws pairs simulation i of the draws with path i.

Parameters

first: str or int

The first period of every path: "2023" (or the integer 2023), "2023H1", "2023Q1" or "2023-01". Each level after the first is one period of its grain later.

values: list of list of float or 2-D numpy array
One row per simulation, all of one length (at least 1): the index levels from first on, finite and positive.

Raises

ValueError
For no rows, empty or ragged rows, or a level that is not finite and positive.

Examples

>>> from prospicio.reserving import IndexPaths
>>> paths = IndexPaths("2023", [[1.10, 1.20], [1.05, 1.08]])
>>> paths.n_sims, paths.n_periods

(2, 2)

>>> paths.periods

[‘2023’, ‘2024’]

>>> paths.values[1]

[1.05, 1.08]

Attributes

Name Description
first The first period of every path.
n_periods The number of periods of each path.
n_sims The number of simulations (paths).
periods The periods of the paths, from first at its grain.
values The levels, one row per simulation.

first

The first period of every path.

first: str


n_periods

The number of periods of each path.

n_periods: int


n_sims

The number of simulations (paths).

n_sims: int


periods

The periods of the paths, from first at its grain.

periods: list[str]


values

The levels, one row per simulation.

values: list[list[float]]