support@edupristine.com1800 200 5835Request a Call
Call Me

Maximum Likelihood Estimation in Excel

Operational Risk Modeling Techniques

Operational risk modeling uses Loss Data Analysis (internal or external), Scenario Analysis and data on Business Environment and Internal Controls. Loss data analysis and Scenario Analysis require fitting probability distribution to loss data or scenario data i.e. identifying which distribution best describes the empirical or expert judgement data.

There are various methods of fitting distributions to data such as

  • Moments Matching (estimating distribution parameters such that moments such as mean, variance of the data are matched)
  • Quantile/Percentile Matching (estimating distribution parameters such that quantiles like 50th Quantile i.e. Median, 99% percentile etc. are matched)
  • Probability Weighted Moments
  • Maximum Likelihood Estimation (MLE)

Why Maximum Likelihood Estimators (MLE)?

MLE method estimates the distribution parameter such that the joint likelihood of observing all empirical data points together gets maximized. Quite unlike moment matching and quantile matching, MLE makes use of all data points instead of only specific moments/quantiles. MLE also allows fitting distribution to truncated and censored data (common feature of operational risk data).

Estimating MLE parameter for any distribution with given PDF and CDF functions

  • Start with seed parameter values for the distribution to be fitted to the data
  • Find the probability of observing each data point (using appropriate PDF function)
  • Assuming all data points are independent, joint probability of observing all data points together is the product of their probability density functions
  • If two events A and B are independent Joint probability of A and B happening together is P(A) x P(B)
  • Overall probability of observing all loss data amounts together would be all PDF multiplied together.
  • We would like to maximize the joint likelihood to observe all data points. This is achieved either by Maximizing P(A)*P(B) or by Maximizing log(P(A)) + log(P(B)) or by Minimizing [log(P(A)) + log(P(B))]
  • Use an optimization algorithm (like Excel Solver) to maximize joint log-likelihood by changing parameter values

Excel Modeling for Estimating Parameters for Gamma Distribution using MLE

Lets take a small operational loss severity data set comprising of only 20 loss data points. Illustration shows estimation of parameters of Gamma distribution using MLE:


Estimation of parameters of Gamma distribution using Maximum likelihood estimation


Step-1: Seed values of parameters

Gamma distribution has two parameters

  • Shape/Alpha which controls the shape of the distribution and impacts skewness and kurtosis of the distribution and
  • Scale/Beta which controls the dispersion (variance) of the distribution

For Gamma distribution, shape and scale parameters have to be positive, so we start with positive seed values.


Step-2: PDF of each loss data point

Usually, CDF and PDF functions in Excel have Dist suffixed to the distribution name. For instance, NORMDIST function gives CDF of normal distribution if cumulative argument is TRUE and gives PDF if cumulative argument is entered as FALSE.

Similarly, GAMMADIST gives CDF (cumulative = TRUE) and PDF (cumulative = FALSE) of Gamma distributed random variable.


GAMMADIST function in excel


Step-3: Calculation of Joint Probability

Joint probability of observing all data points together is calculated as product of PDF of individual data point. We can either

  • Maximise product of all PDF or
  • Maximize the sum of logs of individual PDF (maximising log likelihood) or
  • Minimise the sum of logs of individual PDF (minimizing log likelihood).

We decide to minimize the negative logarithm. Column C we calculate the logs of PDF and in C7 we take negative sum of all log PDF. We then use Excel solver to minimize cell C7 by changing parameter values.

Calculating joint probability


Step-4: Invoke Excel Solver to minimize negative log likelihood function

Excel solver can be used to minimize the log likelihood function on (Cell C7), by changing parameter values (B3 and B4), subject to the constraints that parameters are positive (B3, B4 > = small positive value)


Using excel solver

Practical considerations

In practice and as allowed in regulatory guidelines, Banks may not collect data on small operational losses below a threshold (called truncation of loss data). MLE parameter estimates need to be corrected for this to avoid bias in estimates.

Say if the loss collection threshold is USD 10000

  • Find conditional PDF, conditional on the fact that losses above 10000 are only being collected
  • To find conditional PDF, we divide PDF by the cumulative probability that losses are above the threshold (as we are capturing only data points above the threshold)
  • Equivalently we divide by (1 cumulative probability that losses are less than the threshold).


Practical considerations


Notice that we are now minimizing cell E7, sum of conditional PDF. Conditional probability of each data point is calculated as

PDF(Loss Amount)/(1-CDF(Loss threshold))

GAMMADIST(Loss amount, Param-1, Param-2, Cumulative = False)/ (1- GAMMADIST(Loss Threshold, Param-1, Param-2, Cumulative = True)).


Conditional probability calculation for each data point


Another noteworthy point is that after considering loss threshold, shape parameter has changed. Therefore, not adjusting for loss threshold would lead to biased parameter estimates.

Templates to download

I have created a template for you, where the subheadings are given and you have to link the model to get the cash numbers! You can download the same from here. You can go through the case and fill in the yellow boxes. I also recommend that you try to create this structure on your own (so that you get a hang of what information is to be recorded).

It has been an amazing experience. I got a chance to learn from various experts in this field. Trainers have been amazing. I learnt how to carve big business plans over a coffee sitting in the comfortable ambience of the class. Its much different than a usual classroom experience. The best thing about them is that we can comeback for revision and classes that gets missed.
EduPristine has given me the right exposure to the Big Online World. The faculty was knowledgeable which is why I could manage to take home sound knowledge through this particulars course. The time invested in this course has been worth it.
Popular Courses

Global Association of Risk Professionals, Inc. (GARP®) does not endorse, promote, review or warrant the accuracy of the products or services offered by EduPristine for FRM® related information, nor does it endorse any pass rates claimed by the provider. Further, GARP® is not responsible for any fees or costs paid by the user to EduPristine nor is GARP® responsible for any fees or costs of any person or entity providing any services to EduPristine Study Program. FRM®, GARP® and Global Association of Risk Professionals®, are trademarks owned by the Global Association of Risk Professionals, Inc

CFA Institute does not endorse, promote, or warrant the accuracy or quality of the products or services offered by EduPristine. CFA Institute, CFA®, Claritas® and Chartered Financial Analyst® are trademarks owned by CFA Institute.

Utmost care has been taken to ensure that there is no copyright violation or infringement in any of our content. Still, in case you feel that there is any copyright violation of any kind please send a mail to and we will rectify it.

DM_course_specific_landing.php Post ID = 13163