From a28cb3ca6af5113a1d58ce03d30e8fc1de6bbd8b Mon Sep 17 00:00:00 2001 From: David Handschke Date: Sat, 3 May 2025 13:57:27 -0500 Subject: [PATCH 1/3] edit to use the MBBEFD cumulative distribution function rather than G, the exposure curve Signed-off-by: David Handschke --- docs/2_user_guides/2_x_re_pricing.rst | 16 +- issue_raised/agg MBBEFD using CDF.html | 7995 ++++++++++++++++ ...(which does not seem correct as used).html | 7999 +++++++++++++++++ 3 files changed, 16002 insertions(+), 8 deletions(-) create mode 100644 issue_raised/agg MBBEFD using CDF.html create mode 100644 issue_raised/agg using G (which does not seem correct as used).html diff --git a/docs/2_user_guides/2_x_re_pricing.rst b/docs/2_user_guides/2_x_re_pricing.rst index 70fc58b..a43346f 100644 --- a/docs/2_user_guides/2_x_re_pricing.rst +++ b/docs/2_user_guides/2_x_re_pricing.rst @@ -323,7 +323,7 @@ Property Risk Exposure Rating Property risk exposure rating differs from casualty in part because the severity distribution varies with each risk (location). Rather than a single ground-up severity curve per class, there is a size of loss distribution normalized by property total insured value (TIV). -We start by introducing the Swiss Re severity curves, :cite:t:`Bernegger1997` using a moments-matched beta distribution. The function ``G`` defines the MBBEFD distribution, parameterized by ``c``. +We start by introducing the Swiss Re severity curves, :cite:t:`Bernegger1997` using a moments-matched beta distribution. The function ``F`` defines the MBBEFD distribution, parameterized by ``c``. .. ipython:: python :okwarning: @@ -339,10 +339,10 @@ We start by introducing the Swiss Re severity curves, :cite:t:`Bernegger1997` us def bg(c): return np.exp((0.78 + 0.12*c)*c) - def G(x, c): + def F(x, c): b = bb(c) g = bg(c) - return np.log(((g - 1) * b + (1 - g * b) * b**x) / (1 - b)) / np.log(g * b) + return np.where(x == 1 , 1 , 1-(1-b)/((g-1)*b**(1-x)+(1-g*b))) Here are the base curves, compare Figure 4.2 in :cite:t:`Bernegger1997`. The curve ``c=5`` is close to the Lloyd's curve (scale). @@ -355,13 +355,13 @@ Here are the base curves, compare Figure 4.2 in :cite:t:`Bernegger1997`. The cur ans = [] ps = np.linspace(0,1,101) for c in [0, 1, 2, 3, 4, 5]: - gs = G(ps, c) - ax.plot(ps, gs, label=f'c={c}') - ans.append([c, *xsden_to_meancv(ps[1:], np.diff(gs))]) + fs = F(ps, c) + ax.plot(ps, fs, label=f'c={c}') + ans.append([c, *xsden_to_meancv(ps[1:], np.diff(fs))]) ax.legend(loc='lower right'); @savefig prop_ch1.png scale=20 - ax.set(xlabel='Proportion of limit', ylabel='Proportion of expected loss', - title='Swiss Re property scales'); + ax.set(xlabel='Loss degree x', ylabel='Probablity of X <= x', + title='MBBDF Distribution'); Next, approximate these curves with a beta distribution to make them easier for us to use in ``aggregate``. Here are the parameters and fit graphs for each curve. diff --git a/issue_raised/agg MBBEFD using CDF.html b/issue_raised/agg MBBEFD using CDF.html new file mode 100644 index 0000000..f209bf0 --- /dev/null +++ b/issue_raised/agg MBBEFD using CDF.html @@ -0,0 +1,7995 @@ + + + + + +agg MBBEFD using CDF + + + + + + + + + + + + +
+ + +
+ + diff --git a/issue_raised/agg using G (which does not seem correct as used).html b/issue_raised/agg using G (which does not seem correct as used).html new file mode 100644 index 0000000..5e773b7 --- /dev/null +++ b/issue_raised/agg using G (which does not seem correct as used).html @@ -0,0 +1,7999 @@ + + + + + +agg using G (which does not seem correct as used) + + + + + + + + + + + + +
+ + +
+ + From c1b0f526ab6eb0c67fa86259049135d45dc0d5c3 Mon Sep 17 00:00:00 2001 From: David Handschke Date: Sat, 3 May 2025 15:21:36 -0500 Subject: [PATCH 2/3] updated chart labels Signed-off-by: David Handschke --- issue_raised/agg MBBEFD using CDF.html | 30 +++++++++++++------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/issue_raised/agg MBBEFD using CDF.html b/issue_raised/agg MBBEFD using CDF.html index f209bf0..f42cec0 100644 --- a/issue_raised/agg MBBEFD using CDF.html +++ b/issue_raised/agg MBBEFD using CDF.html @@ -7526,7 +7526,7 @@