# Does the gamma function have any application in quantitative finance?

I was looking into the factorial function in an R package called gregmisc and came across the implementation of the gamma function, instead of a recursive or iterative process as I was expecting. The gamma function is defined as:

$$\Gamma(z)=\int_{0}^{\infty}e^{-t}t^{z-1}dt$$

A brief history of the function points to Euler's solution to the factorial problem for non-integers (although the equation above is not his). It has some application in physics and I was curious if it is useful to any quant models, apart from being a fancy factorial calculator.

-

## 3 Answers

It shows up in Bayes Analysis where a binomial distribution is involved (integer values apply):

$$\Gamma(k + 1) = k!$$

That allows the following integral to be evaluated in closed form:

$$\int_{0}^{1}p^{j-1}(1-p)^{k-1}dp = \frac{\Gamma(k)\Gamma(j)}{\Gamma(j+k)}$$

That integral can easily show up in the numerator and/or denominator of Bayes Equation.

-

Thanks for the response. I thought it may come up in calculating half-life of a mean reverting spread, but couldn't find it there. – Milktrader Mar 13 '11 at 3:54
Your second equation looks like the beta function, which now opens up some more things to ponder. – Milktrader Mar 13 '11 at 4:28
– bill_080 Mar 13 '11 at 17:00

In certain cases some stochastic differential equations(SDE's) have closed form(deterministic) solutions in the form of well known ordinary differential equations (ODE's), partial differential equations(PDE's), and special functions like the gamma function.

Here's an example from a paper where an SDE has a closed form solution in terms of the gamma function: http://www.siam.org/books/dc13/DC13samplechpt.pdf

Solving SDE's (preferably quickly), like with a closed form solution (when one is available), is a core activity in quantitative finance.

-

Appreciate the link. Thank you. – Milktrader Mar 13 '11 at 3:54

Gamma distributions are being used to model the default rate of credit portfolios by CreditRisk.

-
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 3, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 20, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9231139421463013, "perplexity_flag": "middle"}