# 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.

-

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
The beta distribution shows up in lots of ways, and is a special case of the Dirichlet dist. The binomial dist is discrete and the beta is continuous. The cumulative distribution for the binomial dist has similarities to the beta function. And, the beta dist is the conjugate prior of the binomial dist. Change the beta shape parameters to get the uniform dist, arcsine/Jeffreys dist, etc. After some digging, here's an article that uses the above relationship directly. You'll find other articles with similar equations. selab.janelia.org/pub/publications/Eddy-ATG3/… – 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.

-