Description Usage Arguments Details Value Examples
Function to bound the total losses via the Chernoff inequality.
1 2 |
ELT |
Data frame containing two numeric columns. The column |
s |
Scalar or numeric vector containing the total losses of interest. |
t |
Scalar representing the time period of interest. The default value is |
theta |
Scalar containing information about the variance of the Gamma distribution: sd[X] = x * |
cap |
Scalar representing the financial cap on losses for a single event, i.e. the maximum possible loss caused by a single event. The default value is |
nk |
Number of optimisation points. |
verbose |
Logical. If |
Chernoff's inequality states:
Pr(S ≥ s) ≤ inf_{k > 0} e^{-k s} M_S(k)
where M_S(k) is the Moment Generating Function (MGF) of the total loss S.
The fChernoff
function optimises the bound over a fixed set of nk
discrete values.
A numeric matrix, containing the pre-specified losses s
in the first column and the upper bound for the exceedance probabilities in the second column.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | data(UShurricane)
# Compress the table to millions of dollars
USh.m <- compressELT(ELT(UShurricane), digits = -6)
EPC.Chernoff <- fChernoff(USh.m, s = 1:40)
EPC.Chernoff
plot(EPC.Chernoff, type = "l", ylim = c(0, 1))
# Assuming the losses follow a Gamma with E[X] = x, and Var[X] = 2 * x
EPC.Chernoff.Gamma <- fChernoff(USh.m, s = 1:40, theta = 2, cap = 5)
EPC.Chernoff.Gamma
plot(EPC.Chernoff.Gamma, type = "l", ylim = c(0, 1))
# Compare the two results:
plot(EPC.Chernoff, type = "l", main = "Exceedance Probability Curve", ylim = c(0, 1))
lines(EPC.Chernoff.Gamma, col = 2, lty = 2)
legend("topright", c("Dirac Delta", expression(paste("Gamma(",
alpha[i] == 1 / theta^2, ", ", beta[i] ==1 / (x[i] * theta^2), ")", " cap =", 5))),
lwd = 2, lty = 1:2, col = 1:2)
|
Loading required package: MASS
s Upper Pr[S>=s]
[1,] 1 1.000000000
[2,] 2 1.000000000
[3,] 3 1.000000000
[4,] 4 1.000000000
[5,] 5 1.000000000
[6,] 6 1.000000000
[7,] 7 0.985087693
[8,] 8 0.942110629
[9,] 9 0.880481138
[10,] 10 0.807590507
[11,] 11 0.729247718
[12,] 12 0.649803465
[13,] 13 0.572377239
[14,] 14 0.499003006
[15,] 15 0.431120582
[16,] 16 0.369417774
[17,] 17 0.314232879
[18,] 18 0.265438219
[19,] 19 0.222818456
[20,] 20 0.185932996
[21,] 21 0.154357376
[22,] 22 0.127503946
[23,] 23 0.104779232
[24,] 24 0.085728478
[25,] 25 0.069850533
[26,] 26 0.056690646
[27,] 27 0.045837807
[28,] 28 0.036911505
[29,] 29 0.029622453
[30,] 30 0.023698690
[31,] 31 0.018906111
[32,] 32 0.015034063
[33,] 33 0.011914006
[34,] 34 0.009421061
[35,] 35 0.007429420
[36,] 36 0.005839889
[37,] 37 0.004583932
[38,] 38 0.003584876
[39,] 39 0.002799363
[40,] 40 0.002180146
s Upper Pr[S>=s]
[1,] 1 1.0000000
[2,] 2 1.0000000
[3,] 3 1.0000000
[4,] 4 1.0000000
[5,] 5 1.0000000
[6,] 6 1.0000000
[7,] 7 0.9643082
[8,] 8 0.9543254
[9,] 9 0.9444459
[10,] 10 0.9346687
[11,] 11 0.9249927
[12,] 12 0.9154169
[13,] 13 0.9059402
[14,] 14 0.8965617
[15,] 15 0.8872802
[16,] 16 0.8780948
[17,] 17 0.8690045
[18,] 18 0.8600083
[19,] 19 0.8511052
[20,] 20 0.8422943
[21,] 21 0.8335747
[22,] 22 0.8249452
[23,] 23 0.8164052
[24,] 24 0.8079535
[25,] 25 0.7995893
[26,] 26 0.7913117
[27,] 27 0.7831198
[28,] 28 0.7750127
[29,] 29 0.7669896
[30,] 30 0.7590494
[31,] 31 0.7511915
[32,] 32 0.7434150
[33,] 33 0.7357189
[34,] 34 0.7281025
[35,] 35 0.7205650
[36,] 36 0.7131055
[37,] 37 0.7057232
[38,] 38 0.6984173
[39,] 39 0.6911871
[40,] 40 0.6840317
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.