Proteus Actuarial Library

User Guide

  • Usage Guide
    • Creating Stochastic Variables
      • Basic Stochastic Variables
      • Statistical Distributions
    • Variable Containers
    • Copulas and Dependencies
      • Variable Coupling
    • Configuration
      • Simulation Settings
      • GPU Acceleration
    • Advanced Examples
    • See Also
    • Performance Tips

Tutorials

  • Tutorials
    • Getting Started
    • Prerequisites
    • Interactive Notebooks
  • Getting Started with PAL
    • Setup
    • Generating Stochastic Variables
    • Arithmetic on Stochastic Variables
    • Combining Multiple Lines of Business
    • Adding Dependencies with Copulas
    • Frequency-Severity Models
    • Visualisation
    • Configuration Summary
    • Next Steps
  • Distributions Guide
    • Setup
    • Generating Samples
    • Analytical Functions
    • Available Distributions
      • Severity (Continuous) Distributions
      • Frequency (Discrete) Distributions
    • Comparing Severity Distributions
    • Comparing Frequency Distributions
    • Choosing a Severity Distribution
    • Stochastic Parameters
    • Working with Generated Variables
    • See Also
  • Frequency-Severity Modelling
    • Setup
    • 1. Creating a Frequency-Severity Model
    • 2. Aggregation and Occurrence
      • Aggregate Loss
      • Occurrence (Maximum Event)
      • Coupling Groups
    • 3. Arithmetic on Events
      • Capping Individual Losses
      • Stochastic Inflation
      • Other Operations
    • 4. Choosing the Frequency Distribution
      • Poisson
      • Negative Binomial
    • 5. Common Modelling Patterns
      • Attritional + Large Loss Split
      • Loss Development / Expense Loading
      • Feeding into Reinsurance Contracts
    • 6. Applying Copulas to FreqSev Results
    • Key Classes
    • See Also
  • Coupling Groups, Copulas and Variable Reordering
    • 1. Coupling Groups
      • What Is a Coupling Group?
      • Why Coupling Groups Matter
    • 2. Copulas
      • Available Copula Types
      • Comparing Copula Types
        • Independent (no copula)
        • Gaussian Copula
        • Gumbel Copula (upper tail dependence)
        • Clayton Copula (lower tail dependence)
        • Student’s T Copula (symmetric tail dependence)
      • Scatter Plots — Rank Space
    • 3. Variable Reordering
      • How apply() Works
      • Seeing Reordering in Action
      • Marginal Preservation
      • Reordering Across a Chain of Derived Variables
    • 4. Multivariate Copulas
    • 5. generate() vs apply()
      • generate() — Create New Samples
      • apply() — Reorder Existing Variables
    • 6. Frequency-Severity Models with Copulas
      • Two Lines of Business
      • Coupling with Catastrophe Losses
    • Important Constraints
    • References
  • Pricing an Excess-of-Loss Reinsurance Program
    • Prerequisites
    • 1. Generating Gross Losses
    • 2. A Single XoL Layer
      • Example: £1m xs £1m
      • Reinstatements
      • Aggregate Limits and Deductibles
    • 3. Building an XoL Tower
      • Applying the Tower
      • Net Loss Calculation
      • Reinstatement Premiums
    • 4. Adding Stochastic Inflation
    • 5. Adding Expense Loadings
    • 6. Combining with Copulas
    • Key Concepts Summary
    • See Also

