aggregate.Leg
One cash flow of a Group: a constant, or a function of the
Usage
aggregate.Leg()source’s value, written as a positive magnitude; the group’s role signs it. A function is called once with all the source’s values (a numpy array when numpy is installed, else a list) and returns one value per value, or a single number.
Parameters
label: str-
Unique across the ledger.
value: float or callablekind: str-
premium, loss,
expense, recovery or commission. step: float-
Put the leg’s own distribution on a grid of this step (aggregate’s
bs), scattering each value linearly to its two neighbours, which keeps its mean. Only its marginal quantiles change; its mean, the sums down the sheet and the scenario columns stay exact. Ledger.validation() compares the two means.
Examples
>>> from prospicio.aggregate import Leg
>>> Leg("Loss", lambda x: x, kind="loss")Leg(“Loss”)
Attributes
| Name | Description |
|---|---|
| label | The label. |
label
The label.
label: str