Skip to contents

입력 계층

원시 experience 데이터의 검증·grain 헬퍼. as_triangle() 이 필수 검증·코어션을 내부에서 수행하므로 일반 흐름엔 불필요하며, Triangle 을 만들지 않고 검증·enrichment 만 하고 싶을 때 사용한다.

derive_grain_columns()
Derive monthly / quarterly / semi-annual / annual grain columns
validate_triangle()
Validate triangle structure before building a development

집계 빌더

같은 long-format experience 데이터를 보는 세 가지 프레임워크 — cohort × dev (Triangle), 달력 기간 (Calendar), 포트폴리오 전체 (Total).

as_triangle()
Coerce experience data to a Triangle object
as_calendar()
Coerce experience data to a Calendar object
as_total()
Coerce experience data to a Total object

단계 연결 테이블

Chain ladder (ATA) 와 노출 기반 (ED) 의 공통 long-format intermediate. summary.Link()model 인자로 두 모형의 진단을 분기.

as_link()
Coerce a Triangle to a Link object
summary(<Link>)
Summarise a Link table

추정

Triangle 위에서 projection 을 산출하는 모형. 기본 알고리즘: fit_cl (chain ladder / multiplicative), fit_ed (exposure-driven / additive), fit_sa (성숙점 기준 ED + CL 합성 — stage-adaptive). ELR 기반 reserve 모형: fit_bf (외부 prior 를 받는 Bornhuetter-Ferguson), fit_cc (데이터에서 pooled ELR 을 추정하는 Cape Cod). Role dispatcher: fit_loss (loss 측 ed/cl/sa/bf/cc), fit_premium (premium 측 ed/cl). 합성: fit_ratio (손해율 통합 인터페이스, delta-method SE). 모두 결과 객체에 $full projection table 을 보유.

fit_cl()
Fit chain ladder projection from a Triangle object
fit_ed()
Fit ED intensity factors
fit_sa()
Fit stage-adaptive (SA) loss projection on a Triangle
fit_bf()
Bornhuetter-Ferguson projection
fit_cc()
Cape Cod projection (Stanard 1985)
fit_loss()
Fit a loss projection on a Triangle
fit_premium()
Fit a chain ladder projection on the premium triangle
fit_ratio()
Fit loss ratio projection model

인자 진단

Factor level 의 링크별 인자 추정. fit_ata (multiplicative ATA 인자 f_k) 와 fit_intensity (ED 의 additive intensity g_k) 가 짝. 두 함수 모두 projection 은 산출하지 않고 인자·SE·진단 stat 만 반환. fit_atafit_cl, detect_maturity(), fit_ratio(method = "sa") 의 stage transition 에서 사용되고, fit_intensityfit_ed 의 짝 diagnostic.

fit_ata()
Fit age-to-age development factors
fit_intensity()
Fit per-link ED intensity factors

추정 셀 선택 진단

Triangle 의 어떤 셀을 추정에 쓸지 결정. detect_maturity 는 dev 축 (ATA 인자가 안정화되는 링크 이후), detect_regime 은 cohort 축 (인수 코호트 간 구조적 변화). *_at() / *_spec() 헬퍼는 fit 함수의 maturity / loss_regime / premium_regime 인자에 들어갈 수동 (_at()) 혹은 lazy-detect (_spec()) 입력 객체를 만든다.

detect_maturity()
Find ata maturity by group
detect_regime() print(<Regime>) summary(<Regime>) print(<summary.Regime>)
Detect structural regime shifts across underwriting cohorts
maturity_at()
Construct a Maturity object from manually specified maturity points
maturity_spec()
Build a lazy maturity detection spec
regime_at()
Construct a Regime object from manually specified regime changes
regime_spec()
Build a lazy regime detection spec

부트스트랩

cohort × dev 단위 표준오차 분해를 시뮬레이션으로 산출 (피타고라스 분해 — parameter + process). 반환 객체는 fit_loss / fit_premium / fit_ratiobootstrap 인자에 전달되어 분석식 SE / CI 를 경험적 값으로 교체.

bootstrap()
Bootstrap a Triangle

예측 진단

적합 결과 RatioFit 위에서 동작 (raw Triangle 아님). 예측 손해율의 갱신이 멈추는 valuation 깊이 vv 를 dual criterion (예측 갱신이 잡음 수준 이하 AND 코호트 간 분산이 작음, M 회 연속) 으로 탐지.

detect_convergence()
Find the development period at which the loss ratio estimate stabilises

Backtest

Triangle 의 최근 대각선을 보류한 뒤 재적합·예측을 보류된 실제값과 비교.

backtest() print(<Backtest>) summary(<Backtest>) print(<summary.Backtest>)
Backtest a loss / premium / loss-ratio projection on existing data

