chainladder.ParallelogramOLF#
- class chainladder.ParallelogramOLF(rate_history=None, change_col='', date_col='', approximation_grain='M', vertical_line=False)[source]#
Estimator to create and apply on-level factors to a Triangle object. This is commonly used for premium vectors expressed as a Triangle object.
- Parameters:
- rate_history: pd.DataFrame
A DataFrame with
- change_col: str
The column containing the rate changes expressed as a decimal. For example, 5% decrease should be stated as -0.05
- date_col: str
A list-like set of effective dates corresponding to each of the changes
- approximation_grain: str
The resolution of the internal calendar used for calculating the on-level factors: monthly (‘M’) or daily (‘D’). Daily is finer and adjusts for leap years when assigning factors to origin periods.
- vertical_line:
Rates are typically stated on an effective date basis and premiums on and earned basis. By default, this argument is False and produces parallelogram OLFs. If True, Parallelograms become squares. This is commonly seen in Workers Compensation with benefit on-leveling or if the premium origin is also stated on an effective date basis.
- Attributes:
- olf_:
A triangle representation of the on-level factors
Methods
fit(X[, y, sample_weight])Fit the model with X.
fit_transform(X[, y])Fit to data, then transform it.
get_metadata_routing()Get metadata routing of this object.
get_params([deep])Get parameters for this estimator.
set_fit_request(*[, sample_weight])Configure whether metadata should be requested to be passed to the
fitmethod.set_output(*[, transform])Set output container.
set_params(**params)Set the parameters of this estimator.
set_transform_request(*[, sample_weight])Configure whether metadata should be requested to be passed to the
transformmethod.to_json()Serializes triangle object to json format
to_pickle(path[, protocol])Serializes triangle object to pickle.
transform(X[, y, sample_weight])If X and self are of different shapes, align self to X, else return self.