API Reference

  • API Reference
    • Variables
      • ProteusVariable
        • ProteusVariable.__init__()
        • ProteusVariable.dim_name
        • ProteusVariable.values
        • ProteusVariable.dimensions
        • ProteusVariable.count()
        • ProteusVariable.index()
        • ProteusVariable.get_value_at_sim()
        • ProteusVariable.upsample()
        • ProteusVariable.sum()
        • ProteusVariable.validate_freqsev_consistency()
        • ProteusVariable.from_csv()
        • ProteusVariable.from_dict()
        • ProteusVariable.from_series()
        • ProteusVariable.correlation_matrix()
        • ProteusVariable.show_histogram()
        • ProteusVariable.show_cdf()
      • ProteusVariable
        • ProteusVariable
      • StochasticScalar
        • StochasticScalar
        • StochasticScalar
    • Distributions
      • DistributionBase
        • DistributionBase.__init__()
        • DistributionBase.cdf()
        • DistributionBase.invcdf()
        • DistributionBase.generate()
      • DiscreteDistributionBase
        • DiscreteDistributionBase.__init__()
        • DiscreteDistributionBase.cdf()
        • DiscreteDistributionBase.generate()
        • DiscreteDistributionBase.invcdf()
      • Poisson
        • Poisson.__init__()
        • Poisson.cdf()
        • Poisson.invcdf()
        • Poisson.generate()
      • NegBinomial
        • NegBinomial.__init__()
        • NegBinomial.cdf()
        • NegBinomial.invcdf()
        • NegBinomial.generate()
      • Binomial
        • Binomial.__init__()
        • Binomial.cdf()
        • Binomial.invcdf()
        • Binomial.generate()
      • HyperGeometric
        • HyperGeometric.__init__()
        • HyperGeometric.cdf()
        • HyperGeometric.invcdf()
        • HyperGeometric.generate()
      • Bernoulli
        • Bernoulli.__init__()
        • Bernoulli.cdf()
        • Bernoulli.generate()
        • Bernoulli.invcdf()
      • GPD
        • GPD.__init__()
        • GPD.cdf()
        • GPD.invcdf()
        • GPD.generate()
      • Burr
        • Burr.__init__()
        • Burr.cdf()
        • Burr.invcdf()
        • Burr.generate()
      • Beta
        • Beta.__init__()
        • Beta.cdf()
        • Beta.invcdf()
        • Beta.generate()
      • LogLogistic
        • LogLogistic.__init__()
        • LogLogistic.cdf()
        • LogLogistic.invcdf()
        • LogLogistic.generate()
      • Normal
        • Normal.__init__()
        • Normal.cdf()
        • Normal.invcdf()
        • Normal.generate()
      • Logistic
        • Logistic.__init__()
        • Logistic.cdf()
        • Logistic.invcdf()
        • Logistic.generate()
      • LogNormal
        • LogNormal.__init__()
        • LogNormal.cdf()
        • LogNormal.invcdf()
        • LogNormal.generate()
      • Gamma
        • Gamma.__init__()
        • Gamma.cdf()
        • Gamma.invcdf()
        • Gamma.generate()
      • InverseGamma
        • InverseGamma.__init__()
        • InverseGamma.cdf()
        • InverseGamma.invcdf()
        • InverseGamma.generate()
      • Pareto
        • Pareto.__init__()
        • Pareto.cdf()
        • Pareto.invcdf()
        • Pareto.generate()
      • Paralogistic
        • Paralogistic.__init__()
        • Paralogistic.cdf()
        • Paralogistic.invcdf()
        • Paralogistic.generate()
      • InverseBurr
        • InverseBurr.__init__()
        • InverseBurr.cdf()
        • InverseBurr.invcdf()
        • InverseBurr.generate()
      • InverseParalogistic
        • InverseParalogistic.__init__()
        • InverseParalogistic.cdf()
        • InverseParalogistic.invcdf()
        • InverseParalogistic.generate()
      • Weibull
        • Weibull.__init__()
        • Weibull.cdf()
        • Weibull.invcdf()
        • Weibull.generate()
      • InverseWeibull
        • InverseWeibull.__init__()
        • InverseWeibull.cdf()
        • InverseWeibull.invcdf()
        • InverseWeibull.generate()
      • GEV
        • GEV.__init__()
        • GEV.cdf()
        • GEV.invcdf()
        • GEV.generate()
      • StudentsT
        • StudentsT.__init__()
        • StudentsT.cdf()
        • StudentsT.invcdf()
        • StudentsT.generate()
      • InverseGaussian
        • InverseGaussian.__init__()
        • InverseGaussian.cdf()
        • InverseGaussian.invcdf()
        • InverseGaussian.generate()
      • Exponential
        • Exponential.__init__()
        • Exponential.cdf()
        • Exponential.invcdf()
        • Exponential.generate()
      • Uniform
        • Uniform.__init__()
        • Uniform.cdf()
        • Uniform.invcdf()
        • Uniform.generate()
      • InverseExponential
        • InverseExponential.__init__()
        • InverseExponential.cdf()
        • InverseExponential.invcdf()
        • InverseExponential.generate()
      • DistributionGeneratorBase
        • DistributionGeneratorBase.__init__()
        • DistributionGeneratorBase.cdf()
        • DistributionGeneratorBase.invcdf()
        • DistributionGeneratorBase.generate()
      • DiscreteDistributionGenerator
        • DiscreteDistributionGenerator.__init__()
        • DiscreteDistributionGenerator.cdf()
        • DiscreteDistributionGenerator.generate()
        • DiscreteDistributionGenerator.invcdf()
      • ContinuousDistributionGenerator
        • ContinuousDistributionGenerator.__init__()
        • ContinuousDistributionGenerator.cdf()
        • ContinuousDistributionGenerator.generate()
        • ContinuousDistributionGenerator.invcdf()
      • Available Distributions
    • Frequency Severity Models
      • FrequencySeverityModel
        • FrequencySeverityModel.__init__()
        • FrequencySeverityModel.generate()
      • FreqSevSims
        • FreqSevSims.__init__()
        • FreqSevSims.values
        • FreqSevSims.n_sims
        • FreqSevSims.aggregate()
        • FreqSevSims.occurrence()
        • FreqSevSims.count()
        • FreqSevSims.deep_copy()
        • FreqSevSims.copy()
        • FreqSevSims.apply()
        • FreqSevSims.all()
        • FreqSevSims.any()
        • FreqSevSims.astype()
        • FreqSevSims.upsample()
      • Classes
        • FrequencySeverityModel
        • FreqSevSims
    • Copulas
      • Copula
        • Copula.dimension
        • Copula.generate()
        • Copula.apply()
      • EllipticalCopula
        • EllipticalCopula.__init__()
        • EllipticalCopula.apply()
        • EllipticalCopula.generate()
        • EllipticalCopula.dimension
      • GaussianCopula
        • GaussianCopula.__init__()
        • GaussianCopula.generate()
        • GaussianCopula.apply()
        • GaussianCopula.dimension
      • StudentsTCopula
        • StudentsTCopula.__init__()
        • StudentsTCopula.generate()
        • StudentsTCopula.apply()
        • StudentsTCopula.dimension
      • ArchimedeanCopula
        • ArchimedeanCopula.generator_inv()
        • ArchimedeanCopula.generate_latent_distribution()
        • ArchimedeanCopula.generate()
        • ArchimedeanCopula.apply()
        • ArchimedeanCopula.dimension
      • ClaytonCopula
        • ClaytonCopula.__init__()
        • ClaytonCopula.dimension
        • ClaytonCopula.generator_inv()
        • ClaytonCopula.generate_latent_distribution()
        • ClaytonCopula.apply()
        • ClaytonCopula.generate()
      • levy_stable()
      • GumbelCopula
        • GumbelCopula.__init__()
        • GumbelCopula.dimension
        • GumbelCopula.generator_inv()
        • GumbelCopula.generate_latent_distribution()
        • GumbelCopula.apply()
        • GumbelCopula.generate()
      • FrankCopula
        • FrankCopula.__init__()
        • FrankCopula.dimension
        • FrankCopula.generator_inv()
        • FrankCopula.generate_latent_distribution()
        • FrankCopula.apply()
        • FrankCopula.generate()
      • JoeCopula
        • JoeCopula.__init__()
        • JoeCopula.dimension
        • JoeCopula.generator_inv()
        • JoeCopula.generate_latent_distribution()
        • JoeCopula.apply()
        • JoeCopula.generate()
      • MM1Copula
        • MM1Copula.__init__()
        • MM1Copula.dimension
        • MM1Copula.delta_matrix
        • MM1Copula.theta
        • MM1Copula.generate()
        • MM1Copula.apply()
      • GalambosCopula
        • GalambosCopula.__init__()
        • GalambosCopula.dimension
        • GalambosCopula.generate()
        • GalambosCopula.apply()
      • PlackettCopula
        • PlackettCopula.dimension
        • PlackettCopula.__init__()
        • PlackettCopula.generate()
        • PlackettCopula.apply()
      • HuslerReissCopula
        • HuslerReissCopula.__init__()
        • HuslerReissCopula.is_adjusted
        • HuslerReissCopula.dimension
        • HuslerReissCopula.adjusted_lambda_matrix
        • HuslerReissCopula.apply()
        • HuslerReissCopula.tail_dependence_matrix
        • HuslerReissCopula.calculate_lambda_from_tail_dependence()
        • HuslerReissCopula.from_tail_dependence_matrix()
        • HuslerReissCopula.generate()
      • ExtremalTCopula
        • ExtremalTCopula.apply()
        • ExtremalTCopula.__init__()
        • ExtremalTCopula.dimension
        • ExtremalTCopula.generate()
        • ExtremalTCopula.from_tail_dependence_matrix()
      • apply_copula()
      • Available Copulas
      • Usage Example
    • Reinsurance Contracts
      • ContractResults
        • ContractResults.__init__()
      • XoL
        • XoL.__init__()
        • XoL.apply()
        • XoL.calc_summary()
        • XoL.print_summary()
      • XoLTower
        • XoLTower.__init__()
        • XoLTower.apply()
        • XoLTower.print_summary()
      • Available Contract Types
      • Usage Example
    • Configuration
      • set_default_n_sims()
      • set_random_seed()
      • Configuration Options
        • n_sims
        • rng
      • GPU Mode
    • Statistics
      • tvar()
      • loss_summary()
      • Functions
    • Mathematical Utilities
      • exp()
      • sum()
      • mean()
      • std()
      • var()
      • percentile()
      • min()
      • max()
      • where()
      • safe_divide()
      • minimum()
      • maximum()
      • cumsum()
      • floor()
      • all()
    • Type Definitions
      • ArithmeticProtocol
        • ArithmeticProtocol.__init__()
      • Config
        • Config.n_sims
        • Config.seed
        • Config.rng
        • Config.__init__()
      • DistributionLike
        • DistributionLike.cdf()
        • DistributionLike.invcdf()
        • DistributionLike.generate()
        • DistributionLike.__init__()
      • NumericProtocol
        • NumericProtocol.__init__()
      • VectorLike
        • VectorLike.__init__()

Additional Information

  • Contributing
    • How to Contribute
    • Development Setup
    • Code Style
    • Reporting Issues
  • License
    • Full License Text
    • Contact
Proteus Actuarial Library
  • Overview: module code

All modules for which code is available

  • pal.config
  • pal.contracts
  • pal.copulas
  • pal.couplings
  • pal.distributions
  • pal.frequency_severity
  • pal.maths
  • pal.stats
  • pal.stochastic_scalar
  • pal.types
  • pal.variables

© Copyright 2025, ProteusLLP.

Built with Sphinx using a theme provided by Read the Docs.