Maths Toolkit, Part I: Statistical Distributions
///
4. The Boost Math Toolkit contains a number of template classes for a wide range of univariate continuous and discrete probability distributions. We can define a probability distribution by giving its defining parameters and using them in the constructor of the corresponding template class. In general, each distribution has member functions to compute mean and standard deviation while the most extensive functionality is to be found in free (that is, non-member) functions. The library supports the following categories of functions:
. Essential functions (pdf, cdf, cdf complement)
. Measures of central tendency (mean, median, mode, quantile)
. Measures of dispersion (standard deviation, variance)
. Kurtosis, kurtosis excess, hazard functions
The library contains many of the most popular discrete and continuous probability distribution functions that we can use in computational finance. It is worth mentioning that it has now support for the Students t-distribution, Gamma distribution, Chi Squared distribution and the Noncentral Chi Squared distribution.
What are the advantages of this library in our opinion?
. Standardisation (the code has been peer-reviewed and conforms to the boost design standard)
. Quality: the code is efficient, robust and portable. As developer, you use the library without having to be concerned with its maintenance
. Building applications: you can use the classes in the library as part of large software systems
. No more pseudo-code needed: instead of discussing non-runnable code in books, articles and other finance literature, we could use code from Boost.Math directly, thus allowing readers to check the validity of numerical results.