API Reference
Distributions
Parametric, discretized and sampled representations.
- distributions.Lognormal
-
Lognormal distribution:
ln X ~ Normal(meanlog, sdlog**2). - distributions.Gamma
-
Gamma distribution with shape
alphaand scaletheta: mean - distributions.Tweedie
-
Tweedie distribution with mean
mu, dispersionphiand power - distributions.Weibull
-
Weibull distribution with shape
kand scalelam: - distributions.Loglogistic
-
Loglogistic (Fisk) distribution with shape
alphaand scale - distributions.InverseGamma
-
Inverse gamma distribution with shape
alphaand scaletheta: - distributions.InverseGaussian
-
Inverse Gaussian distribution with mean
muand shapelam: - distributions.Burr
-
Burr (type XII) distribution with tail shape
alpha, powergamma - distributions.Beta
-
Beta distribution with shapes
aandbon[0, scale], as - distributions.Truncated
-
A severity conditioned on
lower < X <= upper, asaggregate’s - distributions.Affine
-
A severity scaled and shifted,
scale * X + shift:aggregate’s - distributions.SizeOfLoss
-
A severity read from a size-of-loss table: claim counts and loss totals
- distributions.Mixture
-
A finite mixture of severities: component
iwith probability - distributions.Custom
-
A loss severity defined by your own distribution function: the slow
- distributions.to_json()
-
A distribution as a JSON document: the family and the parameters its
- distributions.from_json()
-
A distribution from a document written by
to_json, as the class of - distributions.Grid
-
A distribution on the points
0, step, 2*step, ...: the discretized - distributions.DiscretizationReport
-
How a distribution was discretized, and the error that introduced.
- distributions.Discrete
-
A distribution on finitely many values, of either sign and any spacing:
- distributions.Normal
-
The normal distribution, on the whole real line: asset returns, log
- distributions.Ogive
-
An ogive: the piecewise linear distribution function through tabulated
- distributions.invert_chf()
-
A law’s distribution on a grid, by inverting its characteristic
- distributions.NormalInverseGaussian
-
The normal inverse Gaussian law
NIG(alpha, beta, delta, mu)for - distributions.Stable
-
An alpha-stable law
S(alpha, beta, scale, loc)forinvert_chf. - distributions.TemperedStable
-
The CGMY tempered stable law with a location
muforinvert_chf - distributions.TweediePower
-
The Tweedie law at any power
poutside(0, 1]for - distributions.VarianceGamma
-
The variance gamma law
VG(sigma, nu, theta)with a locationmu - distributions.ChfDistribution
-
A law’s bucket masses on a grid, from its characteristic function: what
- distributions.Sampled
-
A distribution known only through equally weighted draws.
Large-loss severities
The Pareto family for layer and treaty pricing, with maximum likelihood fits.
- distributions.Pareto
-
Single-parameter Pareto:
P(X > x) = (t / x) ** alphaforx >= t, - distributions.PiecewisePareto
-
Piecewise Pareto: alpha
alpha[k]above thresholdt[k], the - distributions.LogAffinePareto
-
Log-affine local Pareto: the local alpha
- distributions.GeneralizedPareto
-
Generalized Pareto severity with a location (Riegel’s parameterization
- distributions.local_pareto_to_piecewise()
-
Converts the local Pareto distribution with local alpha
alpha(x)
Claim counts
Frequency distributions for frequency-severity aggregation.
- distributions.Poisson
-
Poisson claim counts with mean
lam. - distributions.NegativeBinomial
-
Negative binomial claim counts: mean
r * beta, variance - distributions.Binomial
-
Binomial claim counts:
nrisks, each claiming with probability - distributions.Count
-
A claim count from one of the families beyond the Poisson, negative
- distributions.claim_count()
-
The claim count with this mean and dispersion
Var[N] / E[N]:
Predictive distributions
The joint result every model returns.
- distributions.PredictiveDistribution
-
The joint result every model returns: draws for each simulation (row)
Aggregate loss
Compound distributions on a grid, and simulated years of losses.
- aggregate.panjer()
-
Aggregate loss
S = X_1 + ... + X_Nby Panjer’s recursion. - aggregate.fft()
-
Aggregate loss
S = X_1 + ... + X_Nby fast Fourier transform. - aggregate.fft_auto()
-
The compound distribution by FFT on the grid
recommend_grid - aggregate.recommend_grid()
-
A grid for the compound distribution of
frequencyclaims of - aggregate.recommend_portfolio_grid()
-
A grid for the sum of independent compound units, as
aggregate - aggregate.round_bucket()
-
Rounds a bucket size up to a “nice” value, as
aggregate’s - aggregate.GridSize
-
A recommended FFT grid, from
recommend_gridorfft_auto. - aggregate.audit_grid()
-
Audits an FFT grid as
aggregate1.2.0’ssharpendoes: builds - aggregate.audit_portfolio_grid()
-
audit_gridfor the sum of independent units on one grid. The - aggregate.GridAudit
-
The cells an audit built and the one it chose, from
audit_gridor - aggregate.CompoundReport
-
What a compound calculation produced and the error it introduced.
- aggregate.simulate_events()
-
Simulates
n_simsyears of claims: a count fromfrequency, then that - aggregate.EventSet
-
Simulated years of individual losses, for applying per-loss terms such
- aggregate.EventLossTable
-
A catastrophe model’s event loss table with secondary uncertainty.
- aggregate.read_ylt()
-
Reads a year loss table from a CSV or Parquet file into years of
- aggregate.ylt_hash()
-
A hash of a year loss table’s file bytes,
"blake3:<hex>", which - aggregate.occurrence_exceedance()
-
The chance that the year’s largest occurrence exceeds
x, - aggregate.occurrence_pml()
-
The occurrence PML at an annual probability
p: the loss whose - aggregate.OccurrencePml
-
One point of the occurrence PML curve, from
occurrence_pml. - aggregate.compound_moments()
-
Compound moments to third order: the mean, variance and third cumulant
- aggregate.CompoundMoments
-
Compound moments to third order, from
compound_moments. - aggregate.Approximation
-
A distribution fitted to compound moments, from
- aggregate.eventual_ruin()
-
The probability of eventual ruin of the classical surplus process by
- aggregate.Ruin
-
The probability of eventual ruin at each initial surplus on the grid, by
- aggregate.fft_bivariate()
-
The joint annual loss to two lines hit by the same events, by a 2-D FFT:
- aggregate.JointGrid
-
A joint distribution of two losses on a grid, ``P(A = i * step_a, B = j
- aggregate.BivariateReport
-
What
fft_bivariateproduced and the error it introduced. - aggregate.Clash
-
Two lines hit by the same events, each line independently within an
- aggregate.wiener_hopf()
-
The probability of eventual ruin when the waits between claims follow
- aggregate.RenewalRuin
-
The probability of eventual ruin at each initial surplus on the grid
- aggregate.Ledger
-
A P&L ledger, as
aggregate’sPnL: a source (aGrid, or - aggregate.Group
-
A book of the ledger:
sell(the insurer of the subject business, - aggregate.Leg
-
One cash flow of a
Group: a constant, or a function of the - aggregate.stack()
-
Stack ledgers’ results,
aggregate’sstack_marginal_pnls: one row - aggregate.Book
-
A seller’s book,
aggregate’spnlandxpnlbuilders: a gross - aggregate.Expense
-
One expense leg of a
Book: an amount (fixed), a fraction of - aggregate.derive_premium()
-
The gross premium whose own expenses leave the technical premium
- aggregate.occurrence_source()
-
The joint source of the annual gross loss and the loss ceded by the
- aggregate.pnl_program()
-
The premium ladder of
aggregate’spnl_program, as numbers: - aggregate.pnl_program_stated()
-
The premium ladder for an engine that states its own technical premium
- aggregate.size_premium()
-
The premium sized from a target loss ratio,
aggregate’s - aggregate.round_premium()
-
A premium rounded as
aggregatewrites one: to whole units above 100, - aggregate.layer_loss_picks()
-
Reshapes a severity so that its expected loss to each layer hits a
- aggregate.Picks
-
A severity reshaped to layer loss picks, from
layer_loss_picks.
Reinsurance
Excess-of-loss layers and towers, applied to simulated losses or exactly on the grid.
- reinsurance.Layer
-
A per-occurrence excess-of-loss layer:
limitxsattachmenton each - reinsurance.LossSensitivePremium
-
A premium that depends on the year’s loss
x: ``clip(basic + lcm * - reinsurance.Tower
-
A reinsurance programme: layers in inuring stages.
- reinsurance.TowerGrids
-
A tower’s annual distributions on the grid, from
Tower.on_grid. - reinsurance.AnnualGrids
-
A tower applied to an annual loss distribution, from
- reinsurance.TowerPrice
-
A tower’s views priced by a distortion, from
TowerGrids.price. - reinsurance.ViewPrice
-
One view’s price under a distortion, from
TowerGrids.price: the - reinsurance.occurrence_layer_statistics()
-
The statistics of
shareoflimitxsattachmentper - reinsurance.LayerStatistics
-
A per-occurrence layer’s statistics, from
- reinsurance.occurrence_cession_statistics()
-
The statistics of the total cession of several per-occurrence layers
- reinsurance.CessionStatistics
-
The total cession of several per-occurrence layers, from
- reinsurance.aggregate_layer_statistics()
-
The statistics of
shareoflimitxsattachmenton an annual - reinsurance.AggregateLayerStatistics
-
An aggregate cover’s statistics, from
aggregate_layer_statistics.
Reinsurer default
Reinsurers’ default on a tower’s recoveries, one Gaussian factor ranked on the gross loss.
- reinsurance.Panel
-
The reinsurers on a tower and their signed lines, applied to a tower’s
- reinsurance.Reinsurer
-
A reinsurer on a
Panel: its one-year probability of default,
Solvency II counterparty default
The standard formula’s counterparty default module for type 1 exposures, Delegated Regulation (EU) 2015/35 Arts 192, 199, 200 and 201.
- reinsurance.Solvency2Type1
-
The Solvency II capital requirement for type 1 exposures and its parts,
- reinsurance.solvency2_probability_by_ratio()
-
The Solvency II probability of default of an unrated insurance or
- reinsurance.solvency2_probability_by_step()
-
The Solvency II probability of default of a counterparty with an
- reinsurance.solvency2_reinsurance_lgd()
-
The Solvency II loss given default of a reinsurance arrangement
- reinsurance.solvency2_type1()
-
The Solvency II capital requirement for counterparty default risk on
Economic scenarios
Short rates (Vasicek, CIR, Hull-White), the Svensson curve, and economic and superimposed inflation with correlated shocks, simulated by path and step.
- esg.Cir
-
The Cox-Ingersoll-Ross short rate,
dr = a (b - r) dt + sigma sqrt(r) dW. - esg.Esg
-
An economic scenario generator: a short rate, and optionally economic
- esg.HullWhite
-
The Hull-White one-factor short rate, fitted to an initial curve.
- esg.Inflation
-
Economic inflation, an Ornstein-Uhlenbeck rate,
- esg.Scenarios
-
Simulated economic paths, from
Esg.simulate(). - esg.Superimposed
-
Superimposed claims inflation above the economic rate, an AR(1) by year,
- esg.Svensson
-
A Nelson-Siegel-Svensson curve of continuously compounded spot rates.
- esg.Vasicek
-
The Vasicek short rate,
dr = a (b - r) dt + sigma dW.
Multi-year projection
A company rolled forward along economic scenarios, with an underwriting cycle, tax, dividends and injections, the losses’ dependence on inflation, and finite-time ruin and capital breach.
- esg.Cycle
-
An underwriting cycle: an AR(2) on the log rate adequacy that scales each
- esg.Projection
-
A company’s multi-year projection along economic scenarios
- esg.ProjectionPaths
-
A projection’s paths: each line by path and year, ruin and breach.
Models
Terms and design matrices, GLMs and GAMs, neural networks, metrics, resampling and MCMC diagnostics.
- models.Terms
-
The terms of a model: an intercept, numeric columns, factors,
- models.Coding
-
Terms with factor levels learned from training data, from
- models.Design
-
A design matrix with an offset and prior weights.
- models.Glm
-
A generalized linear model, fitted by IRLS.
- models.GlmFit
-
A fitted GLM, from
Glm.fit. - models.TweedieGlm
-
A Tweedie GLM whose power is estimated with its coefficients and
- models.TweedieFit
-
A Tweedie GLM with its power estimated, from
TweedieGlm.fit. - models.tweedie_profile()
-
The profile log-likelihood of a Tweedie GLM’s power over
powers - models.NegativeBinomialGlm
-
A negative binomial GLM with its
thetaestimated with the - models.NegativeBinomialFit
-
A negative binomial GLM with
thetaestimated, from - models.DoubleGlm
-
A double GLM: a GLM for the mean and a gamma GLM with the log link for
- models.DoubleGlmFit
-
A fitted double GLM, from
DoubleGlm.fit. - models.ZeroInflated
-
A zero-inflated Poisson or negative binomial model, as R’s
- models.Hurdle
-
A hurdle model, as R’s
pscl::hurdle: a binary part for - models.TwoPartFit
-
A fitted zero-inflated or hurdle model, from
ZeroInflated.fitor - models.vuong()
-
Vuong’s test of model
aagainst modelb, aspscl::vuong: - models.count_log_likelihoods()
-
Each row’s log-likelihood under a plain Poisson (
thetaNone) or - models.QuantileRegression
-
Linear quantile regression, as R’s
quantreg::rq: minimises the - models.QuantileFit
-
A fitted quantile regression, from
QuantileRegression.fit. - models.QuantileFits
-
Quantile regressions at several
tau, from - models.ExpectileRegression
-
Linear expectile regression (asymmetric least squares, Newey and
- models.ExpectileFit
-
A fitted expectile regression, from
ExpectileRegression.fit. - models.Glmm
-
A GLM with random intercepts and slopes,
log μ = Xβ + offset + Σ zᵀb, - models.GlmmFit
-
A GLM with random intercepts and slopes, from
Glmm.fit. - models.BayesGlm
-
A Bayesian GLM sampled with NUTS (nuts-rs, the Rust core of nutpie).
- models.BayesGlmFit
-
A sampled Bayesian GLM, from
BayesGlm.fit. - models.BayesGlmm
-
A Bayesian GLMM: the model of
Glmmwith priors, sampled with NUTS - models.BayesGlmmFit
-
A sampled Bayesian GLMM, from
BayesGlmm.fit. - models.ElasticNet
-
An elastic-net GLM: the lasso (
alpha=1), ridge (alpha=0) and - models.ElasticNetFit
-
A fitted elastic net, from
ElasticNet.fitorElasticNet.path. - models.CvPath
-
Cross-validated scores along an elastic-net path, from
- models.RelaxedCv
-
Cross-validated relaxed fits, from
ElasticNet.cross_validate_relaxed. - models.Gam
-
A generalized additive model: a
Glmplus P-spline smooths of - models.GamFit
-
A fitted GAM, from
Gam.fit. - models.Cann
-
A Combined Actuarial Neural Network (Wüthrich and Merz): the design’s
- models.CannFit
-
A fitted CANN, from
Cann.fit. - models.AttentionCann
-
A CANN whose correction is a transformer over feature tokens (an
- models.AttentionCannFit
-
A fitted attention CANN, from
AttentionCann.fit. - models.TokenAttention
-
Attention from
[CLS]to each feature token in the last block, per - models.OnnxModel
-
A network trained elsewhere (PyTorch, Keras), loaded from an ONNX file
- models.OnnxPredictor
-
An
OnnxModelbehind the model interface: each graph input bound to - models.deviance()
-
Deviance
sum w d(y, mu)of a family. - models.mean_deviance()
-
Weighted mean deviance
sum(w d(y, mu)) / sum(w)of a family (the - models.pearson_terms()
-
Each row’s Pearson term
w (y - mu)^2 / V(mu),Vthe family’s - models.pearson_dispersion()
-
The Pearson dispersion
sum(w (y - mu)^2 / V(mu)) / n. - models.f_test()
-
The F test of a GLM within a larger one that contains it, as R’s
- models.likelihood_ratio_test()
-
The likelihood ratio test of a GLM within a larger one, as R’s
- models.vif()
-
Variance inflation factors of a design’s columns,
1 / (1 - R2_j) - models.gini()
-
Gini index of the ordered Lorenz curve.
- models.normalized_gini()
-
The normalized Gini:
giniover the Gini of a perfect ranking (rows - models.lift()
-
Lift table: rows sorted by predicted rate, cut into bands of about
- models.double_lift()
-
The double lift chart of two models (CAS Monograph 5, section 7.2.2):
- models.loss_ratio_chart()
-
The loss ratio chart (CAS Monograph 5, section 7.2.3): rows sorted by
- models.roc()
-
The ROC curve of a binary model (CAS Monograph 5, section 7.3.1): the
- models.confusion_matrix()
-
The confusion matrix of a binary model at
threshold(a row is - models.crps()
-
Continuous ranked probability score of equally likely draws for an
- models.log_score()
-
Mean log score
-(1/n) sum log f(y_i)of the outcomes under the - models.pit()
-
Probability integral transform of each outcome under the family’s
- models.pit_from_draws()
-
The PIT of
yunder the empirical distribution ofdraws, - models.pit_histogram()
-
Counts of PIT values in
binsequal-width bins of[0, 1]. - models.quantile_residuals()
-
Randomized quantile residuals (Dunn and Smyth, 1996): the normal scores
- models.ks_uniform()
-
Kolmogorov-Smirnov distance from the uniform on
[0, 1]; about - models.target_encode()
-
Out-of-fold target encoding of a high-cardinality factor with
- models.TargetEncoding
-
The encoding of each level of a factor learned from all the training
- models.mars()
-
MARS knot selection for hinge terms (Friedman’s forward pass, as R’s
- models.MarsFit
-
The knots MARS selected, from
mars: each term as - models.k_fold()
-
k-fold splits ofnrows, shuffled withseed. - models.group_k_fold()
-
Grouped
k-fold splits: each group’s rows stay in one fold. - models.time_ordered()
-
Time-ordered splits: for each of the last
n_testperiods, train on - models.permutation()
-
0..nshuffled withseedon streamstream: the permutation - models.bootstrap_rows()
-
nrow indices drawn fromrange(n)with replacement on stream - models.mcmc_diagnostics()
-
MCMC diagnostics of chains of draws (Vehtari et al. 2021, as R’s
- models.elpd_loo()
-
Leave-one-out cross-validation by Pareto-smoothed importance sampling
- models.ppc_check()
-
Posterior predictive checks of any model: each test statistic of
- models.loo_pit()
-
The leave-one-out PIT of any model’s observations: each observation’s
- models.stacking_weights()
-
Stacking weights from pointwise held-out log predictive densities
- models.pseudo_bma_weights()
-
Pseudo-BMA weights,
w_kproportional toexp(elpd_k); with - models.BayesStacking
-
Bayesian stacking: a posterior for the stacking weights, with a
- models.HierarchicalStacking
-
Hierarchical stacking (Yao, Pirš, Vehtari and Gelman, 2022): model
- models.StackingFit
-
Posterior stacking weights, from
BayesStacking.fitor - models.elpd_waic()
-
WAIC from pointwise log-likelihood draws:
lppdless the variance of - models.lppd()
-
In-sample log pointwise predictive density,
- models.Elpd
-
An ELPD estimate from
elpd_looorelpd_waic. - models.deviance_score()
-
A score for
cross_validate: the family’s mean deviance on the - models.cross_validate()
-
Fits
modelon each split’s training rows and scores it on the - models.grid_search()
-
Scores every candidate by
cross_validateon the same splits and - models.random_search()
-
Draws
ncandidates withdraw(rng)fromrandom.Random(seed) - models.log_uniform()
-
A draw log-uniform between
lowandhigh, for learning rates - models.SearchResult
-
The result of
grid_searchorrandom_search. - models.compare()
-
Fits every model on each split’s training rows and scores its test
- models.Comparison
-
The result of
compare: every model’s score on every metric and - models.permutation_importance()
-
Permutation feature importance: how much a score worsens when a
- models.PermutationImportance
-
The result of
permutation_importance. - models.interaction_screen()
-
The pairwise interaction screen by permutations (CAS Monograph 16,
- models.InteractionScreen
-
The result of
interaction_screen. - models.partial_dependence()
-
Partial dependence: the mean prediction with
featureset to each - models.PartialDependence
-
The result of
partial_dependence. - models.ice()
-
Individual conditional expectation curves (Goldstein, Kapelner, Bleich
- models.IceCurves
-
The result of
ice. - models.ale()
-
First-order accumulated local effects (Apley and Zhu, 2020), as R’s
- models.AccumulatedLocalEffects
-
The result of
ale. - models.shap_values()
-
SHAP values (Lundberg and Lee, 2017): each feature’s share of the
- models.ShapValues
-
The result of
shap_values. - models.actual_vs_expected()
-
Actual against expected by period for a stored model’s predictions on
- models.simulate_from_means()
-
Joint predictive draws from fitted means, for engines that give only
Gradient boosting
LightGBM and XGBoost behind the model protocol, with joint predictive draws.
- boosting.Booster
-
Gradient-boosted trees for a response family, through LightGBM or
- models.base_score()
-
The constant link-scale score a booster starts from:
- models.monotone_violations()
-
The indices
i(from 1) whose step frommeans[i - 1]goes - models.weighted_quantile()
-
The smallest
ywhose cumulative weight, in increasingy, - boosting.BoosterFit
-
A fitted
Booster: means and joint predictive draws.
Pricing
The collective model, layer rating, reinsurance tower matching, and risk-loaded prices from simulated losses.
- pricing.CollectiveModel
-
The collective risk model: a claim count and a severity, with layer
- pricing.ilf()
-
Increased limit factor
LEV(limit) / LEV(basic_limit). - pricing.loss_elimination_ratio()
-
Loss elimination ratio of a deductible,
LEV(deductible) / E[X]. - pricing.censored_las()
-
The limited average severity at each policy limit from claims censored
- pricing.pareto_extrapolation()
-
Expected loss of layer
toper unit of expected loss of layer - pricing.alpha_between_layers()
-
The Pareto alpha at which two layers have the given expected losses.
- pricing.alpha_between_frequency_and_layer()
-
The Pareto alpha at which
frequencylosses a year above - pricing.alpha_between_frequencies()
-
The Pareto alpha between two excess frequencies.
- pricing.match_tower()
-
Matches a tower of contiguous layers, the last unlimited, with one
- pricing.fit_pml_curve()
-
The model through the points of a PML curve:
amounts[j]is - pricing.fit_references()
-
A model that reproduces every reference: expected layer losses (which
- pricing.TowerModel
-
A frequency and a piecewise Pareto severity that reproduce a tower,
- pricing.price()
-
Risk-loaded price of a cover from its simulated losses.
- pricing.price_portfolio()
-
Prices a portfolio and allocates the price to its components.
- pricing.Price
-
The risk-loaded price of a cover, or of one component’s share of a
- pricing.PortfolioPrice
-
Prices of a portfolio’s components and of the portfolio as a whole.
- pricing.Mbbefd
-
The MBBEFD exposure curve and destruction-rate distribution (Bernegger,
- pricing.TabulatedCurve
-
A tabulated exposure curve: points
(x, G(x))from(0, 0)to - pricing.RiskProfile
-
A risk profile for property per-risk business: bands of sum insured,
- pricing.severity_exposure_curve()
-
The exposure curve of a severity capped at the maximum possible loss
- pricing.Portfolio
-
A portfolio as the distribution of its total and each unit’s
- pricing.NaturalPrice
-
A portfolio’s price and its natural allocation, from
Portfolio.price. - pricing.StandAlone
-
Each unit priced alone, the book priced together and the sum of the
- pricing.Quote
-
A cover’s quote: the premium the cedant pays, built up from a
- pricing.Pentagon
-
Loss, margin, premium, capital and assets, with
P = L + Mand - pricing.classical_premium()
-
The premium of a distribution under a classical premium principle.
- pricing.calibrate_classical()
-
The loading of a classical premium principle that gives
premium; - pricing.PricingBounds
-
The range of other risks’ prices over every distortion that prices a
- pricing.distortion_envelope()
-
The smallest and largest
g(s)at eachsover every distortion
Time value of money
Payment patterns, the expected loss discounted to inception, and capital held over the payout so the cost of capital accrues over years.
- pricing.PaymentPattern
-
The share of the ultimate loss paid at each time, in years from the
- pricing.price_over_payout()
-
A one-period price restated over a payout.
- pricing.PayoutPrice
-
A price restated over a payout, from
price_over_payout.
Experience rating
Experience rating from individual large losses, trended to the prospective period, the as-if loss to each layer by accident year, and the burning cost (Clark’s study note).
- pricing.LargeLossExperience
-
A record of individual large losses, for experience rating.
- pricing.DevelopmentPattern
-
Development factors to ultimate by age.
- pricing.PreparedLosses
-
Large losses trended to the prospective period, from
- pricing.BurningCost
-
The burning cost by accident year and overall, from
- pricing.IndexClause
-
An index (stability) clause: the treaty’s retention and limit move with
- pricing.AsIf
-
Each year’s cessions under its own program and under the proposed one,
Casualty exposure rating
A per-policy casualty treaty rated over a table of policies, each on its own severity, ILF or ELF curve, in the ILF and frequency forms with an explicit ALAE treatment; the sweep over the Pareto alpha, its censored anchor and the count test (Clark’s study note).
- pricing.CasualtyProfile
-
A book of casualty policies, each rated on its own curve
- pricing.IlfTable
-
An ILF table read as a limited expected value curve: linear between the
- pricing.ElfTable
-
An excess loss factor table,
ELF(x) = E[(X - x)+] / E[X], read - pricing.CasualtyRating
-
The treaty’s expected loss, kept policy by policy, from
- pricing.ParetoAnchor
-
The Pareto above a threshold fitted to trended losses, with claims
- pricing.poisson_tail()
-
The Poisson probability, at mean
expected, of a count at least as
Credibility
Classical credibility, the limited fluctuation standards and the Bühlmann–Straub model, and Bayesian hierarchical credibility sampled with NUTS.
- credibility.LimitedFluctuation
-
Limited fluctuation (classical) credibility: full credibility standards
- credibility.buhlmann_straub()
-
The Bühlmann–Straub credibility model, as R’s
actuar::cm(~group): - credibility.BuhlmannStraubFit
-
A fitted Bühlmann–Straub model, from
buhlmann_straub. - credibility.hierarchical_credibility()
-
Bayesian hierarchical credibility, sampled with NUTS: Bühlmann–Straub’s
- credibility.HierarchicalCredibilityFit
-
A fitted Bayesian hierarchical credibility model, from
- credibility.credibility_premiums()
-
The credibility premiums at given structure parameters: Bühlmann–Straub’s
Ratemaking
Premium at the current rate level by the parallelogram method, trend fits, factors and lengths, and the overall indication by the loss ratio and pure premium methods (Werner and Modlin).
- pricing.year_fraction()
-
The year fraction of a date on Werner and Modlin’s half-month grid: the
- pricing.Period
-
An experience or forecast period
[start, end)in year fractions: - pricing.RateHistory
-
A history of rate changes from an initial level of 1, and the
- pricing.RateLevel
-
A period’s premium by rate level, from
RateHistory.rate_level. Each - pricing.TrendFit
-
A trend fitted by least squares to values at times in years:
- pricing.trend_factor()
-
(1 + rate) ** years, the factor of an exponential trend. - pricing.LossRatioExperience
-
Experience years for the loss ratio method: earned premium brought to
- pricing.PurePremiumExperience
-
Experience years for the pure premium method: losses developed, trended
- pricing.Provisions
-
The provisions proportional to premium: variable expenses
Vand the - pricing.premium_based_expenses()
-
The premium-based projection of expenses: each expense ratio split by
- pricing.credibility_weighted()
-
Z * estimate + (1 - Z) * complement. - pricing.trended_present_rates()
-
The trended present rates complement as an indicated change:
Earned exposure
Written, earned, unearned and in-force exposure or premium by calendar or policy period, from the policies’ dates, with mid-term changes and cancellations.
- pricing.calendar_windows()
-
The dates between calendar windows: years, quarters or months from 1
- pricing.earned_exposure()
-
Written, earned, unearned and in-force amounts of a table of policies,
- pricing.in_force()
-
The amount in force on a date: the sum of the full-term amounts, as
Retrospective rating
The insurance charge and savings of an aggregate loss distribution or a sample (Table M), under a per-occurrence limit (Table L), and the basic premium that balances a retrospective plan.
- pricing.InsuranceCharge
-
The insurance charge and savings of an aggregate loss distribution, at
- pricing.RetroPlan
-
A retrospective rating plan: the premium
T (b + c L)for losses
Experience modification
The experience modifications of the workers compensation split plan, from the class rows’ payrolls and the claims, and of the general liability experience ratio plan, from each year’s subject loss cost and occurrences, with every sum of their worksheets.
- pricing.experience_ratio_modification()
-
The experience modification of the general liability experience ratio
- pricing.split_plan_modification()
-
The experience modification of the workers compensation split plan
Reserving
Loss triangles, the chain ladder with tail factors, Mack’s model with its one-year view and its assumption tests, the Munich chain ladder, the expected-loss methods, the ODP bootstrap and Clark’s growth curves.
- reserving.Triangle
-
A loss triangle with four axes: index (segment), column (measure), origin
- reserving.schedule_p()
-
Triangles of the CAS loss reserve database (NAIC Schedule P), one
- reserving.ChainLadder
-
The chain-ladder method: each origin’s latest value projected to
- reserving.ChainLadderFit
-
A fitted chain-ladder projection of every segment of a triangle column.
- reserving.TailConstant
-
A given tail factor, as chainladder-python’s
TailConstant. - reserving.TailCurve
-
A curve fitted to the estimated factors and extrapolated, as
- reserving.TailBondy
-
The Bondy tail, as chainladder-python’s
TailBondy. - reserving.TailLogLinear
-
R ChainLadder’s
tail = TRUErule (itstailfactorfunction). - reserving.UnderwritingBasis
-
How an underwriting period’s policies are written and earned, to convert
- reserving.Mack
-
Mack’s distribution-free chain ladder: the chain-ladder projection plus
- reserving.MackFit
-
A fitted Mack model of every segment: the chain-ladder fields, plus
- reserving.ClaimsDevelopmentResult
-
Merz and Wüthrich’s (2008) one-year view of a Mack fit: standard errors
- reserving.calendar_year_effect()
-
Mack’s calendar-year effect test (Mack 1994, appendix H; R
- reserving.CalendarIndex
-
An index by calendar period: one value per period of one grain, from a
- reserving.CalendarYearTest
-
Mack’s test for calendar-year effects (Mack 1994, appendix H; R
- reserving.development_correlation()
-
Mack’s test for correlation between adjacent development factors
- reserving.DevelopmentCorrelationTest
-
Mack’s test for correlation between adjacent development factors
- reserving.MunichChainLadder
-
The Munich chain ladder (Quarg and Mack 2004): paid and incurred
- reserving.MunichFit
-
A fitted Munich chain ladder of every segment.
- reserving.ExpectedLoss
-
The expected loss ratio method: each origin’s ultimate is
apriori - reserving.BornhuetterFerguson
-
The Bornhuetter–Ferguson method: each origin’s latest value plus the
- reserving.Benktander
-
The Benktander (iterated Bornhuetter–Ferguson) method: starting from
- reserving.CapeCod
-
The Cape Cod (Stanard–Bühlmann) method: Bornhuetter–Ferguson with each
- reserving.ExpectedLossFit
-
A fitted expected-loss method (
ExpectedLoss, - reserving.CapeCodFit
-
A fitted Cape Cod of every segment of a triangle column: the fields of
- reserving.LatestDiagonal
-
A latest diagonal on its own, one value per origin at its own age, as a
- reserving.OdpBootstrap
-
Over-dispersed Poisson bootstrap of the chain ladder (England and
- reserving.OdpBootstrapFit
-
A fitted ODP bootstrap of every segment.
- reserving.MackBootstrap
-
Mack’s bootstrap for the lifetime and one-year views (England, Verrall
- reserving.MackBootstrapFit
-
A fitted bootstrap of Mack’s model, the lifetime view, of every
- reserving.OneYearFit
-
The simulated one-year view of every segment, from
- reserving.ClarkLdf
-
Clark’s LDF method (Clark 2003), as R ChainLadder’s
ClarkLDF: each - reserving.ClarkCapeCod
-
Clark’s Cape Cod method (Clark 2003), as R ChainLadder’s
- reserving.ClarkFit
-
A fitted Clark LDF or Cape Cod model of every segment of a triangle
- reserving.DiscountCurve
-
Annual effective spot rates by maturity in years, annually compounded:
- reserving.DiscountedReserves
-
A fit’s unpaid claims discounted simulation by simulation, from a fit’s
- reserving.PaidIncurredChain
-
Merz and Wüthrich’s (2010) paid-incurred chain (design note
- reserving.PaidIncurredFit
-
A paid-incurred chain fitted by
PaidIncurredChain.fit. Per-origin - reserving.ExcessLayer
-
An excess layer
limit xs attachment, the same for every origin. - reserving.ScaleShift
-
The scale shift of the severity by maturity (decision 1, the default):
- reserving.ParetoShape
-
Pinto and Gogol’s Pareto shape drift above a threshold: the claims above
- reserving.ExcessPattern
-
A layer’s development pattern derived from the ground-up triangle:
- reserving.RatioDevelopment
-
The ratio of two columns of one triangle, developed to ultimate and
- reserving.RatioDevelopmentFit
-
A fitted
RatioDevelopment, per origin. - reserving.Reinflated
-
A projection re-inflated by
Indexation.reinflate. - reserving.RiskAdjustmentResult
-
A risk adjustment and the confidence level it corresponds to, from
- reserving.SegmentRiskAdjustment
-
One segment’s stand-alone risk adjustment, in
- reserving.Separation
-
Taylor’s (1977) separation method: increments over a normaliser are
- reserving.SeparationFit
-
A separation fit of one triangle segment.
- reserving.ApcGlm
-
The age-period-cohort (APC) reserving GLM: ``log mu_ij = delta +
- reserving.ApcGlmFit
-
A fitted APC GLM, from
ApcGlm.fit. - reserving.UlaeEstimate
-
An estimate of unpaid ULAE, from
ulae_classical,ulae_kittelor - reserving.ulae_classical()
-
Unpaid ULAE by the classical, or paid-to-paid, technique (Friedland,
- reserving.ulae_kittel()
-
Unpaid ULAE by Kittel’s refinement of the classical technique (Friedland,
- reserving.ulae_conger_nolibos()
-
Unpaid ULAE by Conger and Nolibos’ generalized approach (Friedland,
- reserving.FrequencySeverity
-
Frequency-severity: ultimate claims as ultimate counts times an ultimate
- reserving.FrequencySeverityFit
-
A fitted
FrequencySeverity. - reserving.FutureCells
-
Projected future increments of one segment, one per origin and age, for
- reserving.IndexPaths
-
One index path per simulation for the periods after a
- reserving.Indexation
-
Restating a triangle at one price level by a
CalendarIndex, and - reserving.Disposal
-
The disposal rate method (Friedland, chapter 11): incremental closed
- reserving.DisposalFit
-
A fitted
Disposal. Cell tables are lists of rows by origin,None - reserving.CaseOutstanding
-
Case outstanding development (Friedland, chapter 12): each period’s paid
- reserving.CaseOutstandingFit
-
A fitted
CaseOutstanding. Cell tables are lists of rows by origin, - reserving.Trended
-
A value selected at the level of a base origin and carried to the other
- reserving.case_development_factor()
-
Friedland’s chapter 12 factor from case outstanding to unpaid claims:
- reserving.case_adequacy_adjust()
-
The triangle restated at the case reserve adequacy of the latest
- reserving.settlement_rate_adjust()
-
The triangle restated at the settlement rate of the latest diagonal
- reserving.berquist_sherman_adjust()
-
Both Berquist-Sherman adjustments: paid claims and closed counts as
- reserving.average_case()
-
The triangle with the columns
average_caseand - reserving.exponential_trend()
-
The exponential trend through points by least squares on the logarithm.
- reserving.trend_by_age()
-
The exponential trend of a column at each age, down the origins.
- reserving.pooled_trend()
-
One exponential trend of a column over every age at once: a common
- reserving.ratio_column()
-
The triangle with a column
namethat isnumeratorover - reserving.layer_share()
-
The layer’s share of a severity’s mean,
(LEV(b) - LEV(a)) / mean, - reserving.layer_exposure()
-
A copy of the triangle with a column
name: theexposurecolumn - reserving.layer_at_shift()
-
The expected loss to the layer of one claim at the maturity whose
IFRS 17 measurement
A group of contracts under the general model or the premium allocation approach, and reinsurance contracts held, rolled forward period by period with a saved state.
- reserving.Ifrs17Group
-
A group of insurance contracts under IFRS 17’s general measurement
- reserving.PaaGroup
-
A group of insurance contracts under IFRS 17’s premium allocation
- reserving.ReinsuranceHeld
-
A group of reinsurance contracts held under IFRS 17, measured as an
Risk measures
Distortion risk measures, and capital allocation to components.
- risk.Distortion
-
A distortion risk measure:
rho(X) = integral of g(S(x)) dxfor a - risk.calibrate()
-
The member of a distortion family whose price of
distispremium. - risk.allocate()
-
Allocates a distortion risk measure of the total to the components.
- risk.capital()
-
Allocates the distortion risk measure of a portfolio’s total to its
- risk.shapley()
-
The Shapley value of the game whose cost is
costof each - risk.haircut()
-
The haircut allocation of an exogenous
total(a premium, a capital - risk.equal_risk()
-
The equal risk allocation of an exogenous
total: the one level at - risk.rearrange()
-
The Rearrangement Algorithm (Puccetti and Rueschendorf): orders each
- risk.worst_var()
-
The worst VaR at
pof a sum of severities with unknown dependence, by - risk.entropic()
-
Entropic risk measure
(1 / theta) log E[exp(theta X)]: the certainty - risk.esscher()
-
Esscher premium
E[X exp(h X)] / E[exp(h X)]: the mean after tilting - risk.marginal_expected_shortfall()
-
Marginal expected shortfall of each component at level
p: its mean - risk.covar()
-
CoVaR of a component: the total’s VaR at level
qover the - risk.esscher_allocation()
-
Esscher allocation: each component’s mean under the Esscher transform
- risk.statistics()
-
A results table’s statistics in one call, under stated conventions.
- risk.bootstrap_se()
-
Bootstrap standard errors of every statistic
statisticsreports. - risk.Allocation
-
Capital allocation of a distortion risk measure, from
capital. - risk.LevelAllocation
-
An allocation of an exogenous total by stand-alone measures at one
Dependence
Copulas, and reordering existing draws to a target correlation.
- risk.GaussianCopula
-
The Gaussian copula with correlation matrix
correlation. - risk.StudentTCopula
-
The Student t copula with correlation matrix
correlationandnu - risk.ArchimedeanCopula
-
An exchangeable Archimedean copula: Clayton, Gumbel, Frank or Joe.
- risk.simulate()
-
Simulates marginals joined by a copula.
- risk.iman_conover()
-
Reorders each component’s draws to a target correlation (Iman-Conover).
Extreme value tails
Generalized Pareto tails over a threshold, beyond the draws.
- risk.Gpd
-
The generalized Pareto distribution, as SciPy’s
- risk.PotTail
-
A peaks-over-threshold tail: draws above a threshold modelled by a
- risk.mean_excess()
-
The empirical mean-excess function
e(u) = E[X - u | X > u]at each - risk.hill()
-
Hill estimates of the tail index
xi(1 / alpha) from thek - risk.threshold_diagnostics()
-
Threshold diagnostics for peaks over threshold: at each threshold the