Skip to main content

reserving.exponential_trend()

The exponential trend through points by least squares on the logarithm.

Usage

reserving.exponential_trend(
    x,
    y,
)

Parameters

x: sequence of float

Times in years and positive values.

y: sequence of float
Times in years and positive values.

Returns

dict or None
rate, r_squared and n; None with fewer than two usable points.

Examples

>>> from prospicio.reserving import exponential_trend
>>> round(exponential_trend([0.0, 1.0, 2.0], [100.0, 110.0, 121.0])["rate"], 12)

0.1