시각화

plot() (base generic) 과 plot_triangle() (lossratio generic) 이 객체 클래스에 따라 dispatch. render() 는 data frame 과 Triangle 객체용 콘솔 테이블 렌더러.

plot_triangle()
Triangle plot generic
plot(<ATAFit>)
Plot an ata fit
plot(<BFFit>)
Plot a Bornhuetter-Ferguson fit
plot(<Backtest>)
Plot a backtest object
plot(<CCFit>)
Plot a Cape Cod fit
plot(<CLFit>)
Plot a chain ladder fit
plot(<Calendar>)
Plot calendar-based development statistics
plot(<Convergence>)
Plot the Convergence diagnostic
plot(<EDFit>)
Plot an ED fit
plot(<IntensityFit>)
Plot an Intensity fit
plot(<Link>)
Plot link-factor diagnostics
plot(<PremiumFit>)
Plot an premium fit
plot(<RatioFit>)
Plot a loss ratio fit
plot(<Regime>)
Plot a cohort regime detection result
plot(<RegimeOptimalWindow>)
Plot change-count vs window with the elbow marker
plot(<SAFit>)
Plot a stage-adaptive fit
plot(<Total>)
Plot a Total object as a per-group bar chart
plot(<Triangle>)
Plot development trajectories with optional summary overlay
plot(<TriangleValidation>)
Plot a TriangleValidation result
plot_triangle(<ATAFit>)
Triangle heatmap for an ata fit
plot_triangle(<BFFit>)
Plot a Bornhuetter-Ferguson fit as a triangle table
plot_triangle(<Backtest>)
Triangle heatmap of backtest A/E Error
plot_triangle(<CCFit>)
Plot a Cape Cod fit as a triangle table
plot_triangle(<CLFit>)
Plot a chain ladder fit as a triangle table
plot_triangle(<EDFit>)
Triangle heatmap for an ED fit
plot_triangle(<IntensityFit>)
Triangle heatmap for an Intensity fit
plot_triangle(<Link>)
Plot a Link object as a triangle heatmap
plot_triangle(<PremiumFit>)
Plot an premium fit as a triangle table
plot_triangle(<RatioFit>)
Plot loss ratio projection as a triangle heatmap
plot_triangle(<SAFit>)
Plot a stage-adaptive fit as a triangle table
plot_triangle(<Triangle>)
Plot development values as a triangle table
plot_triangle(<TriangleValidation>)
Triangle-heatmap view of dev-sequence gaps
render() print(<Triangle>)
Render a tabular object as a compact console table

기타 S3 메서드

패키지 클래스에 등록된 print / summary / longer 메서드.

backtest() print(<Backtest>) summary(<Backtest>) print(<summary.Backtest>)
Backtest a loss / premium / loss-ratio projection on existing data
detect_regime() print(<Regime>) summary(<Regime>) print(<summary.Regime>)
Detect structural regime shifts across underwriting cohorts
print(<ATAFit>)
Print an ATAFit object
print(<ATASummary>)
Print method for ATASummary
print(<BFFit>)
Print method for BFFit
print(<BootstrapTriangle>)
Print method for BootstrapTriangle
print(<CCFit>)
Print method for CCFit
print(<CLFit>)
Print a CLFit object
print(<EDFit>)
Print an EDFit object
print(<EDSummary>)
Print method for EDSummary
print(<IntensityFit>)
Print method for IntensityFit
print(<LossFit>)
Print method for LossFit
print(<PremiumFit>)
Print method for PremiumFit
print(<RatioFit>)
Print an RatioFit object
print(<SAFit>)
Print method for SAFit
render() print(<Triangle>)
Render a tabular object as a compact console table
summary(<ATAFit>)
Summary method for ATAFit
summary(<BFFit>)
Summary method for BFFit
summary(<CCFit>)
Summary method for CCFit
summary(<CLFit>)
Summary method for CLFit
summary(<Calendar>)
Summarise calendar-development statistics (Mean, Median, Weighted)
summary(<EDFit>)
Summary method for EDFit
summary(<IntensityFit>)
Summary method for IntensityFit
summary(<Link>)
Summarise a Link table
summary(<LossFit>)
Summary method for LossFit
summary(<PremiumFit>)
Summary method for PremiumFit
summary(<RatioFit>)
Summary method for RatioFit
summary(<SAFit>)
Summary method for SAFit
summary(<Total>)
Summarise a Total object
summary(<Triangle>)
Summarise development statistics (Mean, Median, Weighted)

헬퍼

longer()
Reshape an object to long form (S3 generic)
mask_triangle()
Mask the last N calendar diagonals from a Triangle

데이터셋

experience
Sample loss experience data